Chilkat Online Tools

VB6 / Cognite API v1 / Retrieve cursors for parallel reads

Back to Collection Items

' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.

Dim http As New ChilkatHttp
Dim success As Long

http.SetRequestHeader "api-key","{{api-key}}"

Dim sbResponseBody As New ChilkatStringBuilder
success = http.QuickGetSb("https://domain.com/api/v1/projects/{{project}}/raw/dbs/:dbName/tables/:tableName/cursors",sbResponseBody)
If (success = 0) Then
    Debug.Print http.LastErrorText
    Exit Sub
End If

Debug.Print "Response status code = " & http.LastStatus
Debug.Print sbResponseBody.GetAsString()

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"
  }
}