Admiral

Changesets

Revert a change set

POST
/v1/changesets/{change_set_id}/revert

A change set that holds its environment is reverted in place: a new revision of the same change set, for the components named or every one it touched. When every component is back, it reads REVERTED; when some are kept, it reads APPLIED with what it kept. A change set that has closed is reverted by a new change set, for the components named or every one it touched, which may apply only while the environment has not moved past it.

Scope: changeset:write

Authorization

bearerAuth
AuthorizationBearer <token>

An API key, or an access token minted from one. Pass it in the Authorization header: Bearer admp_...

In: header

Path Parameters

change_set_id*change_set_id

The change_set_id path parameter.

Match^cs-[0-9a-z]+$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/changesets/string/revert" \  -H "Content-Type: application/json" \  -d '{}'
{  "change_set": {    "id": "string",    "project_id": "string",    "environment_id": "string",    "title": "string",    "description": "string",    "status": "STATUS_UNSPECIFIED",    "head_revision": 0,    "created_by": {      "id": "string",      "display_name": "string",      "email": "string"    },    "created_at": "2023-01-15T01:30:15.01Z",    "updated_at": "2023-01-15T01:30:15.01Z",    "reverts_change_set_id": "string",    "behind": true,    "latest_run_id": "string",    "reverted_by_change_set_id": "string"  }}