Skip to main content

Get a Task

Get a task

Contents

Overview

  • Endpoint URL: https://{Services API hostname}/tasks/{id}
  • Request method: HTTP GET
  • Response Content-Type: application/json
  • Auth required: yes

Retrieve the current state of a task by its ID. Use this endpoint to poll task status until it reaches DONE or ERROR.

The response contains the full task object structure including execution logs.

Version-specific information

The following version-specific changes apply to this endpoint:

VersionChange details
N/AN/A

Permissions and Authentication

This endpoint requires chain-scoped authentication on the Services API. See the authentication page for more details on authentication methods. The following authentication types are permitted:

  • Privileged authentication: the use of privileged authentication is permitted for this endpoint.
  • Admin authentication: the use of admin authentication is permitted. The performing user needs to have the appropriate access level for the chain.

Headers

The following headers can/must be passed to the API call:

ParameterDescription
N/AN/A

URL parameters

ParameterTypeRequiredDescription
idintegerrequiredThe ID of the task.

Query parameters

ParameterTypeRequiredDescription
log_limitintegeroptionalMaximum number of log entries to return. Default: 10.
offsetintegeroptionalOffset for paginating through log entries. Default: 0.

Sample request

curl 'https://{Services API hostname}/tasks/12345' \
-H 'Authorization: Bearer ACCESS_TOKEN_ID:ACCESS_TOKEN_SECRET'

Sample response (in progress)

See Task object structure for a description of all fields.

{
"id": 12345,
"chain": 1764,
"desc": "Wallet ledger export for analytics warehouse",
"state": {
"code": "INPROGRESS",
"last_run_date": "2026-05-26T12:00:00Z",
"last_modified": "2026-05-26T12:00:10Z",
"created_date": "2026-05-26T11:59:00Z"
},
"trigger": {
"once": "2026-05-26T12:00:00Z"
},
"target": {
"action": "export",
"export_index": "wallet-ledger",
"export_format": "csv"
},
"logs": [
{
"msg": "READY -> INPROGRESS",
"time": "2026-05-26T12:00:00Z"
}
],
"debug": "",
"version": 2,
"result": ""
}

Sample response (completed)

{
"id": 12345,
"chain": 1764,
"desc": "Wallet ledger export for analytics warehouse",
"state": {
"code": "DONE",
"last_run_date": "2026-05-26T12:00:00Z",
"last_modified": "2026-05-26T12:08:30Z",
"created_date": "2026-05-26T11:59:00Z"
},
"trigger": {
"once": "2026-05-26T12:00:00Z"
},
"target": {
"action": "export",
"export_index": "wallet-ledger",
"export_format": "csv"
},
"logs": [
{
"errors": 0,
"msg": "success",
"skips": 0,
"success": 0,
"time": "2026-05-26T12:08:30Z",
"total": 1000000
},
{
"msg": "INPROGRESS -> DONE",
"time": "2026-05-26T12:08:30Z"
}
],
"debug": "",
"version": 2,
"result": "Wallet_Export-12345.csv"
}

Possible error responses

The following represents a list of possible error responses for this endpoint:

ConditionDescription
Task not foundNo task exists with the specified ID for this chain.
Authentication failureNo valid authentication provided or insufficient permissions.