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

# GetWorkflow

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

## Request

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

Returns a workflow's identity, status, timestamps, parent run context, execution history, and nested jobs and attempts.

## Headers

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

## Request body

- DepotCiV1GetWorkflowRequest
  - `workflowId` string, required: Unique identifier for the workflow. Returned by `GetRunStatus` and `ListWorkflows`.

## Response `200`

Success

- DepotCiV1GetWorkflowResponse
  - `orgId` string: Depot organization that owns this workflow.
  - `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 workflow.
  - `workflowName` string: 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: 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 workflow. Can be "queued", "running", "finished", "failed", or "cancelled".
  - `workflowErrorMessage` string: Workflow error or cancellation reason. For example, a compilation or validation error. Empty when the workflow is healthy.
  - `workflowCreatedAt` string: Workflow creation time, in RFC 3339 format.
  - `workflowStartedAt` string: Workflow start time, in RFC 3339 format. Empty until the workflow starts.
  - `workflowFinishedAt` string: Workflow finish time, in RFC 3339 format. Empty until the workflow finishes.
  - `executions` DepotCiV1GetWorkflowExecution[]: Workflow-level execution records; each re-run creates another execution.
    - `executionId` string: Unique identifier for the workflow execution.
    - `execution` integer: Execution number, starting at 1 for the first execution.
    - `status` string: Current state of the execution. Can be "queued", "running", "finished", "failed", or "cancelled".
    - `createdAt` string: Execution creation time, in RFC 3339 format.
    - `startedAt` string: Execution start time, in RFC 3339 format. Empty until the execution starts.
    - `finishedAt` string: Execution finish time, in RFC 3339 format. Empty until the execution finishes.
  - `jobs` DepotCiV1GetWorkflowJob[]: Workflow jobs and their per-job attempts.
    - `jobId` string: Unique identifier for the job.
    - `jobKey` string: Job key from the workflow. For example, "build" or "test".
    - `status` 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.
    - `startedAt` string: Job start time, in RFC 3339 format. Empty until the job starts.
    - `finishedAt` string: Job finish time, in RFC 3339 format. Empty until the job finishes.
    - `attempts` DepotCiV1GetWorkflowJobAttempt[]: Per-job attempts, not workflow execution records.
      - `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".
      - `sandboxId` string: Unique identifier for the sandbox currently running this attempt, when one exists.
      - `sessionId` string: Unique identifier for the interactive session attached to that sandbox, when one is available.
      - `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.
    - `jobDisplayName` string: Resolved job name for display. Falls back to the leaf job name, then `jobKey`, when unavailable. Use `jobId` or `jobKey` to identify the job.
    - `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.

## 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)
