v50

latestOpenAPI 3.0.3MITraw.githubusercontent.com2023-07-147873273.9 MB
actions

Get a job for a workflow run

Gets a specific job in 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.

get/repos/{owner}/{repo}/actions/jobs/{job_id}

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.

job_idinteger required

The unique identifier of the job.

Response

Response

idinteger required

The id of the job.

run_idinteger required

The id of the associated workflow run.

run_urlstring required
run_attemptinteger

Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run.

node_idstring required
head_shastring required

The SHA of the commit that is being run.

urlstring required
html_urlstring nullable required
status'queued' | 'in_progress' | 'completed' required

The phase of the lifecycle that the job is currently in.

conclusion'success' | 'failure' | 'neutral' | 'cancelled' | 'skipped' | 'timed_out' | 'action_required' nullable required

The outcome of the job.

started_atstring date-time required

The time that the job started, in ISO 8601 format.

completed_atstring date-time nullable required

The time that the job finished, in ISO 8601 format.

namestring required

The name of the job.

check_run_urlstring required
labelsstring[] required

Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file.

runner_idinteger nullable required

The ID of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.)

runner_namestring nullable required

The name of the runner to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.)

runner_group_idinteger nullable required

The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.)

runner_group_namestring nullable required

The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.)

Example response

{
  "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"
}