Skip to content


API - Paged Queries

Token Based Paged Queries

Methods such as GetAgentInventoriesFromDate will only return a predefined number of records at a time.

When more records are found than can be returned in a single request a query token will be added to the response. Calling the method again while providing the single-use query token as part of the request will return the next set of results. As long as there are more results a new query token will be issued.

Query tokens have a 'Time-To-Live' value (specified in minutes) that is configurable via the API configuration file. Invoking the method with an invalid or expired query token will result in an error being returned.

Configuration

Parameters for the Query Token Provider are configured via the API configuration file.

<!-- QueryTokenManager Configuration -->  
<QueryTokenManager queryTokenManagerType="ASM.Sequoia.Api.QueryTokenManager, ASM.Sequoia.Api" pageSize="10" timeToLiveMinutes="5"/>  
Attribute Name Description
queryTokenManagerType Implementation type and assembly for the Query Token Manager
pageSize Number of records per query page
timeToLiveMinutes Time that tokens will be available for use. After this period expires the token will be removed.