Endpoints to manage GitHub Actions using the REST API.
187 endpoints tagged actions, each listing its
parameters and possible responses. Search or scroll the index below to
jump to a specific endpoint.
No endpoints match your search.
GET /enterprises/{enterprise}/actions/cache/retention-limit
Gets GitHub Actions cache retention limit for an enterprise. All organizations and repositories under this
| Name | In | Required | Description |
|---|---|---|---|
enterprise | path | yes | The slug version of the enterprise name. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PUT /enterprises/{enterprise}/actions/cache/retention-limit
Sets GitHub Actions cache retention limit for an enterprise. All organizations and repositories under this
| Name | In | Required | Description |
|---|---|---|---|
enterprise | path | yes | The slug version of the enterprise name. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 400 | Bad Request | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /enterprises/{enterprise}/actions/cache/storage-limit
Gets GitHub Actions cache storage limit for an enterprise. All organizations and repositories under this
| Name | In | Required | Description |
|---|---|---|---|
enterprise | path | yes | The slug version of the enterprise name. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PUT /enterprises/{enterprise}/actions/cache/storage-limit
Sets GitHub Actions cache storage limit for an enterprise. All organizations and repositories under this
| Name | In | Required | Description |
|---|---|---|---|
enterprise | path | yes | The slug version of the enterprise name. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 400 | Bad Request | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /organizations/{org}/actions/cache/retention-limit
Gets GitHub Actions cache retention limit for an organization. All repositories under this
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PUT /organizations/{org}/actions/cache/retention-limit
Sets GitHub Actions cache retention limit for an organization. All repositories under this
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 400 | Bad Request | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /organizations/{org}/actions/cache/storage-limit
Gets GitHub Actions cache storage limit for an organization. All repositories under this
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PUT /organizations/{org}/actions/cache/storage-limit
Sets GitHub Actions cache storage limit for an organization. All organizations and repositories under this
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 400 | Bad Request | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/actions/cache/usage
Gets the total GitHub Actions cache usage for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/actions/cache/usage-by-repository
Lists repositories and their GitHub Actions cache usage for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/actions/hosted-runners
Lists all GitHub-hosted runners configured in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
POST /orgs/{org}/actions/hosted-runners
Creates a GitHub-hosted runner for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
GET /orgs/{org}/actions/hosted-runners/images/custom
List custom images for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}
Get a custom image definition for GitHub Actions Hosted Runners.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
image_definition_id | path | yes | Image definition ID of custom image |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}
Delete a custom image from the organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
image_definition_id | path | yes | Image definition ID of custom image |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions
List image versions of a custom image for an organization.
| Name | In | Required | Description |
|---|---|---|---|
image_definition_id | path | yes | Image definition ID of custom image |
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}
Get an image version of a custom image for GitHub Actions Hosted Runners.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
image_definition_id | path | yes | Image definition ID of custom image |
version | path | yes | Version of a custom image |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}
Delete an image version of custom image from the organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
image_definition_id | path | yes | Image definition ID of custom image |
version | path | yes | Version of a custom image |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/actions/hosted-runners/images/github-owned
Get the list of GitHub-owned images available for GitHub-hosted runners for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/actions/hosted-runners/images/partner
Get the list of partner images available for GitHub-hosted runners for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/actions/hosted-runners/limits
Get the GitHub-hosted runners limits for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/actions/hosted-runners/machine-sizes
Get the list of machine specs available for GitHub-hosted runners for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/actions/hosted-runners/platforms
Get the list of platforms available for GitHub-hosted runners for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id}
Gets a GitHub-hosted runner configured in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
hosted_runner_id | path | yes | Unique identifier of the GitHub-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id}
Updates a GitHub-hosted runner for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
hosted_runner_id | path | yes | Unique identifier of the GitHub-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id}
Deletes a GitHub-hosted runner for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
hosted_runner_id | path | yes | Unique identifier of the GitHub-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 202 | Response | yes |
GET /orgs/{org}/actions/permissions
Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /orgs/{org}/actions/permissions
Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/actions/permissions/artifact-and-log-retention
Gets artifact and log retention settings for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PUT /orgs/{org}/actions/permissions/artifact-and-log-retention
Sets artifact and log retention settings for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | No content | no |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 409 | Conflict | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/actions/permissions/fork-pr-contributor-approval
Gets the fork PR contributor approval policy for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
PUT /orgs/{org}/actions/permissions/fork-pr-contributor-approval
Sets the fork PR contributor approval policy for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/actions/permissions/fork-pr-workflows-private-repos
Gets the settings for whether workflows from fork pull requests can run on private repositories in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PUT /orgs/{org}/actions/permissions/fork-pr-workflows-private-repos
Sets the settings for whether workflows from fork pull requests can run on private repositories in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Empty response for successful settings update | no |
| 403 | Forbidden - Fork PR workflow settings for private repositories are managed by the enterprise owner | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/actions/permissions/repositories
Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for enabled_repositories must be configured to selected. For more information, see "Set GitHub Actions permissions for an organization."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /orgs/{org}/actions/permissions/repositories
Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for enabled_repositories must be configured to selected. For more information, see "Set GitHub Actions permissions for an organization."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
PUT /orgs/{org}/actions/permissions/repositories/{repository_id}
Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for enabled_repositories must be must be configured to selected. For more information, see "Set GitHub Actions permissions for an organization."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
repository_id | path | yes | The unique identifier of the repository. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}
Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for enabled_repositories must be configured to selected. For more information, see "Set GitHub Actions permissions for an organization."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
repository_id | path | yes | The unique identifier of the repository. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/actions/permissions/selected-actions
Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for allowed_actions must be configured to selected. For more information, see "Set GitHub Actions permissions for an organization."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /orgs/{org}/actions/permissions/selected-actions
Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for allowed_actions must be configured to selected. For more information, see "Set GitHub Actions permissions for an organization."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/actions/permissions/self-hosted-runners
Gets the settings for self-hosted runners for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PUT /orgs/{org}/actions/permissions/self-hosted-runners
Sets the settings for self-hosted runners for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | No content | no |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 409 | Conflict | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/actions/permissions/self-hosted-runners/repositories
Lists repositories that are allowed to use self-hosted runners in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PUT /orgs/{org}/actions/permissions/self-hosted-runners/repositories
Sets repositories that are allowed to use self-hosted runners in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | No content | no |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
PUT /orgs/{org}/actions/permissions/self-hosted-runners/repositories/{repository_id}
Adds a repository to the list of repositories that are allowed to use self-hosted runners in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
repository_id | path | yes | The unique identifier of the repository. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | No content | no |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 409 | Conflict | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
DELETE /orgs/{org}/actions/permissions/self-hosted-runners/repositories/{repository_id}
Removes a repository from the list of repositories that are allowed to use self-hosted runners in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
repository_id | path | yes | The unique identifier of the repository. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | No content | no |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 409 | Conflict | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/actions/permissions/workflow
Gets the default workflow permissions granted to the GITHUB_TOKEN when running workflows in an organization,
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /orgs/{org}/actions/permissions/workflow
Sets the default workflow permissions granted to the GITHUB_TOKEN when running workflows in an organization, and sets if GitHub Actions
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Success response | no |
GET /orgs/{org}/actions/runner-groups
Lists all self-hosted runner groups configured in an organization and inherited from an enterprise.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
visible_to_repository | query | no | Only return runner groups that are allowed to be used by this repository. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
POST /orgs/{org}/actions/runner-groups
Creates a new self-hosted runner group for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
GET /orgs/{org}/actions/runner-groups/{runner_group_id}
Gets a specific self-hosted runner group for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_group_id | path | yes | Unique identifier of the self-hosted runner group. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}
Updates the name and visibility of a self-hosted runner group in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_group_id | path | yes | Unique identifier of the self-hosted runner group. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}
Deletes a self-hosted runner group for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_group_id | path | yes | Unique identifier of the self-hosted runner group. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners
Lists the GitHub-hosted runners in an organization group.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_group_id | path | yes | Unique identifier of the self-hosted runner group. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories
Lists the repositories with access to a self-hosted runner group configured in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_group_id | path | yes | Unique identifier of the self-hosted runner group. |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories
Replaces the list of repositories that have access to a self-hosted runner group configured in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_group_id | path | yes | Unique identifier of the self-hosted runner group. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}
Adds a repository to the list of repositories that can access a self-hosted runner group. The runner group must have visibility set to selected. For more information, see "Create a self-hosted runner group for an organization."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_group_id | path | yes | Unique identifier of the self-hosted runner group. |
repository_id | path | yes | The unique identifier of the repository. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}
Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have visibility set to selected. For more information, see "Create a self-hosted runner group for an organization."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_group_id | path | yes | Unique identifier of the self-hosted runner group. |
repository_id | path | yes | The unique identifier of the repository. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners
Lists self-hosted runners that are in a specific organization group.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_group_id | path | yes | Unique identifier of the self-hosted runner group. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners
Replaces the list of self-hosted runners that are part of an organization runner group.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_group_id | path | yes | Unique identifier of the self-hosted runner group. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}
Adds a self-hosted runner to a runner group configured in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_group_id | path | yes | Unique identifier of the self-hosted runner group. |
runner_id | path | yes | Unique identifier of the self-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}
Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_group_id | path | yes | Unique identifier of the self-hosted runner group. |
runner_id | path | yes | Unique identifier of the self-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/actions/runners
Lists all self-hosted runners configured in an organization.
| Name | In | Required | Description |
|---|---|---|---|
name | query | no | The name of a self-hosted runner. |
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/actions/runners/downloads
Lists binaries for the runner application that you can download and run.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
POST /orgs/{org}/actions/runners/generate-jitconfig
Generates a configuration that can be passed to the runner application at startup.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 409 | Conflict | yes |
POST /orgs/{org}/actions/runners/registration-token
Returns a token that you can pass to the config script. The token expires after one hour.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
POST /orgs/{org}/actions/runners/remove-token
Returns a token that you can pass to the config script to remove a self-hosted runner from an organization. The token expires after one hour.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
GET /orgs/{org}/actions/runners/{runner_id}
Gets a specific self-hosted runner configured in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_id | path | yes | Unique identifier of the self-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /orgs/{org}/actions/runners/{runner_id}
Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_id | path | yes | Unique identifier of the self-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/actions/runners/{runner_id}/labels
Lists all labels for a self-hosted runner configured in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_id | path | yes | Unique identifier of the self-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
POST /orgs/{org}/actions/runners/{runner_id}/labels
Adds custom labels to a self-hosted runner configured in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_id | path | yes | Unique identifier of the self-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
PUT /orgs/{org}/actions/runners/{runner_id}/labels
Remove all previous custom labels and set the new custom labels for a specific
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_id | path | yes | Unique identifier of the self-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
DELETE /orgs/{org}/actions/runners/{runner_id}/labels
Remove all custom labels from a self-hosted runner configured in an
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_id | path | yes | Unique identifier of the self-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}
Remove a custom label from a self-hosted runner configured
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
runner_id | path | yes | Unique identifier of the self-hosted runner. |
name | path | yes | The name of a self-hosted runner's custom label. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/actions/secrets
Lists all secrets available in an organization without revealing their
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/actions/secrets/public-key
Gets your public key, which you need to encrypt secrets. You need to
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/actions/secrets/{secret_name}
Gets a single organization secret without revealing its encrypted value.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /orgs/{org}/actions/secrets/{secret_name}
Creates or updates an organization secret with an encrypted value. Encrypt your secret using
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response when creating a secret | yes |
| 204 | Response when updating a secret | no |
DELETE /orgs/{org}/actions/secrets/{secret_name}
Deletes a secret in an organization using the secret name.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/actions/secrets/{secret_name}/repositories
Lists all repositories that have been selected when the visibility
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /orgs/{org}/actions/secrets/{secret_name}/repositories
Replaces all repositories for an organization secret when the visibility
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}
Adds a repository to an organization secret when the visibility for
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
repository_id | path | yes |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | No Content when repository was added to the selected list | no |
| 409 | Conflict when visibility type is not set to selected | no |
DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}
Removes a repository from an organization secret when the visibility
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
repository_id | path | yes |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response when repository was removed from the selected list | no |
| 409 | Conflict when visibility type not set to selected | no |
GET /orgs/{org}/actions/variables
Lists all organization variables.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 30). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
POST /orgs/{org}/actions/variables
Creates an organization variable that you can reference in a GitHub Actions workflow.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response when creating a variable | yes |
GET /orgs/{org}/actions/variables/{name}
Gets a specific variable in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
name | path | yes | The name of the variable. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PATCH /orgs/{org}/actions/variables/{name}
Updates an organization variable that you can reference in a GitHub Actions workflow.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
name | path | yes | The name of the variable. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
DELETE /orgs/{org}/actions/variables/{name}
Deletes an organization variable using the variable name.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
name | path | yes | The name of the variable. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/actions/variables/{name}/repositories
Lists all repositories that can access an organization variable
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
name | path | yes | The name of the variable. |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 409 | Response when the visibility of the variable is not set to selected | no |
PUT /orgs/{org}/actions/variables/{name}/repositories
Replaces all repositories for an organization variable that is available
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
name | path | yes | The name of the variable. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 409 | Response when the visibility of the variable is not set to selected | no |
PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}
Adds a repository to an organization variable that is available to selected repositories.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
name | path | yes | The name of the variable. |
repository_id | path | yes |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 409 | Response when the visibility of the variable is not set to selected | no |
DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}
Removes a repository from an organization variable that is
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
name | path | yes | The name of the variable. |
repository_id | path | yes |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 409 | Response when the visibility of the variable is not set to selected | no |
GET /repos/{owner}/{repo}/actions/artifacts
Lists all artifacts for a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
name | query | no | The name field of an artifact. When specified, only artifacts with this name will be returned. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}
Gets a specific artifact for a workflow run.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
artifact_id | path | yes | The unique identifier of the artifact. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}
Deletes an artifact for a workflow run.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
artifact_id | path | yes | The unique identifier of the artifact. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}
Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for Location: in
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
artifact_id | path | yes | The unique identifier of the artifact. |
archive_format | path | yes |
| Status | Description | Has JSON body |
|---|---|---|
| 302 | Response | no |
| 410 | Gone | yes |
GET /repos/{owner}/{repo}/actions/cache/retention-limit
Gets GitHub Actions cache retention limit for a repository. This determines how long caches will be retained for, if
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PUT /repos/{owner}/{repo}/actions/cache/retention-limit
Sets GitHub Actions cache retention limit for a repository. This determines how long caches will be retained for, if
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 400 | Bad Request | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /repos/{owner}/{repo}/actions/cache/storage-limit
Gets GitHub Actions cache storage limit for a repository. This determines the maximum size of caches that can be
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PUT /repos/{owner}/{repo}/actions/cache/storage-limit
Sets GitHub Actions cache storage limit for a repository. This determines the maximum size of caches that can be
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 400 | Bad Request | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /repos/{owner}/{repo}/actions/cache/usage
Gets GitHub Actions cache usage for a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/actions/caches
Lists the GitHub Actions caches for a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
ref | query | no | The full Git reference for narrowing down the cache. The ref for a branch should be formatted as refs/heads/<branch name>. To reference a pull request use refs/pull/<number>/merge. |
key | query | no | An explicit key or prefix for identifying the cache |
sort | query | no | The property to sort the results by. created_at means when the cache was created. last_accessed_at means when the cache was last accessed. size_in_bytes is the size of the cache in bytes. |
direction | query | no | The direction to sort the results by. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /repos/{owner}/{repo}/actions/caches
Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
key | query | yes | A key for identifying the cache. |
ref | query | no | The full Git reference for narrowing down the cache. The ref for a branch should be formatted as refs/heads/<branch name>. To reference a pull request use refs/pull/<number>/merge. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}
Deletes a GitHub Actions cache for a repository, using a cache ID.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
cache_id | path | yes | The unique identifier of the GitHub Actions cache. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /repos/{owner}/{repo}/actions/concurrency_groups
Lists the active concurrency groups for a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
after | query | no | A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}
Gets a specific concurrency group for a repository, including all instances in the group's queue.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
concurrency_group_name | path | yes | The name of the concurrency group. |
ahead_of_run | query | no | Filter to items ahead of this workflow run ID in the queue, plus the run itself. |
ahead_of_job | query | no | Filter to items ahead of this job ID in the queue, plus the job itself. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /repos/{owner}/{repo}/actions/jobs/{job_id}
Gets a specific job in a workflow run.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
job_id | path | yes | The unique identifier of the job. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs
Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
job_id | path | yes | The unique identifier of the job. |
| Status | Description | Has JSON body |
|---|---|---|
| 302 | Response | no |
POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun
Re-run a job and its dependent jobs in a workflow run.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
job_id | path | yes | The unique identifier of the job. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
| 403 | Forbidden | yes |
GET /repos/{owner}/{repo}/actions/oidc/customization/sub
Gets the customization template for an OpenID Connect (OIDC) subject claim.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Status response | yes |
| 400 | Bad Request | yes |
| 404 | Resource not found | yes |
PUT /repos/{owner}/{repo}/actions/oidc/customization/sub
Sets the customization template and opt-in or opt-out flag for an OpenID Connect (OIDC) subject claim for a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Empty response | yes |
| 404 | Resource not found | yes |
| 400 | Bad Request | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /repos/{owner}/{repo}/actions/organization-secrets
Lists all organization secrets shared with a repository without revealing their encrypted
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/actions/organization-variables
Lists all organization variables shared with a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 30). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/actions/permissions
Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /repos/{owner}/{repo}/actions/permissions
Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /repos/{owner}/{repo}/actions/permissions/access
Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /repos/{owner}/{repo}/actions/permissions/access
Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /repos/{owner}/{repo}/actions/permissions/artifact-and-log-retention
Gets artifact and log retention settings for a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
PUT /repos/{owner}/{repo}/actions/permissions/artifact-and-log-retention
Sets artifact and log retention settings for a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Empty response for successful settings update | no |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /repos/{owner}/{repo}/actions/permissions/fork-pr-contributor-approval
Gets the fork PR contributor approval policy for a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
PUT /repos/{owner}/{repo}/actions/permissions/fork-pr-contributor-approval
Sets the fork PR contributor approval policy for a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /repos/{owner}/{repo}/actions/permissions/fork-pr-workflows-private-repos
Gets the settings for whether workflows from fork pull requests can run on a private repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PUT /repos/{owner}/{repo}/actions/permissions/fork-pr-workflows-private-repos
Sets the settings for whether workflows from fork pull requests can run on a private repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Empty response for successful settings update | no |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /repos/{owner}/{repo}/actions/permissions/selected-actions
Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for allowed_actions must be configured to selected. For more information, see "Set GitHub Actions permissions for a repository."
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /repos/{owner}/{repo}/actions/permissions/selected-actions
Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for allowed_actions must be configured to selected. For more information, see "Set GitHub Actions permissions for a repository."
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /repos/{owner}/{repo}/actions/permissions/workflow
Gets the default workflow permissions granted to the GITHUB_TOKEN when running workflows in a repository,
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /repos/{owner}/{repo}/actions/permissions/workflow
Sets the default workflow permissions granted to the GITHUB_TOKEN when running workflows in a repository, and sets if GitHub Actions
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Success response | no |
| 409 | Conflict response when changing a setting is prevented by the owning organization | no |
GET /repos/{owner}/{repo}/actions/runners
Lists all self-hosted runners configured in a repository.
| Name | In | Required | Description |
|---|---|---|---|
name | query | no | The name of a self-hosted runner. |
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/actions/runners/downloads
Lists binaries for the runner application that you can download and run.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig
Generates a configuration that can be passed to the runner application at startup.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 409 | Conflict | yes |
POST /repos/{owner}/{repo}/actions/runners/registration-token
Returns a token that you can pass to the config script. The token expires after one hour.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
POST /repos/{owner}/{repo}/actions/runners/remove-token
Returns a token that you can pass to the config script to remove a self-hosted runner from an repository. The token expires after one hour.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
GET /repos/{owner}/{repo}/actions/runners/{runner_id}
Gets a specific self-hosted runner configured in a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
runner_id | path | yes | Unique identifier of the self-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}
Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
runner_id | path | yes | Unique identifier of the self-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels
Lists all labels for a self-hosted runner configured in a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
runner_id | path | yes | Unique identifier of the self-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels
Adds custom labels to a self-hosted runner configured in a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
runner_id | path | yes | Unique identifier of the self-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels
Remove all previous custom labels and set the new custom labels for a specific
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
runner_id | path | yes | Unique identifier of the self-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels
Remove all custom labels from a self-hosted runner configured in a
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
runner_id | path | yes | Unique identifier of the self-hosted runner. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}
Remove a custom label from a self-hosted runner configured
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
runner_id | path | yes | Unique identifier of the self-hosted runner. |
name | path | yes | The name of a self-hosted runner's custom label. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
actor | query | no | Returns someone's workflow runs. Use the login for the user who created the push associated with the check suite or workflow run. |
branch | query | no | Returns workflow runs associated with a branch. Use the name of the branch of the push. |
event | query | no | Returns workflow run triggered by the event you specify. For example, push, pull_request or issue. For more information, see "Events that trigger workflows." |
status | query | no | 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. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
created | query | no | Returns workflow runs created within the given date-time range. For more information on the syntax, see "Understanding the search syntax." |
exclude_pull_requests | query | no | If true pull requests are omitted from the response (empty array). |
check_suite_id | query | no | Returns workflow runs with the check_suite_id that you specify. |
head_sha | query | no | Only returns workflow runs that are associated with the specified head_sha. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/actions/runs/{run_id}
Gets a specific workflow run.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
exclude_pull_requests | query | no | If true pull requests are omitted from the response (empty array). |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /repos/{owner}/{repo}/actions/runs/{run_id}
Deletes a specific workflow run.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals
Anyone with read access to the repository can use this endpoint.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
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."
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts
Lists artifacts for a workflow run.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
name | query | no | The name field of an artifact. When specified, only artifacts with this name will be returned. |
direction | query | no | The direction to sort the results by. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}
Gets a specific workflow run attempt.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
attempt_number | path | yes | The attempt number of the workflow run. |
exclude_pull_requests | query | no | If true pull requests are omitted from the response (empty array). |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs
Lists jobs for a specific workflow run attempt. You can use parameters to narrow the list of results. For more information
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
attempt_number | path | yes | The attempt number of the workflow run. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
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
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
attempt_number | path | yes | The attempt number of the workflow run. |
| Status | Description | Has JSON body |
|---|---|---|
| 302 | Response | no |
POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel
Cancels a workflow run using its id.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
| Status | Description | Has JSON body |
|---|---|---|
| 202 | Response | yes |
| 409 | Conflict | yes |
GET /repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups
Lists all concurrency groups associated with a workflow run or its jobs.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
before | query | no | A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see "Using pagination in the REST API." |
after | query | no | A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
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."
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
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.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
| Status | Description | Has JSON body |
|---|---|---|
| 202 | Response | yes |
| 409 | Conflict | yes |
GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs
Lists jobs for a workflow run. You can use parameters to narrow the list of results. For more information
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
filter | query | no | Filters jobs by their completed_at timestamp. latest returns jobs from the most recent execution of the workflow run. all returns all jobs for a workflow run, including from old executions of the workflow run. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
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
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
| Status | Description | Has JSON body |
|---|---|---|
| 302 | Response | no |
DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs
Deletes all logs for a workflow run.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 403 | Forbidden | yes |
| 500 | Internal Error | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments
Approve or reject pending deployments that are waiting on approval by a required reviewer.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun
Re-runs your workflow run using its id.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
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.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing
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".
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
run_id | path | yes | The unique identifier of the workflow run. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/actions/secrets
Lists all secrets available in a repository without revealing their encrypted
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/actions/secrets/public-key
Gets your public key, which you need to encrypt secrets. You need to
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/actions/secrets/{secret_name}
Gets a single repository secret without revealing its encrypted value.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}
Creates or updates a repository secret with an encrypted value. Encrypt your secret using
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response when creating a secret | yes |
| 204 | Response when updating a secret | no |
DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}
Deletes a secret in a repository using the secret name.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /repos/{owner}/{repo}/actions/variables
Lists all repository variables.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 30). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
POST /repos/{owner}/{repo}/actions/variables
Creates a repository variable that you can reference in a GitHub Actions workflow.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
GET /repos/{owner}/{repo}/actions/variables/{name}
Gets a specific variable in a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
name | path | yes | The name of the variable. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PATCH /repos/{owner}/{repo}/actions/variables/{name}
Updates a repository variable that you can reference in a GitHub Actions workflow.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
name | path | yes | The name of the variable. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
DELETE /repos/{owner}/{repo}/actions/variables/{name}
Deletes a repository variable using the variable name.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
name | path | yes | The name of the variable. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /repos/{owner}/{repo}/actions/workflows
Lists the workflows in a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}
Gets a specific workflow. You can replace workflow_id with the workflow
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
workflow_id | path | yes | The ID of the workflow. You can also pass the workflow file name as a string. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable
Disables a workflow and sets the state of the workflow to disabled_manually. You can replace workflow_id with the workflow file name. For example, you could use main.yaml.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
workflow_id | path | yes | The ID of the workflow. You can also pass the workflow file name as a string. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace workflow_id with the workflow file name. For example, you could use main.yaml.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
workflow_id | path | yes | The ID of the workflow. You can also pass the workflow file name as a string. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Empty response when return_run_details parameter is false. | no |
| 200 | Response including the workflow run ID and URLs when return_run_details parameter is true. | yes |
PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable
Enables a workflow and sets the state of the workflow to active. You can replace workflow_id with the workflow file name. For example, you could use main.yaml.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
workflow_id | path | yes | The ID of the workflow. You can also pass the workflow file name as a string. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
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.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
workflow_id | path | yes | The ID of the workflow. You can also pass the workflow file name as a string. |
actor | query | no | Returns someone's workflow runs. Use the login for the user who created the push associated with the check suite or workflow run. |
branch | query | no | Returns workflow runs associated with a branch. Use the name of the branch of the push. |
event | query | no | Returns workflow run triggered by the event you specify. For example, push, pull_request or issue. For more information, see "Events that trigger workflows." |
status | query | no | 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. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
created | query | no | Returns workflow runs created within the given date-time range. For more information on the syntax, see "Understanding the search syntax." |
exclude_pull_requests | query | no | If true pull requests are omitted from the response (empty array). |
check_suite_id | query | no | Returns workflow runs with the check_suite_id that you specify. |
head_sha | query | no | Only returns workflow runs that are associated with the specified head_sha. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing
Gets the number of billable minutes used by a specific workflow during the current billing cycle. 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".
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
workflow_id | path | yes | The ID of the workflow. You can also pass the workflow file name as a string. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/environments/{environment_name}/secrets
Lists all secrets available in an environment without revealing their
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
environment_name | path | yes | The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key
Get the public key for an environment, which you need to encrypt environment
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
environment_name | path | yes | The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}
Gets a single environment secret without revealing its encrypted value.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
environment_name | path | yes | The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}
Creates or updates an environment secret with an encrypted value. Encrypt your secret using
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
environment_name | path | yes | The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response when creating a secret | yes |
| 204 | Response when updating a secret | no |
DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}
Deletes a secret in an environment using the secret name.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
environment_name | path | yes | The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Default response | no |
GET /repos/{owner}/{repo}/environments/{environment_name}/variables
Lists all environment variables.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
environment_name | path | yes | The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F. |
per_page | query | no | The number of results per page (max 30). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
POST /repos/{owner}/{repo}/environments/{environment_name}/variables
Create an environment variable that you can reference in a GitHub Actions workflow.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
environment_name | path | yes | The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}
Gets a specific variable in an environment.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
environment_name | path | yes | The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F. |
name | path | yes | The name of the variable. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}
Updates an environment variable that you can reference in a GitHub Actions workflow.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
name | path | yes | The name of the variable. |
environment_name | path | yes | The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}
Deletes an environment variable using the variable name.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
name | path | yes | The name of the variable. |
environment_name | path | yes | The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |