Take the next batch of results belonging to the query identified by the tokenId

The Query Continuation feature in KAPTO allows you to retrieve additional documents following an initial query. Here's a streamlined guide on how to use this feature:

Step 1: Initiate Your Query Using the Query Start API and Check for More Results

Kick off your process by initiating a query using the 'Start' API in KAPTO. This is used to query elements belonging to a specific process. Specify your desired parameters such as status, ignoreExported, notBefore, notAfter, communicationId, and batchSize. Upon receiving the initial response, which includes a batch of documents and a token ID, inspect the nextToken variable in the response. If nextToken is null or "", there are no more results available. However, if it contains a value, this token is to be used for retrieving more results.

Step 2: Use Query Continuation API

With the token ID obtained from the 'Start' API response, you can now use this API to fetch more elements. Just replace token_id with your actual token ID. The response will contain the next batch of documents.

Step 3: Repeat As Needed

Continue using the Query Continuation API to retrieve more elements as long as nextToken provides a new token ID.

Always remember to check the nextToken variable to understand if more results are available.

Language
Credentials
Header
Click Try It! to start a request and see the response here!