Demote
Operations
| Method | Endpoint | Description |
|---|---|---|
POST |
/demote |
Undo an aborted ChangeOrder in the Spaces it reached |
Undo an aborted ChangeOrder in the Spaces it reached
POST /demote
Restores each Unit the ChangeOrder's start Tag marks to the Revision it was at before the change, in every Space the ChangeOrder reached, or those WhereSpace, SpaceFilterID and TargetStage select. The ChangeOrder must have an AbortedReason. A Unit already restored is passed over, and a Unit the ChangeOrder carried nothing for is marked without a Revision being made. Revisions made after the change that restoring drops are reported. Demoting again changes nothing.
Operation ID: Demote
Parameters
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dry_run |
boolean | Plan the demotion and return the same response without writing anything. | |
include |
string | Comma-separated parts of the result to return in addition to the actions: Mutations for what each restore changed, or on a dry run would change, as entries of its MutationSources, and Diff for the same change path by path with the values on both sides. |
Request Body
Content-Type: application/json
Schema: DemoteRequest
Responses
| Status | Description | Content-Type | Schema |
|---|---|---|---|
| 200 | OK | application/json |
DemoteResult |
| 207 | Multi-Status: some Unit writes failed, each carrying its own error | application/json |
DemoteResult |
| 400 | Demote request is invalid (Bad Request). | application/json |
StandardErrorResponse |
| 401 | Unauthorized access. | application/json |
StandardErrorResponse |
| 403 | Forbidden access. | application/json |
StandardErrorResponse |
| 404 | Demote not found. | application/json |
StandardErrorResponse |
| 409 | Demote data conflict. Data has changed since last read. | application/json |
StandardErrorResponse |
| 412 | The plan differs from ExpectedPlan. Nothing was written. | application/json |
StandardErrorResponse |
| 500 | Something went wrong while processing Demote. | application/json |
StandardErrorResponse |
| default | Unexpected error. | application/json |
StandardErrorResponse |
Schemas
DemoteRequest
Properties
| Property | Type | Required | Description |
|---|---|---|---|
ChangeDescription |
string | Recorded on each restored Revision. Defaults to naming the ChangeOrder undone. | |
ChangeOrderID |
string (uuid) | ✓ | The ChangeOrder to undo. It must have an AbortedReason. Which Units are restored is the Units its start Tag marks. |
ChangeSetID |
string (uuid) | An existing open ChangeSet to record every write in. | |
ExpectedPlan |
string | The Plan a previous dry run returned. If the plan now differs, nothing is written and the request fails with 412. | |
SpaceFilterID |
string (uuid) | A Filter over Spaces narrowing the Spaces to demote. | |
TargetStage |
string | A Stage of the ChangeOrder's ChangeWorkflow whose Spaces to demote. | |
WhereSpace |
string | A where expression narrowing the Spaces to demote. Without any selector, every Space the ChangeOrder marked is demoted. |
DemoteResult
Properties
| Property | Type | Required | Description |
|---|---|---|---|
ChangeOrderID |
string (uuid) | ||
DryRun |
boolean | True when nothing was written. | |
Plan |
string | Digest of the planned actions. Send it as ExpectedPlan to apply exactly this plan. | |
Spaces |
Array of DemoteSpaceResult |
Downstream Spaces first. |
StandardErrorResponse
Error response details.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
Code |
string | HTTP status code of the response. | |
Message |
string | Message returned with the response. |