Skip to main content

Get Task State Transitions

Retrieves the complete state transition history for a specific HDP task, showing all status changes over time. This endpoint does not require authentication.

Endpoint

GET /tasks/{task_uuid}/state_transitions

Path Parameters

ParameterTypeDescription
task_uuidstringThe unique identifier (UUID) of the task

Example Request

curl -X GET https://staging.hdp.api.herodotus.cloud/tasks/01JPJ03YJT1A93D6NF56G4GVEQ/state_transitions \
  -H "Content-Type: application/json"

Response

Success Response (200 OK)

{
  "taskId": "01JPJ03YJT1A93D6NF56G4GVEQ",
  "state_transitions": [
    {
      "id": "01JPJ03YJT1A93D6NF56G4GVE1",
      "task_id": "01JPJ03YJT1A93D6NF56G4GVEQ",
      "from_status": null,
      "to_status": "Received",
      "created_at": "2024-03-17T10:24:00Z"
    },
    {
      "id": "01JPJ03YJT1A93D6NF56G4GVE2",
      "task_id": "01JPJ03YJT1A93D6NF56G4GVEQ",
      "from_status": "Received",
      "to_status": "DryRunStarted",
      "created_at": "2024-03-17T10:24:05Z"
    },
    {
      "id": "01JPJ03YJT1A93D6NF56G4GVE3",
      "task_id": "01JPJ03YJT1A93D6NF56G4GVEQ",
      "from_status": "DryRunStarted",
      "to_status": "DryRunCompleted",
      "created_at": "2024-03-17T10:24:10Z"
    }
  ]
}

Not Found Response (404)

{
  "error": "Task not found",
  "taskId": "01JPJ03YJT1A93D6NF56G4GVEQ"
}

Response Fields

FieldTypeDescription
taskIdstringThe unique identifier of the task
state_transitionsarrayArray of state transition objects, ordered chronologically

State Transition Object Fields

FieldTypeDescription
idstringUnique identifier of the state transition
task_idstringThe task UUID this transition belongs to
from_statusstring | nullPrevious status (null for initial state)
to_statusstringNew status after the transition
created_atstringISO 8601 timestamp of when the transition occurred

Notes

  • No authentication is required for this endpoint
  • State transitions are ordered chronologically (oldest first)
  • The first transition will have from_status as null (initial state)
  • Useful for debugging and understanding task execution flow
  • Each status change in the task lifecycle is recorded as a separate transition