--- title: "Retrieve a run's plan diffs" canonical: "https://admiral.io/docs/api/projects/RunAPI_GetRunPlanDiff" --- # Retrieve a run's plan diffs `GET https://api.admiral.io/v1/projects/{project}/environments/{environment}/runs/{run}/planDiff` - NOT_FOUND when no run has that resource name. - FAILED_PRECONDITION until the plan has finished. Scope: `run:read` ### Path parameters - `project` (string, required): The project id. - `environment` (string, required): The environment id. - `run` (string, required): The run id. ### Response 200 Success - `diff` (PlanDiff): PlanDiff is a plan's full diffs, stored apart from the job. A failed plan uploads one too, carrying its errors and whatever diffs it reached. - `resources` (array of ResourceDiff): Items at most 5000. - At most one of `kubernetes`, `terraform` is set. - `component` (string): Length at most 63. - `resource` (ResourceRef): ResourceRef names one thing a component manages. - Exactly one of `kubernetes`, `terraform` is set. - `kubernetes` (KubernetesResourceRef): KubernetesResourceRef names one Kubernetes object. - `api_version` (string): Length at most 253. - `kind` (string): Length at most 63. - `namespace` (string): Empty for a cluster-scoped object. Length at most 63. - `name` (string): Length at most 253. - `terraform` (TerraformResourceRef): TerraformResourceRef names one Terraform resource instance. - `address` (string): The full address, module path and index included: `module.net.aws_subnet.private["a"]`. Length at most 1024. - `type` (string): Length at most 128. - `provider` (string): The provider's source address: `registry.opentofu.org/hashicorp/aws`. Length at most 256. - `action` (Action): enum.defined_only = true One of `NO_OP`, `CREATE`, `UPDATE`, `REPLACE`, `DESTROY`, `ORPHAN`, `TAKE_OVER`. - `before` (Value): The resource as it is, normalized; absent on a create. - `after` (Value): The resource as the apply leaves it; absent on a destroy. A Kubernetes create carries the whole object. - `sensitive_paths` (array of SensitivePath): Items at most 1000. - `path` (DiffPath): DiffPath is a path into a resource's value. - `segments` (array of DiffPathSegment): Items 1 to 64. - Exactly one of `key`, `index` is set. - `index` (integer (int32)): Value at least 0. - `key` (string): Length at most 1024. - `changed` (boolean) - `unknown_paths` (array of DiffPath): Values in `after` known only once applied. Items at most 1000. - `segments` (array of DiffPathSegment): Items 1 to 64. - Exactly one of `key`, `index` is set. - `index` (integer (int32)): Value at least 0. - `key` (string): Length at most 1024. - `replace_paths` (array of DiffPath): The fields forcing REPLACE. Items at most 1000. - `segments` (array of DiffPathSegment): Items 1 to 64. - Exactly one of `key`, `index` is set. - `index` (integer (int32)): Value at least 0. - `key` (string): Length at most 1024. - `kubernetes` (KubernetesChange): KubernetesChange is what a Kubernetes plan says about an object beyond its values. - `taken_fields` (array of TakenField): The fields another manager owns that the apply takes from it: on TAKE_OVER, and on an update forcing a field away from Helm or kubectl. Items at most 1000. - `manager` (string): The field manager that owns it now: `helm`, `kubectl-client-side-apply`. Length at most 128. - `path` (DiffPath): DiffPath is a path into a resource's value. - `segments` (array of DiffPathSegment): Items 1 to 64. - `terraform` (TerraformChange): TerraformChange is what a Terraform plan says about a resource beyond its values. - `previous_address` (string): Set when a `moved` block or a refactor moved it from this address. Length at most 1024. - `importing` (boolean): Set when an `import` block brings it under management. - `deposed` (string): Set on an old copy a create_before_destroy replace left behind, which the apply destroys. It shares its address with the current object. Length at most 64. - `outputs` (array of OutputChange): The outputs the apply would change. Items at most 5000. - `component` (string): Length at most 63. - `name` (string): Length at most 256. - `action` (Action): enum.defined_only = true One of `NO_OP`, `CREATE`, `UPDATE`, `REPLACE`, `DESTROY`, `ORPHAN`, `TAKE_OVER`. - `before` (Value): Null when sensitive. - `after` (Value): Null when sensitive or unknown until applied. - `sensitive` (boolean) - `unknown` (boolean) - `drifted_resources` (array of ResourceDiff): Changes made outside Admiral since the last apply, found while planning. Items at most 5000. - At most one of `kubernetes`, `terraform` is set. - `component` (string): Length at most 63. - `resource` (ResourceRef): ResourceRef names one thing a component manages. - Exactly one of `kubernetes`, `terraform` is set. - `kubernetes` (KubernetesResourceRef): KubernetesResourceRef names one Kubernetes object. - `api_version` (string): Length at most 253. - `kind` (string): Length at most 63. - `namespace` (string): Empty for a cluster-scoped object. Length at most 63. - `name` (string): Length at most 253. - `terraform` (TerraformResourceRef): TerraformResourceRef names one Terraform resource instance. - `address` (string): The full address, module path and index included: `module.net.aws_subnet.private["a"]`. Length at most 1024. - `type` (string): Length at most 128. - `provider` (string): The provider's source address: `registry.opentofu.org/hashicorp/aws`. Length at most 256. - `action` (Action): enum.defined_only = true One of `NO_OP`, `CREATE`, `UPDATE`, `REPLACE`, `DESTROY`, `ORPHAN`, `TAKE_OVER`. - `before` (Value): The resource as it is, normalized; absent on a create. - `after` (Value): The resource as the apply leaves it; absent on a destroy. A Kubernetes create carries the whole object. - `sensitive_paths` (array of SensitivePath): Items at most 1000. - `path` (DiffPath): DiffPath is a path into a resource's value. - `segments` (array of DiffPathSegment): Items 1 to 64. - Exactly one of `key`, `index` is set. - `index` (integer (int32)): Value at least 0. - `key` (string): Length at most 1024. - `changed` (boolean) - `unknown_paths` (array of DiffPath): Values in `after` known only once applied. Items at most 1000. - `segments` (array of DiffPathSegment): Items 1 to 64. - Exactly one of `key`, `index` is set. - `index` (integer (int32)): Value at least 0. - `key` (string): Length at most 1024. - `replace_paths` (array of DiffPath): The fields forcing REPLACE. Items at most 1000. - `segments` (array of DiffPathSegment): Items 1 to 64. - Exactly one of `key`, `index` is set. - `index` (integer (int32)): Value at least 0. - `key` (string): Length at most 1024. - `kubernetes` (KubernetesChange): KubernetesChange is what a Kubernetes plan says about an object beyond its values. - `taken_fields` (array of TakenField): The fields another manager owns that the apply takes from it: on TAKE_OVER, and on an update forcing a field away from Helm or kubectl. Items at most 1000. - `manager` (string): The field manager that owns it now: `helm`, `kubectl-client-side-apply`. Length at most 128. - `path` (DiffPath): DiffPath is a path into a resource's value. - `segments` (array of DiffPathSegment): Items 1 to 64. - `terraform` (TerraformChange): TerraformChange is what a Terraform plan says about a resource beyond its values. - `previous_address` (string): Set when a `moved` block or a refactor moved it from this address. Length at most 1024. - `importing` (boolean): Set when an `import` block brings it under management. - `deposed` (string): Set on an old copy a create_before_destroy replace left behind, which the apply destroys. It shares its address with the current object. Length at most 64. - `errors` (array of PlanError): Why the plan failed, every reason it found. For Kubernetes, every verb the agent may not use on an object the plan touches, found before it diffs. For Terraform, every error diagnostic the engine produced, as it produced it. Items at most 5000. - `component` (string): Length at most 63. - `resource` (ResourceRef): The resource it concerns. Absent for one about the component as a whole, such as a provider that could not authenticate. - Exactly one of `kubernetes`, `terraform` is set. - `kubernetes` (KubernetesResourceRef): KubernetesResourceRef names one Kubernetes object. - `api_version` (string): Length at most 253. - `kind` (string): Length at most 63. - `namespace` (string): Empty for a cluster-scoped object. Length at most 63. - `name` (string): Length at most 253. - `terraform` (TerraformResourceRef): TerraformResourceRef names one Terraform resource instance. - `address` (string): The full address, module path and index included: `module.net.aws_subnet.private["a"]`. Length at most 1024. - `type` (string): Length at most 128. - `provider` (string): The provider's source address: `registry.opentofu.org/hashicorp/aws`. Length at most 256. - `summary` (string): Length at most 1024. - `detail` (string): Length at most 16384. - `location` (string): Where in the code it points, `file:line`, for an error the engine ties to the code rather than to a resource. Length at most 1024.