# List jobs for a workflow run

From **GitHub v3 REST API**.

`GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs`

Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.0/rest/overview/resources-in-the-rest-api#parameters).

## Parameters

### `owner`

- Location: path
- Required: true
- Type: `string`

### `repo`

- Location: path
- Required: true
- Type: `string`

### `run_id`

- Location: path
- Required: true
- Type: `integer`

The id of the workflow run.

### `filter`

- Location: query
- Required: false
- Type: `string`
- Default: `latest`
- Allowed values: `"latest"`, `"all"`

Filters jobs by their `completed_at` timestamp. Can be one of:  
\* `latest`: Returns jobs from the most recent execution of the workflow run.  
\* `all`: Returns all jobs for a workflow run, including from old executions of the workflow run.

### `per_page`

- Location: query
- Required: false
- Type: `integer`
- Default: `30`

Results per page (max 100)

### `page`

- Location: query
- Required: false
- Type: `integer`
- Default: `1`

Page number of the results to fetch.

## Responses

### `200`

Response

#### Headers

##### `Link`

- Type: `string`

- Example: `<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"`

### `application/json`

- Type: `object`

```json
{
  "jobs": [
    {
      "check_run_url": "https://api.github.com/repos/octo-org/octo-repo/check-runs/399444496",
      "completed_at": "2020-01-20T17:44:39Z",
      "conclusion": "success",
      "head_sha": "f83a356604ae3c5d03e1b46ef4d1ca77d64a90b0",
      "html_url": "https://github.com/octo-org/octo-repo/runs/399444496",
      "id": 399444496,
      "name": "build",
      "node_id": "MDEyOldvcmtmbG93IEpvYjM5OTQ0NDQ5Ng==",
      "run_id": 29679449,
      "run_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/29679449",
      "started_at": "2020-01-20T17:42:40Z",
      "status": "completed",
      "steps": [
        {
          "completed_at": "2020-01-20T09:42:41.000-08:00",
          "conclusion": "success",
          "name": "Set up job",
          "number": 1,
          "started_at": "2020-01-20T09:42:40.000-08:00",
          "status": "completed"
        },
        {
          "completed_at": "2020-01-20T09:42:45.000-08:00",
          "conclusion": "success",
          "name": "Run actions/checkout@v2",
          "number": 2,
          "started_at": "2020-01-20T09:42:41.000-08:00",
          "status": "completed"
        },
        {
          "completed_at": "2020-01-20T09:42:45.000-08:00",
          "conclusion": "success",
          "name": "Set up Ruby",
          "number": 3,
          "started_at": "2020-01-20T09:42:45.000-08:00",
          "status": "completed"
        },
        {
          "completed_at": "2020-01-20T09:42:48.000-08:00",
          "conclusion": "success",
          "name": "Run actions/cache@v2",
          "number": 4,
          "started_at": "2020-01-20T09:42:45.000-08:00",
          "status": "completed"
        },
        {
          "completed_at": "2020-01-20T09:42:52.000-08:00",
          "conclusion": "success",
          "name": "Install Bundler",
          "number": 5,
          "started_at": "2020-01-20T09:42:48.000-08:00",
          "status": "completed"
        },
        {
          "completed_at": "2020-01-20T09:42:53.000-08:00",
          "conclusion": "success",
          "name": "Install Gems",
          "number": 6,
          "started_at": "2020-01-20T09:42:52.000-08:00",
          "status": "completed"
        },
        {
          "completed_at": "2020-01-20T09:42:59.000-08:00",
          "conclusion": "success",
          "name": "Run Tests",
          "number": 7,
          "started_at": "2020-01-20T09:42:53.000-08:00",
          "status": "completed"
        },
        {
          "completed_at": "2020-01-20T09:44:39.000-08:00",
          "conclusion": "success",
          "name": "Deploy to Heroku",
          "number": 8,
          "started_at": "2020-01-20T09:42:59.000-08:00",
          "status": "completed"
        },
        {
          "completed_at": "2020-01-20T09:44:39.000-08:00",
          "conclusion": "success",
          "name": "Post actions/cache@v2",
          "number": 16,
          "started_at": "2020-01-20T09:44:39.000-08:00",
          "status": "completed"
        },
        {
          "completed_at": "2020-01-20T09:44:39.000-08:00",
          "conclusion": "success",
          "name": "Complete job",
          "number": 17,
          "started_at": "2020-01-20T09:44:39.000-08:00",
          "status": "completed"
        }
      ],
      "url": "https://api.github.com/repos/octo-org/octo-repo/actions/jobs/399444496"
    }
  ],
  "total_count": 1
}
```

```json
{"properties":{"jobs":{"items":{"$ref":"#/components/schemas/job"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","jobs"],"type":"object"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/repos/{owner}/{repo}/actions/runs/{run_id}/jobs
```
