Skip to main content

workflow_runs

Overview

Nameworkflow_runs
TypeResource
Idgithub.actions.workflow_runs

Fields

NameDatatypeDescription
idintegerThe ID of the workflow run.
namestringThe name of the workflow run.
actorobjectA GitHub user.
artifacts_urlstringThe URL to the artifacts for the workflow run.
cancel_urlstringThe URL to cancel the workflow run.
check_suite_idintegerThe ID of the associated check suite.
check_suite_node_idstringThe node ID of the associated check suite.
check_suite_urlstringThe URL to the associated check suite.
conclusionstring
created_atstring
display_titlestringThe event-specific title associated with the run or the run-name if set, or the value of run-name if it is set in the workflow.
eventstring
head_branchstring
head_commitobjectA commit.
head_repositoryobjectMinimal Repository
head_repository_idinteger
head_shastringThe SHA of the head commit that points to the version of the workflow being run.
html_urlstring
jobs_urlstringThe URL to the jobs for the workflow run.
logs_urlstringThe URL to download the logs for the workflow run.
node_idstring
pathstringThe full path of the workflow
previous_attempt_urlstringThe URL to the previous attempted run of this workflow, if one exists.
pull_requestsarrayPull requests that are open with a head_sha or head_branch that matches the workflow run. The returned pull requests do not necessarily indicate pull requests that triggered the run.
referenced_workflowsarray
repositoryobjectMinimal Repository
rerun_urlstringThe URL to rerun the workflow run.
run_attemptintegerAttempt number of the run, 1 for first attempt and higher if the workflow was re-run.
run_numberintegerThe auto incrementing run number for the workflow run.
run_started_atstringThe start time of the latest run. Resets on re-run.
statusstring
triggering_actorobjectA GitHub user.
updated_atstring
urlstringThe URL to the workflow run.
workflow_idintegerThe ID of the parent workflow.
workflow_urlstringThe URL to the workflow.

Methods

NameAccessible byRequired ParamsDescription
get_workflow_runSELECTowner, repo, run_idGets a specific 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_workflow_run_attemptSELECTattempt_number, owner, repo, run_idGets a specific workflow run attempt. 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.
list_workflow_runsSELECTowner, repo, workflow_idList all workflow runs for a workflow. You can replace workflow_id with the workflow file name. For example, you could use main.yaml. 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. If the repository is private you must use an access token with the repo scope.
list_workflow_runs_for_repoSELECTowner, repoLists all workflow runs for a repository. 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. 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.
delete_workflow_runDELETEowner, repo, run_idDelete a specific workflow run. Anyone with write 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:write permission to use
this endpoint.
approve_workflow_runEXECowner, repo, run_idApproves a workflow run for a pull request from a public fork of a first time contributor. For more information, see "Approving workflow runs from public forks."

You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint.
cancel_workflow_runEXECowner, repo, run_idCancels a workflow run using its id.

You must authenticate using an access token with the repo scope to use this endpoint.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the actions:write permission to use this endpoint.
re_run_job_for_workflow_runEXECjob_id, owner, repoRe-run a job and its dependent jobs in a workflow run.

You must authenticate using an access token with the repo scope to use this endpoint.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the actions:write permission to use this endpoint.
re_run_workflowEXECowner, repo, run_idRe-runs your workflow run using its id. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint.
re_run_workflow_failed_jobsEXECowner, repo, run_idRe-run all of the failed jobs and their dependent jobs in a workflow run using the id of the workflow run. You must authenticate using an access token with the repo scope to use this endpoint.
review_custom_gates_for_runEXECowner, repo, run_id, data__comment, data__environment_nameApprove or reject custom deployment protection rules provided by a GitHub App for a workflow run. For more information, see "Using environments for deployment."

Note: GitHub Apps can only review their own custom deployment protection rules.
To approve or reject pending deployments that are waiting for review from a specific person or team, see POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments.

If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have read and write permission for Deployments to use this endpoint.