Skip to content
Select themeSelect language

`GET /api/tasks/{id}/undo` — list a task's undo/rollback actions, newest first. The service authz's the caller against the task's workspace.

GET
/api/tasks/{id}/undo
curl --request GET \
--url https://example.com/api/tasks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/undo \
--cookie supacloud_session=<supacloud_session>
id
required
string format: uuid

Task ID whose undo actions to list

The task’s undo/rollback actions, newest first

Media typeapplication/json
Array<object>

One persisted task_undo_actions row — the durable undo/rollback record. payload/result stay raw serde_json::Value so a forward-compatible shape round-trips without a schema bump (mirrors TaskToolApproval).

object
created_at
required
string format: date-time
created_by
string | null format: uuid
executed_at
string | null format: date-time
grace_until
string | null format: date-time
id
required
string format: uuid
kind
required

The reversal class. Runtime String; the spec narrows it to the closed [UndoKind] (revert_pr | reverse_deploy | redeploy_last_good).

string
Allowed values: revert_pr reverse_deploy redeploy_last_good
payload
required

The raw reversal input (forward-compatible). Runtime stays serde_json::Value; the spec types it as an open map.

object
key
additional properties
result

The reversal outcome (e.g. result.pr_url), forward-compatible. Runtime stays serde_json::Value; the spec types it as an open map.

object | null
run_id
string | null format: uuid
state
required

The lifecycle state. Runtime String; the spec narrows it to the closed [UndoState] (pending | grace | executed | expired | failed).

string
Allowed values: pending grace executed expired failed
task_id
required
string format: uuid
Example
[
{
"kind": "revert_pr",
"state": "pending"
}
]

Authentication required

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Permission denied

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Task not found

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Structured server error

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}