REST API endpoints for workflow runs

Use the REST API to interact with workflow runs in GitHub Actions.

About 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.

Re-run a job from a workflow run

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.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X POST \
  https://api.github.com/repos/OWNER/REPO/actions/jobs/JOB_ID/rerun

Response schema (Status: 201):

List workflow runs for a repository

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.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/actions/runs

Response schema (Status: 200):

Get a workflow run

GET /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.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID

Response schema (Status: 200):

Delete a workflow run

DELETE /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.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X DELETE \
  https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID

Response schema (Status: 204):

Get the review history for a workflow run

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.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

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:

Approve a workflow run for a fork pull request

POST /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.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X POST \
  https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/approve

Response schema (Status: 201):

Get a workflow run attempt

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.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

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.

Download workflow run attempt logs

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.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/attempts/ATTEMPT_NUMBER/logs

Response schema (Status: 302):

Cancel a workflow run

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.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X POST \
  https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/cancel

Response schema (Status: 202):

Review custom deployment protection rules for a workflow run

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.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

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):

Force cancel a workflow run

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.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X POST \
  https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/force-cancel

Response schema (Status: 202):

Download workflow run logs

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.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/logs

Response schema (Status: 302):

Delete workflow run logs

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.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X DELETE \
  https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/logs

Response schema (Status: 204):

Get pending deployments for a workflow run

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.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

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:

Review pending deployments for a workflow run

POST /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.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

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:

Re-run a workflow

POST /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.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X POST \
  https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/rerun

Response schema (Status: 201):

Re-run failed jobs from a workflow run

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.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X POST \
  https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/rerun-failed-jobs

Response schema (Status: 201):

Get workflow run usage

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.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/timing

Response schema (Status: 200):

List workflow runs for a workflow

GET /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.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

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.