Get started

Tasks

Monitor background task runs. Many operations (OSD creation, image downloads, RGW deployments) run as background tasks with trackable state and logs.


Recent Runs

GET /task/runs/recent

List recent task runs across all nodes.

Response
[
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "taskName": "ceph.create-osd",
    "state": "completed",
    "createdAt": "2026-04-07T14:30:00Z"
  }
]

Run Details

GET /task/run/{runId}

Get full details for a specific task run.

Response
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "taskName": "ceph.create-osd",
  "state": "running",
  "nodeId": "550e8400-e29b-41d4-a716-446655440000",
  "nodeHostname": "worker-01",
  "createdAt": "2026-04-07T14:30:00Z",
  "startedAt": "2026-04-07T14:30:05Z",
  "completedAt": null,
  "error": null
}

Run Logs

GET /task/run/{runId}/logs

Retrieve logs for a specific task run.

Response
[
  {
    "timestamp": "2026-04-07T14:30:05Z",
    "level": "info",
    "message": "Starting OSD creation on /dev/sdb"
  },
  {
    "timestamp": "2026-04-07T14:30:12Z",
    "level": "info",
    "message": "Disk prepared successfully"
  }
]

Cancel Run

POST /task/run/{runId}/cancel

Cancel a pending or running task.

Response
{ "status": "canceled" }

Pending Questions

GET /task/questions/pending

List questions awaiting user input before a task can continue.

Response
[
  {
    "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "runId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "taskName": "disk.wipe",
    "prompt": "Disk /dev/sdb contains existing data. Proceed with wipe?",
    "options": ["yes", "no"],
    "createdAt": "2026-04-07T14:35:00Z"
  }
]

Answer Question

POST /task/question/{questionId}/answer

Submit an answer to a pending task question.

Response
{ "status": "answered" }

Task States

StateDescription
pendingTask is queued and waiting to run
runningTask is currently executing
completedTask finished successfully
failedTask encountered an error
canceledTask was canceled by a user