actions

List jobs for a workflow run

Changed on

Lists jobs for a workflow run. You can use parameters to narrow the list of results. For more information about using parameters, see Parameters.

Anyone with read access to the repository can use this endpoint.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with a private repository.

get/repos/{owner}/{repo}/actions/runs/{run_id}/jobs

Request

  • Base URL: http://HOSTNAME/api/v3
  • URL: http://HOSTNAME/api/v3/repos/{owner}/{repo}/actions/runs/{run_id}/jobs
  • Auth: none declared

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

run_idinteger required

The unique identifier of the workflow run.

Query parameters

filter'latest' | 'all'

Filters jobs by their completed_at timestamp. 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_pageinteger

The number of results per page (max 100). For more information, see "Using pagination in the REST API."

pageinteger

The page number of the results to fetch. For more information, see "Using pagination in the REST API."

Response

Response

total_countinteger required

Example response

{
  "jobs": [
    {
      "id": 21,
      "run_id": 5,
      "run_url": "https://api.github.com/repos/github/hello-world/actions/runs/5",
      "run_attempt": 1,
      "node_id": "MDg6Q2hlY2tSdW40",
      "head_sha": "009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d",
      "url": "https://api.github.com/repos/github/hello-world/actions/jobs/21",
      "html_url": "https://github.com/github/hello-world/runs/4",
      "status": "queued",
      "conclusion": "success",
      "started_at": "2019-08-08T08:00:00-07:00",
      "completed_at": "2019-08-08T08:00:00-07:00",
      "name": "test-coverage",
      "steps": [
        {
          "status": "queued",
          "conclusion": "success",
          "name": "test-coverage",
          "number": 1,
          "started_at": "2019-08-08T08:00:00-07:00",
          "completed_at": "2019-08-08T08:00:00-07:00"
        }
      ],
      "check_run_url": "https://api.github.com/repos/github/hello-world/check-runs/4",
      "labels": [
        "self-hosted",
        "foo",
        "bar"
      ],
      "runner_id": 1,
      "runner_name": "my runner",
      "runner_group_id": 2,
      "runner_group_name": "my runner group",
      "workflow_name": "Build",
      "head_branch": "main"
    }
  ]
}

Changes

    • warning

      added the new pending enum value to the // response property for the response status

    • warning

      added the new requested enum value to the // response property for the response status

    • warning

      added the new waiting enum value to the // response property for the response status