--- title: "Discard a change set" canonical: "https://admiral.io/docs/api/projects/ChangeSetAPI_DiscardChangeSet" --- # Discard a change set `POST https://api.admiral.io/v1/projects/{project}/environments/{environment}/changesets/{changeset}/discard` - FAILED_PRECONDITION when it is not open. Scope: `changeset:write` ### Path parameters - `project` (string, required): The project id. - `environment` (string, required): The environment id. - `changeset` (string, required): The changeset id. ### Response 200 Success - `change_set` (ChangeSet): ChangeSet is a proposal against the components of one environment. - `name` (string): (IDENTIFIER) The change set's name, such as `projects/payments-api/environments/prod/changesets/cs-01jg7m3k2x9q`. Identifies the change set on update. Pattern `^projects/([a-z]([a-z0-9-]{0,61}[a-z0-9])?|-)/environments/([a-z]([a-z0-9-]{0,61}[a-z0-9])?|-)/changesets/cs-[0-9a-z]+$`. - `uid` (string): `cs-` and twelve base36 characters, the last segment of `name`. Never changes and is never reused. Pattern `^cs-[0-9a-z]+$`. Read-only. - `project_id` (string): The uid of the project the change set's environment is in. Read-only. - `environment_id` (string): The uid of the environment the change set proposes against. It never changes. Read-only. - `title` (string): Length at most 256. - `description` (string): Length at most 4096. - `reverts_change_set_id` (string): Set on a change set made by RevertChangeSet: the change set it reverts. It may apply while that change set's partial apply holds the environment. Read-only. - `reverted_by_change_set_id` (string): Set when another change set reverted this one: the change set that did. Empty for a revert in place. Read-only. - `latest_run_id` (string): The change set's newest run; empty before its first. Its status is the change set's progress: planning, awaiting approval, applying, failed. Read-only. - `status` (Status): One of `STATUS_UNSPECIFIED`, `OPEN`, `APPLIED`, `CLOSED`, `REVERTED`. Read-only. - `behind` (boolean): The environment moved since the head revision's base. It cannot apply until RebaseChangeSet brings it up to date. Read-only. - `head_revision` (integer (int32)): 0 until the first edit. Read-only. - `etag` (string): Changes whenever the change set does. Send it back on update to refuse the change if someone else changed the change set first. Read-only. - `created_by` (ActorRef): ActorRef is a lightweight reference to the user or agent that performed an action. Server-populated on all resource responses. Clients should never send this. Read-only. - `id` (string): The actor's typed id: a `usr-` user id or an `sa-` service account id. - `display_name` (string): Human-readable name (e.g., "John Smith", "deploy-bot"). - `email` (string): Email address (empty for non-human actors). - `created_at` (Timestamp): A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC. Read-only. - `updated_at` (Timestamp): A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC. Read-only.