spad.rollback ​
Rolls back to a previous successful deployment
Rolls back to a previous successful deployment.
Input fields: deployment_id, site_id, target_deployment_id, reason (optional), organization_id (optional)
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-spad |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
deployment_uuid | string | Yes | — | SpadDeployment UUID created for the rollback |
site_uuid | string | Yes | — | SpadSite UUID to roll back |
target_deployment_uuid | string | Yes | — | SpadDeployment UUID of the previous successful deployment to revert to |
reason | string | No | — | Operator-supplied rollback reason (logged on the deployment) |
organization_uuid | string | No | — | Organization that owns the site |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
deployment_uuid | string | Yes | — | SpadDeployment UUID created for the rollback |
target_deployment_uuid | string | Yes | — | SpadDeployment UUID that is being rolled back to |
site_uuid | string | Yes | — | Site being rolled back |
organization_uuid | string | No | — | Organization that owns the site |
source_type | string | Yes | — | Copied from the rollback deployment |
source_ref | string | No | — | Copied from the rollback deployment |
commit_sha | string | No | — | Copied from the rollback deployment |
build_config_uuid | string | No | — | Copied from the rollback deployment |
reason | string | No | — | Operator-supplied rollback reason (propagated from input) |
deployment_workflow_uuid | string | Yes | — | Child manual-deployment workflow id started by this rollback |
dispatch_workflow_uuid | string | Yes | — | Target dispatch workflow id (existing or newly started) |
initiated_at | string | Yes | — | ISO8601 timestamp when the rollback was initiated |
started_at | string | Yes | — | ISO8601 timestamp when the child deployment workflow was started |
completed_at | string | No | — | ISO8601 timestamp when the workflow reached COMPLETED |
failed_at | string | No | — | ISO8601 timestamp when the workflow reached FAILED |
failure_reason | string | No | — | Reason recorded on the failure path |
error | string | No | — | Engine-stamped failure metadata |
error_type | string | No | — | Engine-stamped failure metadata |
failed_at_state | json | No | — | Engine-stamped failure metadata |
failed_layer | json | No | — | Engine-stamped failure metadata |
failed_step | json | No | — | Engine-stamped failure metadata |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | start_deployment | — |
starting | No | No | — | complete | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | start_deployment | starting | — |
starting | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "spad.rollback",
"initial_data": {
"deployment_uuid": "value",
"site_uuid": "value",
"target_deployment_uuid": "value"
}
}