GetPreviousSearchPage API¶
Retrieves the previous page of results from a previously prepared search. This API moves the page cursor backward by one page relative to the current position. It must be called after a successful Search call, and is typically used after one or more GetNextSearchPage calls to allow the user to navigate back through the result set. When the first page is reached, the FirstPage attribute in the response is set to true.
Endpoint¶
Methods¶
-
GET
/srv.asmx/GetPreviousSearchPage?authenticationTicket=...&withrules=...&withPropertySets=...&withSecurity=...&withOwner=...&withVersions=... -
POST
/srv.asmx/GetPreviousSearchPage(form data) -
SOAP Action:
http://tempuri.org/GetPreviousSearchPage
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
authenticationTicket |
string | Yes | Authentication ticket obtained from AuthenticateUser. Must belong to the same session that executed the Search call. |
withrules |
bool | Yes | true to include folder rules (<Rules> child element) in each folder result. false to omit. |
withPropertySets |
bool | Yes | true to include applied custom property set data (<PropertySets> child element) in each result. false to omit. |
withSecurity |
bool | Yes | true to include the access control list (<AccessList> child element) in each result. false to omit. |
withOwner |
bool | Yes | true to include owner user information as a child element in each result. false to omit. |
withVersions |
bool | Yes | true to include document version history (<Versions> child element) in each document result. false to omit. |
Note: Setting
withrules,withPropertySets,withSecurity,withOwner, andwithVersionstofalseproduces the most compact and fastest response. Only request additional data when your application needs it.
Response¶
Success Response -" Results Found¶
The root element carries pagination metadata as attributes, with one child element per result item on the page (documents and folders interleaved).
The root element is
<response>, not<root>. The<folder>and<document>elements are the same ones GetFolder and GetDocument return, with the same attribute names -Namerather thanDocumentName,Sizerather thanDocumentSize,Typerather thanMimeTypeDescription,VersionNumberrather thanLastVersionNumber. The example below shows a representative subset; GetDocument has the full attribute table.
<response success="true" error="" FirstPage="true" from="1" to="20" LastPage="false">
<!-- Folder result -->
<folder FolderID="1329"
ParentID="1001"
Name="ApiTests"
Path="\Public\ApiTests"
Description=""
CreationDate="2026-08-19T15:34:41.250Z"
OwnerName="System Administrator"
DomainId="1001"
ClassificationLevel="NoMarkings"
ClassificationLevelId="0"
DeclassifyOn=""
DowngradeOn=""
RDDefId="0"
RetentionDate=""
DispositionDate=""
CutoffDate="">
<!-- Included only when withOwner=true -->
<User exists="true" UserID="4" FirstName="System" LastName="Administrator"
Email="admin@example.com" MobileNumber="" Enabled="TRUE" UserName="sysadmin" />
<!-- Included only when withrules=true -->
<Rules>
<Rule Name="AllowableFileTypes" Value="*" />
<Rule Name="Checkins" Value="allows" />
<Rule Name="Checkouts" Value="allows" />
<Rule Name="DocumentDeletes" Value="allows" />
<Rule Name="FolderDeletes" Value="allows" />
<Rule Name="NewDocuments" Value="allows" />
<Rule Name="NewFolders" Value="allows" />
<Rule Name="ClassifiedDocuments" Value="disallows" />
</Rules>
<!-- Included only when withPropertySets=true -->
<Propertysets />
<!-- Included only when withSecurity=true -->
<AccessList DateApplied="" AppliedBy="" InheritedSecurity="true">
<Anonymous Right="2" Description="(Read)" />
</AccessList>
</folder>
<!-- Document result. The full <document> element - see GetDocument for every attribute. -->
<document DocumentID="1494"
Name="Q1-2024-Report.pdf"
Path="\Finance\Annual Reports"
Description=""
Size="204800"
Type="PDF Document"
CreationDate="2026-08-19T15:34:41.527Z"
ModificationDate="2026-08-19T15:34:41.527Z"
VersionNumber="3000000"
PublishedVersionNumber="3000000"
DocTypeID="0"
DocTypeName=""
AIEnhanced="17" OwnerId="4"
OwnerName="System Administrator"
FolderId="1329"
Foldername="Annual Reports"
DomainId="1001"
DomainName="Finance"
UserViewStatus="2">
<!-- Present whenever the description carries an author stamp -->
<DescriptionLog AppliedById="4" AppliedBy="System Administrator"
DateApplied="2026-09-02T13:02:48.250Z" />
<!-- Included only when a full-text KEYWORDS search ranked this result -->
<RankInfo Rank="95" FoundIn="1" FoundInVersionNumber="3000000" />
<!-- Included only when withOwner=true -->
<User exists="true" UserID="4" FirstName="System" LastName="Administrator"
Email="admin@example.com" MobileNumber="" Enabled="TRUE" UserName="sysadmin" />
<!-- Included only when withPropertySets=true -->
<Propertysets />
<!-- Included only when withSecurity=true -->
<AccessList DateApplied="" AppliedBy="" InheritedSecurity="true"> ... </AccessList>
<!-- Included only when withVersions=true. Child elements, not attributes. -->
<Versions>
<Version Number="3000000">
<VersionAuthor>System Administrator</VersionAuthor>
<VersionAuthorId>4</VersionAuthorId>
<VersionSize>204800</VersionSize>
<CheckSum>BFDB77A6</CheckSum>
<DateCreated>2026-08-19T15:34:41.527Z</DateCreated>
<DatePublished>2026-08-19T15:34:41.773Z</DatePublished>
<Comment />
<ApprovalStatus>NoResult</ApprovalStatus>
<ApprovalDate />
</Version>
</Versions>
</document>
<!-- ... additional result items ... -->
</response>
Root Element Attributes¶
| Attribute | Type | Description |
|---|---|---|
success |
string | true if the page was retrieved successfully. |
error |
string | Error message when success is false; otherwise empty. |
FirstPage |
string | true if this is the first page of results (no earlier pages exist). |
LastPage |
string | true if this is the last page of results (no further pages exist). |
from |
string | 1-based index of the first item on this page (e.g. 1, 21, 41). |
to |
string | 1-based index of the last item on this page (e.g. 20, 40). |
Success Response -" No Results Found¶
When the search produced zero matches, the response still has success="true" with all pagination positions set to zero:
Document Element Attributes¶
Each <document> element in the response contains the standard document attributes (see GetDocument for the full attribute reference), plus a UserViewStatus attribute:
| Attribute | Type | Description |
|---|---|---|
UserViewStatus |
integer | Integer indicating whether the current user has viewed the document. 0 = NoView (never viewed), 1 = Changed (viewed but the published version has since changed), 2 = Viewed (viewed the current published version). |
RankInfo Element (Full-Text Search Results)¶
When results include documents found via a KEYWORDS full-text search, each document element may contain a <RankInfo> child element:
| Attribute | Type | Description |
|---|---|---|
Rank |
integer | Relevance score assigned by the content search engine; higher values indicate closer matches. The built-in Windows Search index reports 1 to 100; a remote search service reports on its own scale, so compare ranks within one result set rather than across installations. |
FoundIn |
integer | Where the term was found, as one of the values in the table below. |
FoundInVersionNumber |
integer | The version the match was found in, in the same internal form as the VersionNumber attribute of <document> (3000000 is version 3). 0 for every FoundIn value other than 1 - a match in properties, an attachment or a workflow history entry belongs to the document as a whole, not to one version. |
FoundIn Values¶
| Value | Meaning | Suggested caption |
|---|---|---|
0 |
Unknown. The engine reported a place this version of infoRouter does not recognise. | - |
1 |
The text of the document itself, in the version named by FoundInVersionNumber. |
Found in the document content |
2 |
The document's properties or its comments. | Search criteria found in meta information |
3 |
An e-mail attachment carried by the document. | Search criteria have been found in an e-mail attachment |
4 |
A workflow history entry - a comment entered while the document went through a workflow. | Search criteria found in comments provided during a workflow |
The captions are suggestions only; the value is what the API contracts on, and the wording belongs
to the client. Values 2, 3 and 4 are the sentences infoRouter's own resource file already
carries in every installed language, so a client hosted inside infoRouter can reuse those
translations rather than write its own.
One place per document. The search engine reports the first place it found the term, not every place. A term that appears in both a document's text and its properties comes back once, as whichever the engine reached first, so rank the document by
Rank, not by how many places it matched.Whether the match is in the published version is a comparison the client makes:
FoundInis1andFoundInVersionNumberequals thePublishedVersionNumberattribute of the<document>element the<RankInfo>sits inside.
Documents come back as the full <document> element. Since 9.0 it also carries AIEnhanced and
AIExtractConfidence. The first says which of the document's attributes infoRouter Connect
produced, as a set of bits - 0 when none did; the second how sure it was about the weakest value
it put in a property set, as a percentage. See AIEnhanced and
AIExtractConfidence.
Error Response¶
Required Permissions¶
Any authenticated user may call this API. Results are filtered server-side to only include items the user has at least Read permission for. Read-only users may also call this API.
Example¶
GET Request¶
GET /srv.asmx/GetPreviousSearchPage?authenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&withrules=false
&withPropertySets=false
&withSecurity=false
&withOwner=false
&withVersions=false
HTTP/1.1
POST Request¶
POST /srv.asmx/GetPreviousSearchPage HTTP/1.1
Content-Type: application/x-www-form-urlencoded
authenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&withrules=false
&withPropertySets=true
&withSecurity=false
&withOwner=true
&withVersions=false
SOAP Request¶
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="http://tempuri.org/">
<soap:Body>
<tns:GetPreviousSearchPage>
<tns:authenticationTicket>3f2504e0-4f89-11d3-9a0c-0305e82c3301</tns:authenticationTicket>
<tns:withrules>false</tns:withrules>
<tns:withPropertySets>false</tns:withPropertySets>
<tns:withSecurity>false</tns:withSecurity>
<tns:withOwner>false</tns:withOwner>
<tns:withVersions>false</tns:withVersions>
</tns:GetPreviousSearchPage>
</soap:Body>
</soap:Envelope>
Typical Bidirectional Paging Loop (Pseudo-code)¶
// Step 1: Prepare the search
Search(ticket, xmlcriteria, "MODIFICATIONDATE", false)
// Step 2: Navigate forward
page1 = GetNextSearchPage(ticket, false, false, false, false, false) // FirstPage=true
page2 = GetNextSearchPage(ticket, false, false, false, false, false)
page3 = GetNextSearchPage(ticket, false, false, false, false, false) // LastPage=true
// Step 3: Navigate backward
page2 = GetPreviousSearchPage(ticket, false, false, false, false, false)
page1 = GetPreviousSearchPage(ticket, false, false, false, false, false) // FirstPage=true
JavaScript¶
Every call answers XML with HTTP 200, success or not, so success is the thing to branch on and
errorCode is the number to report.
async function call(action, params) {
const response = await fetch(`/srv.asmx/${action}?${new URLSearchParams(params)}`);
const root = new DOMParser()
.parseFromString(await response.text(), 'text/xml')
.documentElement;
if (root.getAttribute('success') !== 'true') {
throw new Error(`${root.getAttribute('errorCode')}: ${root.getAttribute('error')}`);
}
return root;
}
The other direction of GetNextSearchPage, with the same parameters, the same answer and the same session result behind it.
const page = await call('GetPreviousSearchPage', {
authenticationTicket: ticket,
withrules: false, withPropertySets: false, withSecurity: false, withOwner: false, withVersions: false
});
console.log(page.getAttribute('from'), page.getAttribute('to'), page.getAttribute('FirstPage'));
Notes¶
-
GetPreviousSearchPagemust be called after a successfulSearchcall and at least oneGetNextSearchPagecall. Calling it when already on the first page returns the first page again (FirstPage="true"). -
The page size is configured at the system level via the Search Page Size setting (typically 20 items per page). To choose the size for one call, use GetPreviousSearchPage1.
-
ISO reviewer: every
<document>carriesISOReviewById,ISOReviewByNameandISOReviewWorkflowName(added in 9.0), besideLastISOReviewDateandNextISOReviewDate.ISOReviewByIdis a user id, or a special role as it is stored:-5the document's owner,-8the submitter, with the role's label as the name.ISOReviewWorkflowNameis the workflow the review is submitted to, empty for a review by task. A document with no ISO review definition hasISOReviewById="0"and two empty names. The reviewers of a page are read with one query, so a list of review schedules needs noGetISOReviewDefinitioncall per row. -
The cursor position is shared with
GetNextSearchPage-" both APIs operate on the same server-side pagination state for the current session. -
When already on the first page,
GetPreviousSearchPageresets the cursor to position 1 and returns the first page again rather than returning an error. -
Search session state expires with the user session (30-day sliding window). If the session expires between calls, the API returns
"The Query has been expired.". -
The
<RankInfo>element is only present on document results when full-textKEYWORDSsearch was used and the content search engine assigned a relevance rank. -
Setting all boolean parameters to
falseproduces the most compact response and is recommended when only document/folder identity and path information are needed. -
Both folders and documents can appear in the same result page, interleaved in the order returned by the search engine.
-
The parameters and response structure are identical to
GetNextSearchPage-" only the direction of cursor movement differs.
Related APIs¶
-
Search - Prepare a search result set (must be called before this API)
-
GetNextSearchPage - Retrieve the next page of the prepared search results
-
GetFoldersAndDocuments - List documents and folders in a specific path without a search query
-
GetDocuments - Return documents in a specific folder path
Error Codes¶
The errorCode values this operation returns, checked against a running server:
errorCode |
When |
|---|---|
4010 |
the ticket is expired or unknown, or there is no ticket at all |
4000 |
there is no search result in this session, or it has expired |