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

/srv.asmx/GetPreviousSearchPage

Methods

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, and withVersions to false produces 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).

<root success="true" FirstPage="true" LastPage="false" from="1" to="20">

  <!-- Folder result -->
  <folder FolderID="42" FolderName="Annual Reports" ParentFolderID="10"
          Path="/Finance/Annual Reports" CreationDate="2023-01-15"
          ModificationDate="2024-06-01" OwnerID="7" OwnerName="jsmith"
          Description="..." ... >
    <!-- 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> ... </PropertySets>
    <!-- Included only when withSecurity=true -->
    <AccessList DateApplied="2023-01-15" AppliedBy="admin" InheritedSecurity="false">
      <DomainMembers Right="4" Description="(Add &amp; Read)" />
      <UserGroup DomainName="Finance" GroupName="Managers" Right="6" Description="(Full Control)" />
      <User DomainName="Finance" UserName="jsmith" Right="6" Description="(Full Control)" />
    </AccessList>
    <!-- Included only when withOwner=true -->
    <User UserID="7" UserName="jsmith" FullName="John Smith" ... />
  </folder>

  <!-- Document result -->
  <document DocumentID="1051" DocumentName="Q1-2024-Report.pdf"
            FolderID="42" FolderName="Annual Reports"
            Path="/Finance/Annual Reports/Q1-2024-Report.pdf"
            MimeType="application/pdf" MimeTypeDescription="PDF Document"
            DocumentSize="204800" LastVersionNumber="3"
            CreationDate="2024-03-01" ModificationDate="2024-06-15"
            OwnerID="7" OwnerName="jsmith" StatusCode="2" ... >
    <!-- Included only when full-text KEYWORDS search was used -->
    <RankInfo Rank="95"
              FoundInPropertiesOrComments="FALSE"
              FoundInAttachments="FALSE"
              FoundInWorkflowHistory="FALSE"
              FoundInVersionNumber="3"
              FoundInPublishedVersion="TRUE" />
    <!-- Included only when withPropertySets=true -->
    <PropertySets> ... </PropertySets>
    <!-- Included only when withSecurity=true -->
    <AccessList DateApplied="2024-03-01" AppliedBy="jsmith" InheritedSecurity="true"> ... </AccessList>
    <!-- Included only when withOwner=true -->
    <User UserID="7" UserName="jsmith" FullName="John Smith" ... />
    <!-- Included only when withVersions=true -->
    <Versions> ... </Versions>
  </document>

  <!-- ... additional result items ... -->
</root>

Root Element Attributes

Attribute Type Description
success string true if the page was retrieved successfully.
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:

<root success="true" FirstPage="true" LastPage="true" from="0" to="0" />

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.
FoundInPropertiesOrComments TRUE/FALSE The match was found in the document's metadata properties or comments.
FoundInAttachments TRUE/FALSE The match was found in an attachment file.
FoundInWorkflowHistory TRUE/FALSE The match was found in the workflow history of the document.
FoundInVersionNumber integer The version number in which the match was found. 0 means the match is not version-specific.
FoundInPublishedVersion TRUE/FALSE The matching version is the published version of the document.

Error Response

<root success="false" error="[ErrorCode] Error message" />

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

Notes



Error Codes

Error Description
[900] Authentication failed Invalid or missing authentication ticket.
[901] Session expired or Invalid ticket The ticket has expired or does not exist.
The Query has been expired. No active search session found — Search was not called, or the session expired.
The Query results not found. The search result metadata is missing from the session (internal state inconsistency).

For detailed documentation visit: https://support.inforouter.com/api-docs/GetPreviousSearchPage