> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crewship.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# List Runs

> List runs for a deployment

## Query Parameters

<ParamField query="deployment_id" type="string" required>
  Deployment ID to list runs for
</ParamField>

## Response

<ResponseField name="runs" type="array">
  Array of run objects
</ResponseField>

Each run object contains:

<ResponseField name="runs[].id" type="string">
  Run ID
</ResponseField>

<ResponseField name="runs[].version_id" type="string">
  Version ID
</ResponseField>

<ResponseField name="runs[].version_number" type="integer">
  Version number
</ResponseField>

<ResponseField name="runs[].status" type="string">
  Run status: `pending`, `running`, `succeeded`, `failed`, `canceled`
</ResponseField>

<ResponseField name="runs[].created_at" type="string">
  When the run was created (ISO 8601)
</ResponseField>

<ResponseField name="runs[].started_at" type="string">
  When execution started (ISO 8601), or `null`
</ResponseField>

<ResponseField name="runs[].completed_at" type="string">
  When the run finished (ISO 8601), or `null`
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.crewship.dev/v1/runs?deployment_id=dep_abc123xyz" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "runs": [
      {
        "id": "run_xyz789abc",
        "version_id": "ver_abc123xyz",
        "version_number": 3,
        "status": "succeeded",
        "created_at": "2024-01-15T10:35:00Z",
        "started_at": "2024-01-15T10:35:02Z",
        "completed_at": "2024-01-15T10:35:47Z"
      },
      {
        "id": "run_def456ghi",
        "version_id": "ver_abc123xyz",
        "version_number": 3,
        "status": "succeeded",
        "created_at": "2024-01-15T09:20:00Z",
        "started_at": "2024-01-15T09:20:01Z",
        "completed_at": "2024-01-15T09:21:12Z"
      }
    ]
  }
  ```
</ResponseExample>
