# Get a workflow

From **GitHub v3 REST API**.

`GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}`

Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. 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.

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

## Responses

### `200`

Response

### `application/json`

- Type: `object`

A GitHub Actions workflow

```json
{
  "badge_url": "https://github.com/octo-org/octo-repo/workflows/CI/badge.svg",
  "created_at": "2020-01-08T23:48:37.000-08:00",
  "html_url": "https://github.com/octo-org/octo-repo/blob/master/.github/workflows/161335",
  "id": 161335,
  "name": "CI",
  "node_id": "MDg6V29ya2Zsb3cxNjEzMzU=",
  "path": ".github/workflows/blank.yaml",
  "state": "active",
  "updated_at": "2020-01-08T23:50:21.000-08:00",
  "url": "https://api.github.com/repos/octo-org/octo-repo/actions/workflows/161335"
}
```

```json
{"description":"A GitHub Actions workflow","properties":{"badge_url":{"example":"https://github.com/actions/setup-ruby/workflows/CI/badge.svg","type":"string"},"created_at":{"example":"2019-12-06T14:20:20.000Z","format":"date-time","type":"string"},"deleted_at":{"example":"2019-12-06T14:20:20.000Z","format":"date-time","type":"string"},"html_url":{"example":"https://github.com/actions/setup-ruby/blob/master/.github/workflows/ruby.yaml","type":"string"},"id":{"example":5,"type":"integer"},"name":{"example":"CI","type":"string"},"node_id":{"example":"MDg6V29ya2Zsb3cxMg==","type":"string"},"path":{"example":"ruby.yaml","type":"string"},"state":{"enum":["active","deleted","disabled_fork","disabled_inactivity","disabled_manually"],"example":"active","type":"string"},"updated_at":{"example":"2019-12-06T14:20:20.000Z","format":"date-time","type":"string"},"url":{"example":"https://api.github.com/repos/actions/setup-ruby/workflows/5","type":"string"}},"required":["id","node_id","name","path","state","url","html_url","badge_url","created_at","updated_at"],"title":"Workflow","type":"object"}
```

## Request examples

### cURL

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