Skip to main content

Check Task

Retrieve the status and result of a TUF-related background task by its UUID.

Tasks are created for almost all TUF metadata operations: bootstrap, signing, metadata rotation, publishing artifacts, and similar actions. Each operation returns a task_id; use this endpoint to poll for completion and get the outcome. Pass the task UUID to check whether the task is still running, has succeeded, or has failed.

Endpoint

GET /tuf/v1/task?task_id=<task_id>

Headers

HeaderValue
AuthorizationBearer <token>

Query Parameters

ParameterTypeRequiredDescription
task_idstring (UUID)The unique identifier of the task to check

Example Request

curl --location 'http://localhost:9000/tuf/v1/task?task_id=ecca335d-9192-4fc2-bbb0-3d7a38a55c84' \
--header 'Authorization: Bearer <jwt_token>'

Response

Success Response (200 OK)

When the task has completed successfully (e.g. bootstrap finished):

{
"data": {
"task_id": "ecca335d-9192-4fc2-bbb0-3d7a38a55c84",
"state": "SUCCESS",
"result": {
"message": "Bootstrap completed successfully",
"status": true,
"task": "bootstrap",
"last_update": "2026-02-04T14:28:13.316292+02:00"
}
},
"message": "Task state."
}

Response Fields

FieldTypeDescription
data.task_idstringUUID of the task
data.statestringTask state (e.g. SUCCESS, PENDING, FAILED); exact values may vary by implementation
data.resultobjectTask outcome; structure depends on task type (bootstrap, sign, rotation, publish, etc.)
data.result.messagestringHuman-readable result message
data.result.statusbooleanIndicates success when true
data.result.taskstringTask type (e.g. "bootstrap")
data.result.last_updatestringISO8601 timestamp of the last update
messagestringTop-level message (e.g. "Task state.")

Task types and result shape

The data.result object varies by the operation that created the task. For bootstrap tasks it includes message, status, task, and last_update. For other TUF operations (signing, metadata rotation, publishing artifacts), the result may contain different fields. The data.state indicates whether the task is still in progress (PENDING), finished successfully (SUCCESS), or failed (FAILED or similar).

Notes

  • Requires a valid JWT in the Authorization header (admin user).
  • Use the task_id returned from Start Bootstrap or other TUF endpoints to poll until state is no longer pending.
  • A single UUID is enough to check the result; no app name or other parameters are required.
  • For long-running operations, poll this endpoint periodically until state reflects completion or failure.