Retrieve a Task

View as Markdown

Get a Task by UUID.

The same handler is also mounted at /v2/org/{org}/nico/rack/task/{id} for backward compatibility; prefer this path for new clients.

Tasks are site-scoped; siteId must be the Site where the task was created. Org must have an Infrastructure Provider entity. User must have authorization role with PROVIDER_ADMIN suffix.

Authentication

AuthorizationBearer
``` export JWT_BEARER_TOKEN="<jwt-bearer-token>" # Example org name: "acme-inc export ORG_NAME=<org-name> # Use the JWT bearer token in your API request auth header: curl -v -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $JWT_BEARER_TOKEN" https://nico-rest-api.nico.svc.cluster.local/v2/org/$ORG_NAME/nico/user/current ```

Path parameters

orgstringRequired
Name of the Org
idstringRequiredformat: "uuid"
UUID of the Task

Query parameters

siteIdstringRequiredformat: "uuid"

ID of the Site that owns the task (tasks are site-scoped).

Response

OK
idstringformat: "uuid"
Unique identifier of the task.
statusenum
Current state of the task.
descriptionstring

Human-readable description provided when the task was created.

messagestring
Optional status or error message describing the current state or result.
ruleIdstring or nullformat: "uuid"

Operation Rule that Flow resolved for this task — either because the caller pinned one via ruleId on the originating request or because Flow’s default rule resolution picked it. Null if Flow has not yet recorded a resolution.

starteddatetime
Timestamp when the task started execution.
finisheddatetime

Timestamp when the task finished (succeeded, failed or terminated).

createddatetime
Timestamp when the task was created.
updateddatetime
Timestamp when the task was last updated.
reportobject

Structured v1 execution report for the task. Populated on single-task GET and cancel responses, and on list responses only when includeReport=true is set. Omitted when the task has not yet produced a report (e.g. still queued) or when the caller did not opt in on list endpoints.

A future schema revision will be exposed as a new TaskReportV2 schema referenced from a parallel response field; v1 consumers are not disturbed by that bump.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error