# List workflow runs

From **GitHub v3 REST API**.

`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](https://docs.github.com/enterprise-server@3.0/rest/overview/resources-in-the-rest-api#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.

## Parameters

### `owner`

- Location: path
- Required: true
- Type: `string`

### `repo`

- Location: path
- Required: true
- Type: `string`

### `workflow_id`

- Location: path
- Required: true
The ID of the workflow. You can also pass the workflow file name as a string.

### `actor`

- Location: query
- Required: false
- Type: `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`

- Location: query
- Required: false
- Type: `string`

Returns workflow runs associated with a branch. Use the name of the branch of the `push`.

### `event`

- Location: query
- Required: false
- Type: `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](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)."

### `status`

- Location: query
- Required: false
- Type: `string`
- Allowed values: `"completed"`, `"action_required"`, `"cancelled"`, `"failure"`, `"neutral"`, `"skipped"`, `"stale"`, `"success"`, `"timed_out"`, `"in_progress"`, `"queued"`, `"requested"`, `"waiting"`

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 can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/enterprise-server@3.0/rest/reference/checks#create-a-check-run)."

### `per_page`

- Location: query
- Required: false
- Type: `integer`
- Default: `30`

Results per page (max 100)

### `page`

- Location: query
- Required: false
- Type: `integer`
- Default: `1`

Page number of the results to fetch.

### `created`

- Location: query
- Required: false
- Type: `string`
- Format: `date-time`

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/enterprise-server@3.0/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)."

### `exclude_pull_requests`

- Location: query
- Required: false
- Type: `boolean`
- Default: `false`

If `true` pull requests are omitted from the response (empty array).

## Responses

### `200`

Response

#### Headers

##### `Link`

- Type: `string`

- Example: `<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"`

### `application/json`

- Type: `object`

```json
{
  "total_count": 1,
  "workflow_runs": [
    {
      "artifacts_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/artifacts",
      "cancel_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/cancel",
      "check_suite_url": "https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374",
      "conclusion": null,
      "created_at": "2020-01-22T19:33:08Z",
      "event": "push",
      "head_branch": "master",
      "head_commit": {
        "author": {
          "email": "octocat@github.com",
          "name": "Octo Cat"
        },
        "committer": {
          "email": "noreply@github.com",
          "name": "GitHub"
        },
        "id": "acb5820ced9479c074f688cc328bf03f341a511d",
        "message": "Create linter.yaml",
        "timestamp": "2020-01-22T19:33:05Z",
        "tree_id": "d23f6eedb1e1b9610bbc754ddb5197bfe7271223"
      },
      "head_repository": {
        "archive_url": "https://api.github.com/repos/octo-org/octo-repo/{archive_format}{/ref}",
        "assignees_url": "https://api.github.com/repos/octo-org/octo-repo/assignees{/user}",
        "blobs_url": "https://api.github.com/repos/octo-org/octo-repo/git/blobs{/sha}",
        "branches_url": "https://api.github.com/repos/octo-org/octo-repo/branches{/branch}",
        "collaborators_url": "https://api.github.com/repos/octo-org/octo-repo/collaborators{/collaborator}",
        "comments_url": "https://api.github.com/repos/octo-org/octo-repo/comments{/number}",
        "commits_url": "https://api.github.com/repos/octo-org/octo-repo/commits{/sha}",
        "compare_url": "https://api.github.com/repos/octo-org/octo-repo/compare/{base}...{head}",
        "contents_url": "https://api.github.com/repos/octo-org/octo-repo/contents/{+path}",
        "contributors_url": "https://api.github.com/repos/octo-org/octo-repo/contributors",
        "deployments_url": "https://api.github.com/repos/octo-org/octo-repo/deployments",
        "description": null,
        "downloads_url": "https://api.github.com/repos/octo-org/octo-repo/downloads",
        "events_url": "https://api.github.com/repos/octo-org/octo-repo/events",
        "fork": false,
        "forks_url": "https://api.github.com/repos/octo-org/octo-repo/forks",
        "full_name": "octo-org/octo-repo",
        "git_commits_url": "https://api.github.com/repos/octo-org/octo-repo/git/commits{/sha}",
        "git_refs_url": "https://api.github.com/repos/octo-org/octo-repo/git/refs{/sha}",
        "git_tags_url": "https://api.github.com/repos/octo-org/octo-repo/git/tags{/sha}",
        "hooks_url": "https://api.github.com/repos/octo-org/octo-repo/hooks",
        "html_url": "https://github.com/octo-org/octo-repo",
        "id": 217723378,
        "issue_comment_url": "https://api.github.com/repos/octo-org/octo-repo/issues/comments{/number}",
        "issue_events_url": "https://api.github.com/repos/octo-org/octo-repo/issues/events{/number}",
        "issues_url": "https://api.github.com/repos/octo-org/octo-repo/issues{/number}",
        "keys_url": "https://api.github.com/repos/octo-org/octo-repo/keys{/key_id}",
        "labels_url": "https://api.github.com/repos/octo-org/octo-repo/labels{/name}",
        "languages_url": "https://api.github.com/repos/octo-org/octo-repo/languages",
        "merges_url": "https://api.github.com/repos/octo-org/octo-repo/merges",
        "milestones_url": "https://api.github.com/repos/octo-org/octo-repo/milestones{/number}",
        "name": "octo-repo",
        "node_id": "MDEwOlJlcG9zaXRvcnkyMTc3MjMzNzg=",
        "notifications_url": "https://api.github.com/repos/octo-org/octo-repo/notifications{?since,all,participating}",
        "owner": {
          "avatar_url": "https://github.com/images/error/octocat_happy.gif",
          "events_url": "https://api.github.com/users/octocat/events{/privacy}",
          "followers_url": "https://api.github.com/users/octocat/followers",
          "following_url": "https://api.github.com/users/octocat/following{/other_user}",
          "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
          "gravatar_id": "",
          "html_url": "https://github.com/octocat",
          "id": 1,
          "login": "octocat",
          "node_id": "MDQ6VXNlcjE=",
          "organizations_url": "https://api.github.com/users/octocat/orgs",
          "received_events_url": "https://api.github.com/users/octocat/received_events",
          "repos_url": "https://api.github.com/users/octocat/repos",
          "site_admin": false,
          "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
          "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
          "type": "User",
          "url": "https://api.github.com/users/octocat"
        },
        "private": true,
        "pulls_url": "https://api.github.com/repos/octo-org/octo-repo/pulls{/number}",
        "releases_url": "https://api.github.com/repos/octo-org/octo-repo/releases{/id}",
        "stargazers_url": "https://api.github.com/repos/octo-org/octo-repo/stargazers",
        "statuses_url": "https://api.github.com/repos/octo-org/octo-repo/statuses/{sha}",
        "subscribers_url": "https://api.github.com/repos/octo-org/octo-repo/subscribers",
        "subscription_url": "https://api.github.com/repos/octo-org/octo-repo/subscription",
        "tags_url": "https://api.github.com/repos/octo-org/octo-repo/tags",
        "teams_url": "https://api.github.com/repos/octo-org/octo-repo/teams",
        "trees_url": "https://api.github.com/repos/octo-org/octo-repo/git/trees{/sha}",
        "url": "https://api.github.com/repos/octo-org/octo-repo"
      },
      "head_sha": "acb5820ced9479c074f688cc328bf03f341a511d",
      "html_url": "https://github.com/octo-org/octo-repo/actions/runs/30433642",
      "id": 30433642,
      "jobs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/jobs",
      "logs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/logs",
      "name": "Build",
      "node_id": "MDEyOldvcmtmbG93IFJ1bjI2OTI4OQ==",
      "pull_requests": [],
      "repository": {
        "archive_url": "https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
        "assignees_url": "https://api.github.com/repos/octocat/Hello-World/assignees{/user}",
        "blobs_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
        "branches_url": "https://api.github.com/repos/octocat/Hello-World/branches{/branch}",
        "collaborators_url": "https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
        "comments_url": "https://api.github.com/repos/octocat/Hello-World/comments{/number}",
        "commits_url": "https://api.github.com/repos/octocat/Hello-World/commits{/sha}",
        "compare_url": "https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
        "contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/{+path}",
        "contributors_url": "https://api.github.com/repos/octocat/Hello-World/contributors",
        "deployments_url": "https://api.github.com/repos/octocat/Hello-World/deployments",
        "description": "This your first repo!",
        "downloads_url": "https://api.github.com/repos/octocat/Hello-World/downloads",
        "events_url": "https://api.github.com/repos/octocat/Hello-World/events",
        "fork": false,
        "forks_url": "https://api.github.com/repos/octocat/Hello-World/forks",
        "full_name": "octocat/Hello-World",
        "git_commits_url": "https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
        "git_refs_url": "https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
        "git_tags_url": "https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
        "git_url": "git:github.com/octocat/Hello-World.git",
        "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks",
        "html_url": "https://github.com/octocat/Hello-World",
        "id": 1296269,
        "issue_comment_url": "https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
        "issue_events_url": "https://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
        "issues_url": "https://api.github.com/repos/octocat/Hello-World/issues{/number}",
        "keys_url": "https://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
        "labels_url": "https://api.github.com/repos/octocat/Hello-World/labels{/name}",
        "languages_url": "https://api.github.com/repos/octocat/Hello-World/languages",
        "merges_url": "https://api.github.com/repos/octocat/Hello-World/merges",
        "milestones_url": "https://api.github.com/repos/octocat/Hello-World/milestones{/number}",
        "name": "Hello-World",
        "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
        "notifications_url": "https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
        "owner": {
          "avatar_url": "https://github.com/images/error/octocat_happy.gif",
          "events_url": "https://api.github.com/users/octocat/events{/privacy}",
          "followers_url": "https://api.github.com/users/octocat/followers",
          "following_url": "https://api.github.com/users/octocat/following{/other_user}",
          "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
          "gravatar_id": "",
          "html_url": "https://github.com/octocat",
          "id": 1,
          "login": "octocat",
          "node_id": "MDQ6VXNlcjE=",
          "organizations_url": "https://api.github.com/users/octocat/orgs",
          "received_events_url": "https://api.github.com/users/octocat/received_events",
          "repos_url": "https://api.github.com/users/octocat/repos",
          "site_admin": false,
          "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
          "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
          "type": "User",
          "url": "https://api.github.com/users/octocat"
        },
        "private": false,
        "pulls_url": "https://api.github.com/repos/octocat/Hello-World/pulls{/number}",
        "releases_url": "https://api.github.com/repos/octocat/Hello-World/releases{/id}",
        "ssh_url": "git@github.com:octocat/Hello-World.git",
        "stargazers_url": "https://api.github.com/repos/octocat/Hello-World/stargazers",
        "statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
        "subscribers_url": "https://api.github.com/repos/octocat/Hello-World/subscribers",
        "subscription_url": "https://api.github.com/repos/octocat/Hello-World/subscription",
        "tags_url": "https://api.github.com/repos/octocat/Hello-World/tags",
        "teams_url": "https://api.github.com/repos/octocat/Hello-World/teams",
        "trees_url": "https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
        "url": "https://api.github.com/repos/octocat/Hello-World"
      },
      "rerun_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/rerun",
      "run_number": 562,
      "status": "queued",
      "updated_at": "2020-01-22T19:33:08Z",
      "url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642",
      "workflow_id": 159038,
      "workflow_url": "https://api.github.com/repos/octo-org/octo-repo/actions/workflows/159038"
    }
  ]
}
```

```json
{"properties":{"total_count":{"type":"integer"},"workflow_runs":{"items":{"$ref":"#/components/schemas/workflow-run"},"type":"array"}},"required":["total_count","workflow_runs"],"type":"object"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs
```
