Sample - GitHub REST API
GET/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs

List workflow runs for a workflow

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.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

13 parameters
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
workflow_idintegerrequired
The ID of the workflow. You can also pass the workflow file name as a string.
actorstringoptional
Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run.
branchstringoptional
Returns workflow runs associated with a branch. Use the name of the branch of the `push`.
eventstringoptional
Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)."
statusstringoptional
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`.
Allowed:completedaction_requiredcancelledfailureneutralskippedstalesuccesstimed_outin_progressqueuedrequested
per_pageintegeroptional
The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
Default:30
pageintegeroptional
The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
Default:1
createdstringoptional
Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)."
exclude_pull_requestsbooleanoptional
If `true` pull requests are omitted from the response (empty array).
Default:false
check_suite_idintegeroptional
Returns workflow runs with the `check_suite_id` that you specify.
head_shastringoptional
Only returns workflow runs that are associated with the specified `head_sha`.

1 status code
200Response
total_countintegerrequired
workflow_runsarray<WorkflowRun>required