Use the REST API to interact with workflow runs in GitHub Actions.
You can use the REST API to view, re-run, cancel, and view logs for workflow runs in GitHub Actions. A workflow run is an instance of your workflow that runs when the pre-configured event occurs. For more information, see Managing workflow runs.
Note
Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.
POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun
Re-run a job and its dependent jobs in a workflow run.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
job_id (integer) (required)
The unique identifier of the job.
enable_debug_logging (boolean)
Whether to enable debug logging for the re-run.
Default: false
enable_debugger (boolean)
Whether to enable the debugger for the re-run of this job.
Default: false
201 - Created
403 - Forbidden
Request:
curl -L \
-X POST \
https://api.github.com/repos/OWNER/REPO/actions/jobs/JOB_ID/rerun
Response schema (Status: 201):
GET /repos/{owner}/{repo}/actions/runs
Lists 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.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with a private repository.
This endpoint will return up to 1,000 results for each search when using the following parameters: actor, branch, check_suite_id, created, event, head_sha, status.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
actor (string)
Returns someone's workflow runs. Use the login for the user who created the push associated with the check suite or workflow run.
branch (string)
Returns workflow runs associated with a branch. Use the name of the branch of the push.
event (string)
Returns workflow run triggered by the event you specify. For example, push, pull_request or issue. For more information, see "Events that trigger workflows."
status (string)
Returns workflow runs with the check run status or conclusion that you specify. For example, a conclusion can be success or a status can be in_progress. Only GitHub Actions can set a status of waiting, pending, or requested.
Can be one of: completed, action_required, cancelled, failure, neutral, skipped, stale, success, timed_out, in_progress, queued, requested, waiting, pending
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
created (string)
Returns workflow runs created within the given date-time range. For more information on the syntax, see "Understanding the search syntax."
exclude_pull_requests (boolean)
If true pull requests are omitted from the response (empty array).
Default: false
check_suite_id (integer)
Returns workflow runs with the check_suite_id that you specify.
head_sha (string)
Only returns workflow runs that are associated with the specified head_sha.
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/actions/runs
Response schema (Status: 200):
total_count: required, integerworkflow_runs: required, array of Workflow Run:
id: required, integer, format: int64name: string or nullnode_id: required, stringcheck_suite_id: integer, format: int64check_suite_node_id: stringhead_branch: required, string or nullhead_sha: required, stringpath: required, stringrun_number: required, integerrun_attempt: integerreferenced_workflows: array of Referenced workflow or null:
path: required, stringsha: required, stringref: stringevent: required, stringstatus: required, string or nullconclusion: required, string or nullworkflow_id: required, integerurl: required, stringhtml_url: required, stringpull_requests: required, array of Pull Request Minimal or null:
id: required, integer, format: int64number: required, integerurl: required, stringhead: required, object:
ref: required, stringsha: required, stringrepo: required, object:
id: required, integer, format: int64url: required, stringname: required, stringbase: required, object:
ref: required, stringsha: required, stringrepo: required, object:
id: required, integer, format: int64url: required, stringname: required, stringcreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timeactor: Simple User:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringtriggering_actor: Simple User (see above)run_started_at: string, format: date-timejobs_url: required, stringlogs_url: required, stringcheck_suite_url: required, stringartifacts_url: required, stringcancel_url: required, stringrerun_url: required, stringprevious_attempt_url: string or nullworkflow_url: required, stringhead_commit: required, any of:
id: required, stringtree_id: required, stringmessage: required, stringtimestamp: required, string, format: date-timeauthor: required, object or null:
name: required, stringemail: required, string, format: emailcommitter: required, object or null:
name: required, stringemail: required, string, format: emailrepository: required, Minimal Repository:
id: required, integer, format: int64node_id: required, stringname: required, stringfull_name: required, stringowner: required, Simple User (see above)private: required, booleanhtml_url: required, string, format: uridescription: required, string or nullfork: required, booleanurl: required, string, format: uriarchive_url: required, stringassignees_url: required, stringblobs_url: required, stringbranches_url: required, stringcollaborators_url: required, stringcomments_url: required, stringcommits_url: required, stringcompare_url: required, stringcontents_url: required, stringcontributors_url: required, string, format: urideployments_url: required, string, format: uridownloads_url: required, string, format: urievents_url: required, string, format: uriforks_url: required, string, format: urigit_commits_url: required, stringgit_refs_url: required, stringgit_tags_url: required, stringgit_url: stringissue_comment_url: required, stringissue_events_url: required, stringissues_url: required, stringkeys_url: required, stringlabels_url: required, stringlanguages_url: required, string, format: urimerges_url: required, string, format: urimilestones_url: required, stringnotifications_url: required, stringpulls_url: required, stringreleases_url: required, stringssh_url: stringstargazers_url: required, string, format: uristatuses_url: required, stringsubscribers_url: required, string, format: urisubscription_url: required, string, format: uritags_url: required, string, format: uriteams_url: required, string, format: uritrees_url: required, stringclone_url: stringmirror_url: string or nullhooks_url: required, string, format: urisvn_url: stringhomepage: string or nulllanguage: string or nullforks_count: integerstargazers_count: integerwatchers_count: integersize: integerdefault_branch: stringopen_issues_count: integeris_template: booleantopics: array of stringhas_issues: booleanhas_projects: booleanhas_wiki: booleanhas_pages: booleanhas_discussions: booleanhas_pull_requests: booleanpull_request_creation_policy: string, enum: all, collaborators_onlyarchived: booleandisabled: booleanvisibility: stringpushed_at: string or null, format: date-timecreated_at: string or null, format: date-timeupdated_at: string or null, format: date-timepermissions: object:
admin: booleanmaintain: booleanpush: booleantriage: booleanpull: booleanrole_name: stringtemp_clone_token: stringdelete_branch_on_merge: booleansubscribers_count: integernetwork_count: integercode_of_conduct: Code Of Conduct:
key: required, stringname: required, stringurl: required, string, format: uribody: stringhtml_url: required, string or null, format: urilicense: object or null:
key: stringname: stringspdx_id: stringurl: string or nullnode_id: stringforks: integeropen_issues: integerwatchers: integerallow_forking: booleanweb_commit_signoff_required: booleansecurity_and_analysis: object or null:
advanced_security: object:
status: string, enum: enabled, disabledcode_security: object:
status: string, enum: enabled, disableddependabot_security_updates: object:
status: string, enum: enabled, disabledsecret_scanning: object:
status: string, enum: enabled, disabledsecret_scanning_push_protection: object:
status: string, enum: enabled, disabledsecret_scanning_non_provider_patterns: object:
status: string, enum: enabled, disabledsecret_scanning_ai_detection: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_alert_dismissal: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_bypass: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_bypass_options: object:
reviewers: array of objectcustom_properties: object, additional properties allowedhead_repository: required, Minimal Repository (see above)head_repository_id: integerdisplay_title: required, stringGET /repos/{owner}/{repo}/actions/runs/{run_id}
Gets a specific workflow run.
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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
run_id (integer) (required)
The unique identifier of the workflow run.
exclude_pull_requests (boolean)
If true pull requests are omitted from the response (empty array).
Default: false
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID
Response schema (Status: 200):
id: required, integer, format: int64name: string or nullnode_id: required, stringcheck_suite_id: integer, format: int64check_suite_node_id: stringhead_branch: required, string or nullhead_sha: required, stringpath: required, stringrun_number: required, integerrun_attempt: integerreferenced_workflows: array of Referenced workflow or null:
path: required, stringsha: required, stringref: stringevent: required, stringstatus: required, string or nullconclusion: required, string or nullworkflow_id: required, integerurl: required, stringhtml_url: required, stringpull_requests: required, array of Pull Request Minimal or null:
id: required, integer, format: int64number: required, integerurl: required, stringhead: required, object:
ref: required, stringsha: required, stringrepo: required, object:
id: required, integer, format: int64url: required, stringname: required, stringbase: required, object:
ref: required, stringsha: required, stringrepo: required, object:
id: required, integer, format: int64url: required, stringname: required, stringcreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timeactor: Simple User:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringtriggering_actor: Simple User (see above)run_started_at: string, format: date-timejobs_url: required, stringlogs_url: required, stringcheck_suite_url: required, stringartifacts_url: required, stringcancel_url: required, stringrerun_url: required, stringprevious_attempt_url: string or nullworkflow_url: required, stringhead_commit: required, any of:
id: required, stringtree_id: required, stringmessage: required, stringtimestamp: required, string, format: date-timeauthor: required, object or null:
name: required, stringemail: required, string, format: emailcommitter: required, object or null:
name: required, stringemail: required, string, format: emailrepository: required, Minimal Repository:
id: required, integer, format: int64node_id: required, stringname: required, stringfull_name: required, stringowner: required, Simple User (see above)private: required, booleanhtml_url: required, string, format: uridescription: required, string or nullfork: required, booleanurl: required, string, format: uriarchive_url: required, stringassignees_url: required, stringblobs_url: required, stringbranches_url: required, stringcollaborators_url: required, stringcomments_url: required, stringcommits_url: required, stringcompare_url: required, stringcontents_url: required, stringcontributors_url: required, string, format: urideployments_url: required, string, format: uridownloads_url: required, string, format: urievents_url: required, string, format: uriforks_url: required, string, format: urigit_commits_url: required, stringgit_refs_url: required, stringgit_tags_url: required, stringgit_url: stringissue_comment_url: required, stringissue_events_url: required, stringissues_url: required, stringkeys_url: required, stringlabels_url: required, stringlanguages_url: required, string, format: urimerges_url: required, string, format: urimilestones_url: required, stringnotifications_url: required, stringpulls_url: required, stringreleases_url: required, stringssh_url: stringstargazers_url: required, string, format: uristatuses_url: required, stringsubscribers_url: required, string, format: urisubscription_url: required, string, format: uritags_url: required, string, format: uriteams_url: required, string, format: uritrees_url: required, stringclone_url: stringmirror_url: string or nullhooks_url: required, string, format: urisvn_url: stringhomepage: string or nulllanguage: string or nullforks_count: integerstargazers_count: integerwatchers_count: integersize: integerdefault_branch: stringopen_issues_count: integeris_template: booleantopics: array of stringhas_issues: booleanhas_projects: booleanhas_wiki: booleanhas_pages: booleanhas_discussions: booleanhas_pull_requests: booleanpull_request_creation_policy: string, enum: all, collaborators_onlyarchived: booleandisabled: booleanvisibility: stringpushed_at: string or null, format: date-timecreated_at: string or null, format: date-timeupdated_at: string or null, format: date-timepermissions: object:
admin: booleanmaintain: booleanpush: booleantriage: booleanpull: booleanrole_name: stringtemp_clone_token: stringdelete_branch_on_merge: booleansubscribers_count: integernetwork_count: integercode_of_conduct: Code Of Conduct:
key: required, stringname: required, stringurl: required, string, format: uribody: stringhtml_url: required, string or null, format: urilicense: object or null:
key: stringname: stringspdx_id: stringurl: string or nullnode_id: stringforks: integeropen_issues: integerwatchers: integerallow_forking: booleanweb_commit_signoff_required: booleansecurity_and_analysis: object or null:
advanced_security: object:
status: string, enum: enabled, disabledcode_security: object:
status: string, enum: enabled, disableddependabot_security_updates: object:
status: string, enum: enabled, disabledsecret_scanning: object:
status: string, enum: enabled, disabledsecret_scanning_push_protection: object:
status: string, enum: enabled, disabledsecret_scanning_non_provider_patterns: object:
status: string, enum: enabled, disabledsecret_scanning_ai_detection: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_alert_dismissal: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_bypass: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_bypass_options: object:
reviewers: array of objects:
reviewer_id: required, integerreviewer_type: required, string, enum: TEAM, ROLEmode: string, enum: ALWAYS, EXEMPT, default: "ALWAYS"custom_properties: object, additional properties allowedhead_repository: required, Minimal Repository (see above)head_repository_id: integerdisplay_title: required, stringDELETE /repos/{owner}/{repo}/actions/runs/{run_id}
Deletes a specific workflow run.
Anyone with write 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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
run_id (integer) (required)
The unique identifier of the workflow run.
Request:
curl -L \
-X DELETE \
https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID
Response schema (Status: 204):
GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals
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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
run_id (integer) (required)
The unique identifier of the workflow run.
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/approvals
Response schema (Status: 200):
Array of Environment Approval:
environments: required, array of objects:
id: integernode_id: stringname: stringurl: stringhtml_url: stringcreated_at: string, format: date-timeupdated_at: string, format: date-timestate: required, string, enum: approved, rejected, pendinguser: required, Simple User:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringcomment: required, stringPOST /repos/{owner}/{repo}/actions/runs/{run_id}/approve
Approves 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."
OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
run_id (integer) (required)
The unique identifier of the workflow run.
201 - Created
403 - Forbidden
404 - Resource not found
Request:
curl -L \
-X POST \
https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/approve
Response schema (Status: 201):
GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}
Gets a specific workflow run attempt.
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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
run_id (integer) (required)
The unique identifier of the workflow run.
attempt_number (integer) (required)
The attempt number of the workflow run.
exclude_pull_requests (boolean)
If true pull requests are omitted from the response (empty array).
Default: false
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/attempts/ATTEMPT_NUMBER
Response schema (Status: 200):
Same response schema as Get a workflow run.
GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs
Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after
1 minute. Look for Location: in the response header to find the URL for the download.
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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
run_id (integer) (required)
The unique identifier of the workflow run.
attempt_number (integer) (required)
The attempt number of the workflow run.
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/attempts/ATTEMPT_NUMBER/logs
Response schema (Status: 302):
POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel
Cancels a workflow run using its id.
OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
run_id (integer) (required)
The unique identifier of the workflow run.
202 - Accepted
409 - Conflict
Request:
curl -L \
-X POST \
https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/cancel
Response schema (Status: 202):
POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule
Approve 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.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with a private repository.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
run_id (integer) (required)
The unique identifier of the workflow run.
Request:
curl -L \
-X POST \
https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/deployment_protection_rule \
-d '{
"environment_name": "prod-eus",
"state": "approved",
"comment": "All health checks passed."
}'
Response schema (Status: 204):
POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel
Cancels a workflow run and bypasses conditions that would otherwise cause a workflow execution to continue, such as an always() condition on a job.
You should only use this endpoint to cancel a workflow run when the workflow run is not responding to POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel.
OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
run_id (integer) (required)
The unique identifier of the workflow run.
202 - Accepted
409 - Conflict
Request:
curl -L \
-X POST \
https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/force-cancel
Response schema (Status: 202):
GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs
Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for
Location: in the response header to find the URL for the download.
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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
run_id (integer) (required)
The unique identifier of the workflow run.
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/logs
Response schema (Status: 302):
DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs
Deletes all logs for a workflow run.
OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
run_id (integer) (required)
The unique identifier of the workflow run.
204 - No Content
403 - Forbidden
500 - Internal Error
Request:
curl -L \
-X DELETE \
https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/logs
Response schema (Status: 204):
GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments
Get all deployment environments for a workflow run that are waiting for protection rules to pass.
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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
run_id (integer) (required)
The unique identifier of the workflow run.
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/pending_deployments
Response schema (Status: 200):
Array of Pending Deployment:
environment: required, object:
id: integer, format: int64node_id: stringname: stringurl: stringhtml_url: stringwait_timer: required, integerwait_timer_started_at: required, string or null, format: date-timecurrent_user_can_approve: required, booleanreviewers: required, array of objects:
type: string, enum: User, Teamreviewer: any of:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringid: required, integernode_id: required, stringname: required, stringslug: required, stringdescription: required, string or nullprivacy: stringnotification_setting: stringpermission: required, stringpermissions: object:
pull: required, booleantriage: required, booleanpush: required, booleanmaintain: required, booleanadmin: required, booleanurl: required, string, format: urihtml_url: required, string, format: urimembers_url: required, stringrepositories_url: required, string, format: uritype: required, string, enum: enterprise, organizationaccess_source: string, enum: direct, organization, enterpriseorganization_id: integerenterprise_id: integerparent: required, any of:
id: required, integernode_id: required, stringurl: required, string, format: urimembers_url: required, stringname: required, stringdescription: required, string or nullpermission: required, stringprivacy: stringnotification_setting: stringhtml_url: required, string, format: urirepositories_url: required, string, format: urislug: required, stringldap_dn: stringtype: required, string, enum: enterprise, organizationorganization_id: integerenterprise_id: integerPOST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments
Approve or reject pending deployments that are waiting on approval by a required reviewer.
Required reviewers with read access to the repository contents and deployments can use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
run_id (integer) (required)
The unique identifier of the workflow run.
environment_ids (array of integers) (required)
The list of environment ids to approve or reject
state (string) (required)
Whether to approve or reject deployment to the specified environments.
Can be one of: approved, rejected
comment (string) (required)
A comment to accompany the deployment review
Request:
curl -L \
-X POST \
https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/pending_deployments \
-d '{
"environment_ids": [
161171787
],
"state": "approved",
"comment": "Ship it!"
}'
Response schema (Status: 200):
Array of Deployment:
url: required, string, format: uriid: required, integer, format: int64node_id: required, stringsha: required, stringref: required, stringtask: required, stringpayload: required, one of:
original_environment: stringenvironment: required, stringdescription: required, string or nullcreator: required, any of:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringcreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timestatuses_url: required, string, format: urirepository_url: required, string, format: uritransient_environment: booleanproduction_environment: booleanperformed_via_github_app: any of:
id: required, integerslug: stringnode_id: required, stringclient_id: stringowner: required, one of:
description: string or nullhtml_url: required, string, format: uriwebsite_url: string or null, format: uriid: required, integernode_id: required, stringname: required, stringslug: required, stringcreated_at: required, string or null, format: date-timeupdated_at: required, string or null, format: date-timeavatar_url: required, string, format: uriname: required, stringdescription: required, string or nullexternal_url: required, string, format: urihtml_url: required, string, format: uricreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timepermissions: required, object, additional properties: string:
issues: stringchecks: stringmetadata: stringcontents: stringdeployments: stringevents: required, array of stringinstallations_count: integerPOST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun
Re-runs your workflow run using its id.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
run_id (integer) (required)
The unique identifier of the workflow run.
enable_debug_logging (boolean)falseRequest:
curl -L \
-X POST \
https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/rerun
Response schema (Status: 201):
POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs
Re-run all of the failed jobs and their dependent jobs in a workflow run using the id of the workflow run.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
run_id (integer) (required)
The unique identifier of the workflow run.
enable_debug_logging (boolean)falseRequest:
curl -L \
-X POST \
https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/rerun-failed-jobs
Response schema (Status: 201):
GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing
Warning
This endpoint is in the process of closing down. Refer to "Actions Get workflow usage and Get workflow run usage endpoints closing down" for more information.
Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "Managing billing for GitHub Actions".
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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
run_id (integer) (required)
The unique identifier of the workflow run.
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/timing
Response schema (Status: 200):
billable: required, object:
UBUNTU: object:
total_ms: required, integerjobs: required, integerjob_runs: array of objects:
job_id: required, integerduration_ms: required, integerMACOS: object:
total_ms: required, integerjobs: required, integerjob_runs: array of objects:
job_id: required, integerduration_ms: required, integerWINDOWS: object:
total_ms: required, integerjobs: required, integerjob_runs: array of objects:
job_id: required, integerduration_ms: required, integerrun_duration_ms: integerGET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs
List 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
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with a private repository.
This endpoint will return up to 1,000 results for each search when using the following parameters: actor, branch, check_suite_id, created, event, head_sha, status.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
workflow_id (string) (required)
The ID of the workflow. You can also pass the workflow file name as a string.
actor (string)
Returns someone's workflow runs. Use the login for the user who created the push associated with the check suite or workflow run.
branch (string)
Returns workflow runs associated with a branch. Use the name of the branch of the push.
event (string)
Returns workflow run triggered by the event you specify. For example, push, pull_request or issue. For more information, see "Events that trigger workflows."
status (string)
Returns workflow runs with the check run status or conclusion that you specify. For example, a conclusion can be success or a status can be in_progress. Only GitHub Actions can set a status of waiting, pending, or requested.
Can be one of: completed, action_required, cancelled, failure, neutral, skipped, stale, success, timed_out, in_progress, queued, requested, waiting, pending
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
created (string)
Returns workflow runs created within the given date-time range. For more information on the syntax, see "Understanding the search syntax."
exclude_pull_requests (boolean)
If true pull requests are omitted from the response (empty array).
Default: false
check_suite_id (integer)
Returns workflow runs with the check_suite_id that you specify.
head_sha (string)
Only returns workflow runs that are associated with the specified head_sha.
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/actions/workflows/WORKFLOW_ID/runs
Response schema (Status: 200):
Same response schema as List workflow runs for a repository.