Query
Create cursor from SQL query.
To more efficiently batch communication, results of SQL queries are returned as cursors. Each REST API call returns a portion of the documents in a batch and indicates if this is the final batch. Batches are sent until the batch with the final indicator.
Depending on the query, the total number of documents in the result set might not be known in advance.
In order to free resources, delete the cursor as soon as it is no longer needed.
post/_fabric/{fabric}/_api/cursor/sql
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
fabricstring string required
The name of the fabric.
Request body
Example request
{
"query": "SELECT name FROM users"
}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.