Skip to content

Get a deletion

GET/deletions/{task_id}

The SDKs do not wrap this method yet; call it over HTTP.

Poll a generation deletion task returned by DELETE /generations/{generation_id}. Poll until state is completed or cancelled; only completed means the content was removed. See the Generation deletion guide for the states, phases and blocked reasons.

Errors: 404 "Deletion not found" when the id is not a UUID, does not exist, is not yours, or is not a generation deletion. 404 "Not Found" when generation deletion is not enabled for your API client.

Path Parameters
task_id: string
format: uuid
Returns
DeletionTask = object { id, blocked_reason, completed_at, 9 more }

One generation deletion task, as returned by DELETE /generations/{generation_id} and GET /deletions/{task_id}. See the Generation deletion guide for what each state, phase and blocked reason means.

id: string

Deletion task identifier. Poll it with GET /deletions/{task_id}.

format: uuid
blocked_reason: DeletionBlockedReason

Why a deletion task is blocked; null unless its state is blocked.

One of the following:
"fk_dependency"
"settlement_pending"
"shared_bytes"
"external_error"
"dependency_cancelled"
"operator_hold"
completed_at: string

When the task completed; set only when state is completed.

format: date-time
delete_deadline: string

The deadline recorded on the task, if any.

format: date-time
overdue: boolean

True when delete_deadline passed before the task completed, or the task completed after it. Does not change state.

phase: DeletionPhase

The last execution phase a deletion task reached; null before the task first runs and once it is completed.

One of the following:
"stopping"
"discovering"
"waiting_for_children"
"deleting"
"verifying"
requested_at: string

When the deletion was requested.

format: date-time
resource_id: string

The id of the generation the task deletes.

resource_type: "generation"

The kind of resource the task deletes — always generation.

One of the following:
"generation"
scheduled_at: string

When the task is or was due to run. A task created by DELETE is due when it is accepted.

format: date-time
state: DeletionState

Lifecycle state of a deletion task. completed and cancelled are terminal; every other state is active. Only completed means the content was removed.

One of the following:
"waiting"
"scheduled"
"queued"
"running"
"retry_wait"
"blocked"
"completed"
"cancelled"
updated_at: string

When the task last changed.

format: date-time

Get a deletion

curl https://agents.lumalabs.ai/v1/deletions/$TASK_ID \
-H "Authorization: Bearer $LUMA_AGENTS_API_KEY"
200 example
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"blocked_reason": "fk_dependency",
"completed_at": "2019-12-27T18:11:19.117Z",
"delete_deadline": "2019-12-27T18:11:19.117Z",
"overdue": true,
"phase": "stopping",
"requested_at": "2019-12-27T18:11:19.117Z",
"resource_id": "resource_id",
"resource_type": "generation",
"scheduled_at": "2019-12-27T18:11:19.117Z",
"state": "waiting",
"updated_at": "2019-12-27T18:11:19.117Z"
}
Returns Examples
200 example
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"blocked_reason": "fk_dependency",
"completed_at": "2019-12-27T18:11:19.117Z",
"delete_deadline": "2019-12-27T18:11:19.117Z",
"overdue": true,
"phase": "stopping",
"requested_at": "2019-12-27T18:11:19.117Z",
"resource_id": "resource_id",
"resource_type": "generation",
"scheduled_at": "2019-12-27T18:11:19.117Z",
"state": "waiting",
"updated_at": "2019-12-27T18:11:19.117Z"
}