--- title: "Rebase a change set" canonical: "https://admiral.io/docs/api/changesets/ChangeSetAPI_RebaseChangeSet" --- # Rebase a change set `POST https://api.admiral.io/v1/changesets/{change_set_id}/rebase` Every conflict needs a resolution, and resolving any dismisses every approval. Without one, an approval carries to the new revision's run when its plan does the same thing to every resource, as ApproveRun says. FAILED_PRECONDITION when it is not behind, when `if_revision` is not the head, when the change set is not open or its apply is running, and when a conflict has no resolution or a resolution matches no conflict (the message names each). Scope: `changeset:write` ### Path parameters - `change_set_id` (string, required): The change_set_id path parameter. Pattern `^cs-[0-9a-z]+$`. ### Request body - `if_revision` (integer (int32)): When set, refused unless the head is this revision. Value at least 0. - `resolutions` (array of Resolution): One for each conflict GetChangeSet lists. Items at most 1000. - `component` (string, required): Pattern `^[a-z]([a-z0-9-]{0,51}[a-z0-9])?$`. - `kind` (Kind): enum.defined_only = true One of `KIND_VALUE`, `KIND_VERSION`, `KIND_REMOVED`. - `path` (array of PathSegment) - `key` (string, required): Length 1 to 256. - `keep` (Keep): enum.defined_only = true One of `KEEP_CHANGE_SET`, `KEEP_ENVIRONMENT`. ### Response 200 Success - `change_set` (ChangeSet) - `id` (string): `cs-` and twelve lowercase base36 characters. Pattern `^cs-[0-9a-z]+$`. Read-only. - `application_id` (string): Read-only. - `environment_id` (string): Read-only. - `title` (string): Length at most 256. - `description` (string): Length at most 4096. - `status` (Status): One of `STATUS_UNSPECIFIED`, `STATUS_OPEN`, `STATUS_APPLIED`, `STATUS_CLOSED`. Read-only. - `head_revision` (integer (int32)): 0 until the first edit. 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. - `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. - `behind` (boolean): The environment moved since the head revision's base. It cannot apply until RebaseChangeSet brings it up to date. 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. - `revision` (Revision) - `id` (string): `rev-` and twelve base36 characters. `number` is the human ordinal within its change set. Pattern `^rev-[0-9a-z]+$`. Read-only. - `number` (integer (int32)) - `change_set_id` (string) - `base_generation` (string (int64)): The environment's generation when the base was taken. - `cause` (Cause): Cause is why a revision was cut: an edit, or a rebase onto the environment as it now is. One of `CAUSE_UNSPECIFIED`, `CAUSE_EDIT`, `CAUSE_REBASE`. - `violations` (array of Violation) - `component` (string) - `path` (string): Display form: `image.tag`, `ingress."a.b"`. - `message` (string) - `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. - `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. - `entries` (array of Entry): Empty in a listing. - `component` (string) - `action` (EntryAction): EntryAction is what a change set does to one component. One of `ENTRY_ACTION_UNSPECIFIED`, `ENTRY_ACTION_CREATE`, `ENTRY_ACTION_UPDATE`, `ENTRY_ACTION_DESTROY`, `ENTRY_ACTION_ORPHAN`. - `version` (VersionRef): The version the component runs after this change set: set on ENTRY_ACTION_CREATE and when the version changes. - `component_id` (string): The registry component. Pattern `^cmp-[0-9a-z]+$`. - `version_id` (string): The registry version. Pattern `^ver-[0-9a-z]+$`. - `digest` (string): `sha256:` of the bundle. - `reference` (string): The tag or `sha256:` digest as given, such as `5.5.0` or `latest`. - `base_digest` (string): Empty on ENTRY_ACTION_CREATE. - `result_digest` (string): Empty on ENTRY_ACTION_DESTROY. - `ops` (array of ValueOp) - `path` (array of PathSegment) - `key` (string, required): Length 1 to 256. - `op` (Kind): One of `KIND_UNSPECIFIED`, `KIND_SET`, `KIND_UNSET`. - `value_json` (string): JSON text; empty unless op is KIND_SET. - `from_present` (boolean): Whether the base had the key; a null there is present. - `from_value_json` (string): JSON text; empty when from_present is false. - `settings` (ComponentSettings): How Admiral deploys the component after this change set. Empty on ENTRY_ACTION_DESTROY. - `assignment_id` (string): The environment's agent assignment it runs on. Empty means the one assignment left after the agent's grants, allowed components and the providers its profiles serve rule the others out; required on a tie. A placement nothing covers is refused, naming an agent that would. Pattern `^asg-[0-9a-z]+$`. - `kubernetes` (KubernetesComponentSettings): KubernetesComponentSettings is where a Kubernetes component's objects go. - `namespace` (string): Empty means the environment's default namespace. Pattern `^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)?$`. Length at most 63. - `extra_namespaces` (array of string): Namespaces the component may also write to, such as `kube-system` for a chart's leader-election Role. The plan refuses an object in any other. Items at most 16. - `depends_on` (array of string): Components this one applies after, after this change set. - `warnings` (array of string)