---
title: "GetJob"
method: POST
path: "/depot.ci.v1.CIService/GetJob"
tags: ["CIService"]
---

# GetJob

`POST /depot.ci.v1.CIService/GetJob`

## Request

- Base URL: `https://api.depot.dev`
- URL: `https://api.depot.dev/depot.ci.v1.CIService/GetJob`
- Auth: HTTP bearer

Returns a job's identity, status, timestamps, runner configuration, parent run and workflow context, dependencies, and attempt history.

## Headers

- `Connect-Protocol-Version` 1, required: Define the version of the Connect protocol
- `Connect-Timeout-Ms` number: Define the timeout, in ms

## Request body

- DepotCiV1GetJobRequest
  - `jobId` string, required: Unique identifier for the job. Returned by `GetRunStatus` and `GetWorkflow`.

## Response `200`

Success

- DepotCiV1GetJobResponse
  - `orgId` string: Depot organization that owns this job.
  - `runId` string: Unique identifier for the parent CI run.
  - `repo` string: GitHub repository in `owner/name` format. For example, "depot/cli".
  - `ref` string: Git ref the parent run was triggered against. Empty when the trigger carries no ref.
  - `sha` string: Commit SHA the parent run executes against. For pull_request triggers, the merge commit SHA.
  - `headSha` string: Source commit SHA for pull_request and merge_group triggers. Empty for triggers that don't carry a head SHA.
  - `trigger` string: Event that triggered the parent run. For example, "push", "pull_request", "pull_request_target", "issue_comment", "merge_group", "schedule", "workflow_run", or "workflow_dispatch".
  - `runStatus` string: Current state of the parent run. Can be "queued", "running", "finished", "failed", or "cancelled".
  - `runCreatedAt` string: Parent run creation time, in RFC 3339 format.
  - `runStartedAt` string: Parent run start time, in RFC 3339 format. Empty until the run starts.
  - `runFinishedAt` string: Parent run finish time, in RFC 3339 format. Empty until the run finishes.
  - `workflowId` string: Unique identifier for the parent workflow.
  - `workflowName` string: Parent workflow name from the YAML `name:` key. Falls back to the file path stem when the workflow doesn't set `name:`. Empty when neither is available.
  - `workflowPath` string: Parent workflow file path. For example, ".depot/workflows/ci.yml". Empty when the workflow YAML was passed via `workflowContent` in the `Run` request.
  - `workflowStatus` string: Current state of the parent workflow. Can be "queued", "running", "finished", "failed", or "cancelled".
  - `workflowErrorMessage` string: Parent workflow error or cancellation reason. For example, a compilation or validation error. Empty when the workflow is healthy.
  - `workflowCreatedAt` string: Parent workflow creation time, in RFC 3339 format.
  - `workflowStartedAt` string: Parent workflow start time, in RFC 3339 format. Empty until the workflow starts.
  - `workflowFinishedAt` string: Parent workflow finish time, in RFC 3339 format. Empty until the workflow finishes.
  - `jobId` string: Unique identifier for the job.
  - `jobKey` string: Job key from the workflow. For example, "build" or "test".
  - `jobDisplayName` string: Human-readable display name from the workflow. Falls back to `jobKey` when no display name is set.
  - `jobStatus` string: Current state of the job. Can be "queued", "waiting", "running", "finished", "failed", "cancelled", or "skipped". "waiting" means the job is blocked behind another run that holds the same `concurrency:` group slot.
  - `jobConclusion` string: Conclusion of the job. Can be "success", "failure", "cancelled", "skipped", or "timed_out". Empty until the job concludes.
  - `jobErrorMessage` string: Job error message populated for orchestration or worker failures. Empty when the job has no error.
  - `jobCreatedAt` string: Job creation time, in RFC 3339 format.
  - `jobDispatchedAt` string: Job dispatch time, in RFC 3339 format. Empty until the job is dispatched to a worker.
  - `jobStartedAt` string: Job start time, in RFC 3339 format. Empty until the job starts.
  - `jobFinishedAt` string: Job finish time, in RFC 3339 format. Empty until the job finishes.
  - `currentAttemptId` string: Unique identifier for the most recent attempt for this job. Empty until the first attempt is dispatched, and cleared while a retried job waits for its next attempt to be dispatched.
  - `currentAttempt` integer: Most recent attempt number for this job. Zero until the first attempt is dispatched.
  - `matrix` DepotCiV1JobDetailMatrixValue[]: Matrix key/value pairs for this job instance. Empty when the job is not part of a matrix strategy.
    - `key` string: Matrix dimension name. For example, "os" or "node-version".
    - `value` string: Matrix dimension value for this job instance, serialized as a string.
  - `strategy` DepotCiV1JobDetailStrategy
    - `jobIndex` integer: Zero-based index of this job within the matrix expansion.
    - `jobTotal` integer: Total number of jobs produced by the matrix expansion.
  - `runsOn` DepotCiV1JobDetailRunsOn
    - `labels` string[]: Runner labels specified on the job's `runs-on`.
    - `image` string: Container image used for the job, when one is configured. Empty otherwise.
    - `cpus` integer: CPU count allocated to the runner. Zero when unset.
    - `memoryGb` integer: Memory allocated to the runner, in gigabytes. Zero when unset.
    - `size` string: Runner size from the job's `runs-on`, exactly as written in the workflow. Set whenever the runner config used a `${{ }}` expression in its size or image. The value is usually an expression like "${{ vars.RUNNER_SIZE }}", but can be a literal like "4x16" when only the image was the expression. In that case `cpus` and `memoryGb` are zero and stay zero for the life of the job, so this is the only runner-size value the API reports for it. Empty when the size was a plain literal with no expressions, in which case `cpus` and `memoryGb` carry the resolved values instead.
  - `dependencies` DepotCiV1JobDetailDependency[]: Jobs this job depends on. Contains every dependency when the job has 100 or fewer; for jobs with more, a preview of 100 entries that prioritizes failed and cancelled dependencies.
    - `jobId` string: Unique identifier for the dependency job.
    - `jobKey` string: Job key from the workflow. For example, "build" or "test".
    - `jobDisplayName` string: Human-readable display name from the workflow. Falls back to `jobKey` when no display name is set.
    - `status` string: Current state of the dependency job. Can be "queued", "waiting", "running", "finished", "failed", "cancelled", or "skipped". "waiting" means the job is blocked behind another run that holds the same `concurrency:` group slot.
    - `conclusion` string: Conclusion of the dependency job. Can be "success", "failure", "cancelled", "skipped", or "timed_out". Empty until the job concludes.
    - `errorMessage` string: Dependency job error message populated for orchestration or worker failures. Empty when the job has no error.
    - `createdAt` string: Dependency job creation time, in RFC 3339 format.
    - `dispatchedAt` string: Dependency job dispatch time, in RFC 3339 format. Empty until the job is dispatched to a worker.
    - `startedAt` string: Dependency job start time, in RFC 3339 format. Empty until the job starts.
    - `finishedAt` string: Dependency job finish time, in RFC 3339 format. Empty until the job finishes.
  - `attempts` DepotCiV1JobDetailAttempt[]: Attempt history for this job, ordered by attempt number ascending.
    - `attemptId` string: Unique identifier for the job attempt.
    - `attempt` integer: Attempt number, starting at 1 for the first run.
    - `status` string: Current state of the attempt. Can be "queued", "waiting", "running", "finished", "failed", or "cancelled".
    - `conclusion` string: Conclusion of the attempt. Can be "success", "failure", "cancelled", "skipped", or "timed_out". Empty until the attempt concludes.
    - `errorMessage` string: Attempt error message populated for orchestration or worker failures. Empty when the attempt has no error.
    - `sandboxId` string: Unique identifier for the sandbox that ran this attempt, when one exists.
    - `sessionId` string: Unique identifier for the interactive session attached to that sandbox, when one is available.
    - `createdAt` string: Attempt creation time, in RFC 3339 format.
    - `dispatchedAt` string: Attempt dispatch time, in RFC 3339 format. Empty until the attempt is dispatched to a worker.
    - `startedAt` string: Attempt start time, in RFC 3339 format. Empty until the attempt starts.
    - `finishedAt` string: Attempt finish time, in RFC 3339 format. Empty until the attempt finishes.
    - `isCurrent` boolean: True when this attempt is the job's current attempt.
  - `dependencyCount` integer, nullable: Total number of dependencies. Set only when `dependencies` is a capped preview.
  - `dependencyPreviewLimit` integer, nullable: Maximum number of entries returned in `dependencies`. Set only when `dependencies` is a capped preview.
  - `snapshotRef` string: Immutable snapshot image reference resolved for this job. Empty when the job is not a snapshot producer or the resolved ref is not available.
  - `snapshotCached` boolean, nullable: True when the snapshot producer used an existing snapshot instead of running setup work. Unset when the job is not a snapshot producer or the resolved ref is not available.
  - `waitingReason` string: Reason a queued job is waiting. "timer" means it will become eligible at `waitUntil`. Empty otherwise.
  - `waitUntil` string: Time the job's configured delay ends, in RFC 3339 format. Empty when the job is not waiting on a timer.
  - `inputRequest` DepotCiV1JobInputRequest
    - `text` string: Resolved question presented to the responder.
    - `fields` DepotCiV1JobInputField[]: Controls in presentation order.
      - `id` string: Identifier used as the key in the submitted answer.
      - `type` string: Control type. Can be "select" or "buttons".
      - `label` string: Display label. Empty when the control has no label.
      - `options` DepotCiV1JobInputOption[]: Available choices in presentation order.
        - `label` string: Human-readable choice label.
        - `value` string: Value submitted when the choice is selected.
    - `answer` DepotCiV1JobInputAnswer
      - `fields` object: Submitted values keyed by control identifier.
      - `userId` string: Identifier of the authenticated responder in the source channel.
      - `answeredAt` string: Acceptance time, in RFC 3339 format. Empty for older responses.
      - `channel` string: Channel through which the answer was submitted. Can be "web" or "slack".
    - `deadline` string: Response deadline, in RFC 3339 format.
    - `attemptId` string: Unique identifier for the attempt that requested input.

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/depot/apis/depot-ci-api.md) - [All operations](https://skmtc.dev/depot/apis/depot-ci-api/llms.txt) - [OpenAPI document](https://skmtc.dev/depot/apis/depot-ci-api/revisions/6cf759b535b4?raw)
