Skip to main content

workflow_jobs

Creates, updates, deletes, gets or lists a workflow_jobs resource.

Overview

Nameworkflow_jobs
TypeResource
Idgithub.actions.workflow_jobs

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
jobsarray
total_countinteger

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_jobs_for_workflow_run_attemptselectowner, repo, run_id, attempt_numberper_page, pageLists jobs for a specific workflow run attempt. 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_job_for_workflow_runselectowner, repo, job_idGets a specific job in a workflow run.

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

If the repository is private, OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.
list_jobs_for_workflow_runselectowner, repo, run_idfilter, per_page, pageLists 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
attempt_numberintegerThe attempt number of the workflow run.
job_idintegerThe unique identifier of the job.
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.
run_idintegerThe unique identifier of the workflow run.
filterstringFilters 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.
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

Lists jobs for a specific workflow run attempt. 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.

SELECT
jobs,
total_count
FROM github.actions.workflow_jobs
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND run_id = '{{ run_id }}' -- required
AND attempt_number = '{{ attempt_number }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;