HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In


The cursor parameter allows for efficient batch retrieval of large amounts of documents. It can be used to get all documents. The state of the result set will be preserved.

  1. By default the cursor is not enabled. To enable it, select cursor to the GQL query to get the cursor in combination with a query in where using an empty string "" as value, i.e., cursor: "".
  2. The response will have a cursor value, and then get the next batches using that cursor value in the GQL query.
  3. The results for the first query will be preserved in the current state (stateful), 10 minutes per request, and after that time, the cursor will expire and no longer be valid.
  4. Continue till there are no more results.
  5. The number of results per batch depend on the number set in limit for the first query with cursor, the skip is ignored. The client can implement this by ignoring the first batches of results.
  6. You should sort by DOC for fastest retrieval.

Example request, where we get the batches per 1 document:

    limit: 1
    orderBy: {_ranking: DOC}
  ) {
    items {