Create cursor from C8QL query
Queries are executed on the server and the results are returned to the client.
If the resulting queries returned a number of documents less than the batchSize (attribute set in query), then all documents are returned in the result JSON attribute.
If there are more documents than the defined batchSize, then the hasMore JSON attribute is set to true and the id JSON attribute contains the cursor ID. The cursor ID is then used in subsequent calls to the cursor API to retrieve all documents. This is repeated until the hasMore JSON attribute is set to false. The cursor ID will cease to exist after the seconds specified in the ttl attribute.
In the event that a search view is used in the query and this search view has been paused due to resource constraints, the x-gdn-view header is set with the list of all paused views.
Request
- The document declares no server URL.
- Auth
- API key in header Authorization
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
The name of the fabric.
Request body
Example request
{
"query": "for u in testCollection return u"
}Response
Successfully created the cursor.
Example response
{
"code": 201,
"count": 1,
"extra": {
"stats": {
"writesExecuted": 0,
"writesIgnored": 0,
"scannedFull": 7,
"scannedIndex": 0,
"filtered": 0,
"httpRequests": 0,
"executionTime": 0.0006868839263916016,
"peakMemoryUsage": 18396
},
"warnings": []
},
"id": "11176313",
"result": [
{
"_id": "xxx/8753330",
"_key": "8753330",
"_rev": "_dpDmoaa--_",
"item1": "data2"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.