--- title: "Retrieve a job" canonical: "https://admiral.io/docs/api/jobs/JobAPI_GetJob" --- # Retrieve a job `GET https://api.admiral.io/v1/jobs/{job_id}` Scope: `agent:read` ### Path parameters - `job_id` (string, required): The job_id path parameter. Pattern `^job-[0-9a-z]+$`. ### Response 200 Success - `job` (Job) - `id` (string): Pattern `^job-[0-9a-z]+$`. Read-only. - `kind` (JobKind): One of `JOB_KIND_UNSPECIFIED`, `JOB_KIND_PROBE`, `JOB_KIND_PLAN`, `JOB_KIND_APPLY`. - `status` (JobStatus): One of `JOB_STATUS_UNSPECIFIED`, `JOB_STATUS_QUEUED`, `JOB_STATUS_OFFERED`, `JOB_STATUS_RUNNING`, `JOB_STATUS_SUCCEEDED`, `JOB_STATUS_FAILED`, `JOB_STATUS_CANCELLED`. - `agent_id` (string): Pattern `^agt-[0-9a-z]+$`. Read-only. - `environment_id` (string): Pattern `^env-[0-9a-z]+$`. Read-only. - `run_id` (string): The run this job plans or applies; empty for a PROBE. Pattern `^run-[0-9a-z]+$`. Read-only. - `assignment_id` (string): The environment assignment it runs on, and the components it covers. Pattern `^asg-[0-9a-z]+$`. Read-only. - `components` (array of string) - `profile` (string): The profile the agent loads for this job, resolved for its phase from the assignment; `default` when the assignment names none. The job starts with a clean environment holding only this profile. - `artifact_digest` (string): `sha256:` of the artifact the job runs. - `attempt` (integer (int32)) - `wait_reason` (WaitReason): Set while QUEUED. One of `WAIT_REASON_UNSPECIFIED`, `WAIT_REASON_NO_AGENT_ASSIGNED`, `WAIT_REASON_AGENT_NOT_GRANTED`, `WAIT_REASON_AGENT_OFFLINE`, `WAIT_REASON_AGENT_AT_CAPACITY`, `WAIT_REASON_AGENT_TOO_OLD`, `WAIT_REASON_ENVIRONMENT_BUSY`, `WAIT_REASON_BACKOFF`, `WAIT_REASON_PROVIDER_PENDING`, `WAIT_REASON_PROFILE_MISSING`, `WAIT_REASON_COMPONENT_NOT_ALLOWED`. - `result` (JobResult) - `status` (JobStatus): SUCCEEDED, FAILED or CANCELLED. One of `JOB_STATUS_SUCCEEDED`, `JOB_STATUS_FAILED`, `JOB_STATUS_CANCELLED`. - `message` (string) - `steps` (array of Step) - `component` (string) - `status` (JobStatus): enum.defined_only = true One of `JOB_STATUS_UNSPECIFIED`, `JOB_STATUS_QUEUED`, `JOB_STATUS_OFFERED`, `JOB_STATUS_RUNNING`, `JOB_STATUS_SUCCEEDED`, `JOB_STATUS_FAILED`, `JOB_STATUS_CANCELLED`. - `message` (string) - `plan` (PlanResult): Set by a PLAN. - `components` (array of ComponentPlan): Items at most 256. - `component` (string): Length at most 63. - `changes` (array of ResourceChange): Items at most 5000. - `resource` (ResourceRef): ResourceRef names one Kubernetes object. - `action` (Action): enum.defined_only = true One of `ACTION_NO_OP`, `ACTION_CREATE`, `ACTION_UPDATE`, `ACTION_REPLACE`, `ACTION_DESTROY`, `ACTION_ORPHAN`. - `diff_digest` (string): `sha256:` of this resource's diff in the PlanDiff. Empty for ACTION_NO_OP. Length at most 71. - `diff_digest` (string): `sha256:` of the PlanDiff uploaded for this attempt. Length at most 71. - `inventory` (array of ComponentInventory): Set by an APPLY: what each component it reached left in the cluster, including one that failed partway. - `component` (string) - `resources` (array of ResourceRef) - `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. - `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. - `started_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. - `finished_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.