Skip to main content

Get Workflow

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.

External Documentation

To learn more, visit the GitHub documentation.

Parameters

ParameterDescription
OwnerThe account owner of the repository. The name is not case sensitive.
RepoThe name of the repository. The name is not case sensitive.
Workflow IDThe ID of the workflow. You can also pass the workflow file name as a string.

Example Output

{
"value": {
"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"
}
}

Workflow Library Example

Get Workflow with Github and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop