Ruby / Cognite API v1 / Retrieve cursors for parallel reads
Back to Collection Items
require 'chilkat'
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
http = Chilkat::CkHttp.new()
http.SetRequestHeader("api-key","{{api-key}}")
sbResponseBody = Chilkat::CkStringBuilder.new()
success = http.QuickGetSb("https://domain.com/api/v1/projects/{{project}}/raw/dbs/:dbName/tables/:tableName/cursors",sbResponseBody)
if (success == false)
print http.lastErrorText() + "\n";
exit
end
print "Response status code = " + http.get_LastStatus().to_s() + "\n";
print sbResponseBody.getAsString() + "\n";
Curl Command
curl -X GET
-H "api-key: {{api-key}}"
https://domain.com/api/v1/projects/{{project}}/raw/dbs/:dbName/tables/:tableName/cursors?
Postman Collection Item JSON
{
"id": "getCursors",
"name": "Retrieve cursors for parallel reads",
"request": {
"url": {
"host": "{{baseUrl}}",
"path": [
"api",
"v1",
"projects",
"{{project}}",
"raw",
"dbs",
":dbName",
"tables",
":tableName",
"cursors"
],
"query": [
{
"key": "minLastUpdatedTime",
"description": "The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.",
"disabled": true
},
{
"key": "maxLastUpdatedTime",
"description": "The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.",
"disabled": true
},
{
"key": "numberOfCursors",
"description": "The number of cursors to return, by default it's 10.",
"disabled": true
}
],
"variable": [
{
"key": "dbName",
"description": "Name of the database.",
"disabled": true,
"type": "string"
},
{
"key": "tableName",
"description": "Name of the table.",
"disabled": true,
"type": "string"
}
]
},
"method": "GET",
"header": [
{
"key": "api-key",
"value": "{{api-key}}",
"description": "An admin can create API keys in the Cognite console."
}
],
"description": "Retrieve cursors based on the last updated time range. Normally this endpoint is used for reading in parallel.\n\nEach cursor should be supplied as the 'cursor' query parameter on GET requests to [Read Rows](#operation/getRows).\n**Note** that the 'minLastUpdatedTime' and the 'maxLastUpdatedTime' query parameter on [Read Rows](#operation/getRows) are ignored when a cursor is specified.\n"
}
}