← All tags

Actions API Reference

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 GitHub Actions cache retention limit for an enterprise

GET /enterprises/{enterprise}/actions/cache/retention-limit

Gets GitHub Actions cache retention limit for an enterprise. All organizations and repositories under this

Parameters

NameInRequiredDescription
enterprisepathyesThe slug version of the enterprise name.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Set GitHub Actions cache retention limit for an enterprise

PUT /enterprises/{enterprise}/actions/cache/retention-limit

Sets GitHub Actions cache retention limit for an enterprise. All organizations and repositories under this

Parameters

NameInRequiredDescription
enterprisepathyesThe slug version of the enterprise name.

Responses

StatusDescriptionHas JSON body
204Responseno
400Bad Requestyes
403Forbiddenyes
404Resource not foundyes

Get GitHub Actions cache storage limit for an enterprise

GET /enterprises/{enterprise}/actions/cache/storage-limit

Gets GitHub Actions cache storage limit for an enterprise. All organizations and repositories under this

Parameters

NameInRequiredDescription
enterprisepathyesThe slug version of the enterprise name.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Set GitHub Actions cache storage limit for an enterprise

PUT /enterprises/{enterprise}/actions/cache/storage-limit

Sets GitHub Actions cache storage limit for an enterprise. All organizations and repositories under this

Parameters

NameInRequiredDescription
enterprisepathyesThe slug version of the enterprise name.

Responses

StatusDescriptionHas JSON body
204Responseno
400Bad Requestyes
403Forbiddenyes
404Resource not foundyes

Get GitHub Actions cache retention limit for an organization

GET /organizations/{org}/actions/cache/retention-limit

Gets GitHub Actions cache retention limit for an organization. All repositories under this

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Set GitHub Actions cache retention limit for an organization

PUT /organizations/{org}/actions/cache/retention-limit

Sets GitHub Actions cache retention limit for an organization. All repositories under this

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Responseno
400Bad Requestyes
403Forbiddenyes
404Resource not foundyes

Get GitHub Actions cache storage limit for an organization

GET /organizations/{org}/actions/cache/storage-limit

Gets GitHub Actions cache storage limit for an organization. All repositories under this

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Set GitHub Actions cache storage limit for an organization

PUT /organizations/{org}/actions/cache/storage-limit

Sets GitHub Actions cache storage limit for an organization. All organizations and repositories under this

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Responseno
400Bad Requestyes
403Forbiddenyes
404Resource not foundyes

Get GitHub Actions cache usage for an organization

GET /orgs/{org}/actions/cache/usage

Gets the total GitHub Actions cache usage for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

List repositories with GitHub Actions cache usage for an organization

GET /orgs/{org}/actions/cache/usage-by-repository

Lists repositories and their GitHub Actions cache usage for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

List GitHub-hosted runners for an organization

GET /orgs/{org}/actions/hosted-runners

Lists all GitHub-hosted runners configured in an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Create a GitHub-hosted runner for an organization

POST /orgs/{org}/actions/hosted-runners

Creates a GitHub-hosted runner for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Responseyes

List custom images for an organization

GET /orgs/{org}/actions/hosted-runners/images/custom

List custom images for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Get a custom image definition for GitHub Actions Hosted Runners

GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}

Get a custom image definition for GitHub Actions Hosted Runners.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
image_definition_idpathyesImage definition ID of custom image

Responses

StatusDescriptionHas JSON body
200Responseyes

Delete a custom image from the organization

DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}

Delete a custom image from the organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
image_definition_idpathyesImage definition ID of custom image

Responses

StatusDescriptionHas JSON body
204Responseno

List image versions of a custom image for an organization

GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions

List image versions of a custom image for an organization.

Parameters

NameInRequiredDescription
image_definition_idpathyesImage definition ID of custom image
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Get an image version of a custom image for GitHub Actions Hosted Runners

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.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
image_definition_idpathyesImage definition ID of custom image
versionpathyesVersion of a custom image

Responses

StatusDescriptionHas JSON body
200Responseyes

Delete an image version of custom image from the organization

DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}

Delete an image version of custom image from the organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
image_definition_idpathyesImage definition ID of custom image
versionpathyesVersion of a custom image

Responses

StatusDescriptionHas JSON body
204Responseno

Get GitHub-owned images for GitHub-hosted runners in an organization

GET /orgs/{org}/actions/hosted-runners/images/github-owned

Get the list of GitHub-owned images available for GitHub-hosted runners for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Get partner images for GitHub-hosted runners in an organization

GET /orgs/{org}/actions/hosted-runners/images/partner

Get the list of partner images available for GitHub-hosted runners for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Get limits on GitHub-hosted runners for an organization

GET /orgs/{org}/actions/hosted-runners/limits

Get the GitHub-hosted runners limits for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Get GitHub-hosted runners machine specs for an organization

GET /orgs/{org}/actions/hosted-runners/machine-sizes

Get the list of machine specs available for GitHub-hosted runners for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Get platforms for GitHub-hosted runners in an organization

GET /orgs/{org}/actions/hosted-runners/platforms

Get the list of platforms available for GitHub-hosted runners for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Get a GitHub-hosted runner for an organization

GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id}

Gets a GitHub-hosted runner configured in an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
hosted_runner_idpathyesUnique identifier of the GitHub-hosted runner.

Responses

StatusDescriptionHas JSON body
200Responseyes

Update a GitHub-hosted runner for an organization

PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id}

Updates a GitHub-hosted runner for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
hosted_runner_idpathyesUnique identifier of the GitHub-hosted runner.

Responses

StatusDescriptionHas JSON body
200Responseyes

Delete a GitHub-hosted runner for an organization

DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id}

Deletes a GitHub-hosted runner for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
hosted_runner_idpathyesUnique identifier of the GitHub-hosted runner.

Responses

StatusDescriptionHas JSON body
202Responseyes

Get GitHub Actions permissions for an organization

GET /orgs/{org}/actions/permissions

Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Set GitHub Actions permissions for an organization

PUT /orgs/{org}/actions/permissions

Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Responseno

Get artifact and log retention settings for an organization

GET /orgs/{org}/actions/permissions/artifact-and-log-retention

Gets artifact and log retention settings for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Set artifact and log retention settings for an organization

PUT /orgs/{org}/actions/permissions/artifact-and-log-retention

Sets artifact and log retention settings for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204No contentno
403Forbiddenyes
404Resource not foundyes
409Conflictyes
422Validation failed, or the endpoint has been spammed.yes

Get fork PR contributor approval permissions for an organization

GET /orgs/{org}/actions/permissions/fork-pr-contributor-approval

Gets the fork PR contributor approval policy for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes

Set fork PR contributor approval permissions for an organization

PUT /orgs/{org}/actions/permissions/fork-pr-contributor-approval

Sets the fork PR contributor approval policy for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Responseno
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Get private repo fork PR workflow settings for an organization

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.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Set private repo fork PR workflow settings for an organization

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.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Empty response for successful settings updateno
403Forbidden - Fork PR workflow settings for private repositories are managed by the enterprise owneryes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

List selected repositories enabled for GitHub Actions in an organization

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

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Set selected repositories enabled for GitHub Actions in an organization

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

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Responseno

Enable a selected repository for GitHub Actions in an organization

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

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
repository_idpathyesThe unique identifier of the repository.

Responses

StatusDescriptionHas JSON body
204Responseno

Disable a selected repository for GitHub Actions in an organization

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

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
repository_idpathyesThe unique identifier of the repository.

Responses

StatusDescriptionHas JSON body
204Responseno

Get allowed actions and reusable workflows for an organization

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

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Set allowed actions and reusable workflows for an organization

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

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Responseno

Get self-hosted runners settings for an organization

GET /orgs/{org}/actions/permissions/self-hosted-runners

Gets the settings for self-hosted runners for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Set self-hosted runners settings for an organization

PUT /orgs/{org}/actions/permissions/self-hosted-runners

Sets the settings for self-hosted runners for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204No contentno
403Forbiddenyes
404Resource not foundyes
409Conflictyes
422Validation failed, or the endpoint has been spammed.yes

List repositories allowed to use self-hosted runners in an organization

GET /orgs/{org}/actions/permissions/self-hosted-runners/repositories

Lists repositories that are allowed to use self-hosted runners in an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Set repositories allowed to use self-hosted runners in an organization

PUT /orgs/{org}/actions/permissions/self-hosted-runners/repositories

Sets repositories that are allowed to use self-hosted runners in an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204No contentno
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Add a repository to the list of repositories allowed to use self-hosted runners in an organization

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.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
repository_idpathyesThe unique identifier of the repository.

Responses

StatusDescriptionHas JSON body
204No contentno
403Forbiddenyes
404Resource not foundyes
409Conflictyes
422Validation failed, or the endpoint has been spammed.yes

Remove a repository from the list of repositories allowed to use self-hosted runners in an organization

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.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
repository_idpathyesThe unique identifier of the repository.

Responses

StatusDescriptionHas JSON body
204No contentno
403Forbiddenyes
404Resource not foundyes
409Conflictyes
422Validation failed, or the endpoint has been spammed.yes

Get default workflow permissions for an organization

GET /orgs/{org}/actions/permissions/workflow

Gets the default workflow permissions granted to the GITHUB_TOKEN when running workflows in an organization,

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Set default workflow permissions for an organization

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

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Success responseno

List self-hosted runner groups for an organization

GET /orgs/{org}/actions/runner-groups

Lists all self-hosted runner groups configured in an organization and inherited from an enterprise.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
visible_to_repositoryquerynoOnly return runner groups that are allowed to be used by this repository.

Responses

StatusDescriptionHas JSON body
200Responseyes

Create a self-hosted runner group for an organization

POST /orgs/{org}/actions/runner-groups

Creates a new self-hosted runner group for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Responseyes

Get a self-hosted runner group for an organization

GET /orgs/{org}/actions/runner-groups/{runner_group_id}

Gets a specific self-hosted runner group for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_group_idpathyesUnique identifier of the self-hosted runner group.

Responses

StatusDescriptionHas JSON body
200Responseyes

Update a self-hosted runner group for an organization

PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}

Updates the name and visibility of a self-hosted runner group in an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_group_idpathyesUnique identifier of the self-hosted runner group.

Responses

StatusDescriptionHas JSON body
200Responseyes

Delete a self-hosted runner group from an organization

DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}

Deletes a self-hosted runner group for an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_group_idpathyesUnique identifier of the self-hosted runner group.

Responses

StatusDescriptionHas JSON body
204Responseno

List GitHub-hosted runners in a group for an organization

GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners

Lists the GitHub-hosted runners in an organization group.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_group_idpathyesUnique identifier of the self-hosted runner group.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

List repository access to a self-hosted runner group in an organization

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.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_group_idpathyesUnique identifier of the self-hosted runner group.
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Set repository access for a self-hosted runner group in an organization

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.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_group_idpathyesUnique identifier of the self-hosted runner group.

Responses

StatusDescriptionHas JSON body
204Responseno

Add repository access to a self-hosted runner group in an organization

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

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_group_idpathyesUnique identifier of the self-hosted runner group.
repository_idpathyesThe unique identifier of the repository.

Responses

StatusDescriptionHas JSON body
204Responseno

Remove repository access to a self-hosted runner group in an organization

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

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_group_idpathyesUnique identifier of the self-hosted runner group.
repository_idpathyesThe unique identifier of the repository.

Responses

StatusDescriptionHas JSON body
204Responseno

List self-hosted runners in a group for an organization

GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners

Lists self-hosted runners that are in a specific organization group.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_group_idpathyesUnique identifier of the self-hosted runner group.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Set self-hosted runners in a group for an organization

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.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_group_idpathyesUnique identifier of the self-hosted runner group.

Responses

StatusDescriptionHas JSON body
204Responseno

Add a self-hosted runner to a group for an organization

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.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_group_idpathyesUnique identifier of the self-hosted runner group.
runner_idpathyesUnique identifier of the self-hosted runner.

Responses

StatusDescriptionHas JSON body
204Responseno

Remove a self-hosted runner from a group for an organization

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.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_group_idpathyesUnique identifier of the self-hosted runner group.
runner_idpathyesUnique identifier of the self-hosted runner.

Responses

StatusDescriptionHas JSON body
204Responseno

List self-hosted runners for an organization

GET /orgs/{org}/actions/runners

Lists all self-hosted runners configured in an organization.

Parameters

NameInRequiredDescription
namequerynoThe name of a self-hosted runner.
orgpathyesThe organization name. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

List runner applications for an organization

GET /orgs/{org}/actions/runners/downloads

Lists binaries for the runner application that you can download and run.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Create configuration for a just-in-time runner for an organization

POST /orgs/{org}/actions/runners/generate-jitconfig

Generates a configuration that can be passed to the runner application at startup.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Responseyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes
409Conflictyes

Create a registration token for an organization

POST /orgs/{org}/actions/runners/registration-token

Returns a token that you can pass to the config script. The token expires after one hour.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Responseyes

Create a remove token for an organization

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.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Responseyes

Get a self-hosted runner for an organization

GET /orgs/{org}/actions/runners/{runner_id}

Gets a specific self-hosted runner configured in an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_idpathyesUnique identifier of the self-hosted runner.

Responses

StatusDescriptionHas JSON body
200Responseyes

Delete a self-hosted runner from an organization

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.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_idpathyesUnique identifier of the self-hosted runner.

Responses

StatusDescriptionHas JSON body
204Responseno
422Validation failed, or the endpoint has been spammed.yes

List labels for a self-hosted runner for an organization

GET /orgs/{org}/actions/runners/{runner_id}/labels

Lists all labels for a self-hosted runner configured in an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_idpathyesUnique identifier of the self-hosted runner.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes

Add custom labels to a self-hosted runner for an organization

POST /orgs/{org}/actions/runners/{runner_id}/labels

Adds custom labels to a self-hosted runner configured in an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_idpathyesUnique identifier of the self-hosted runner.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Set custom labels for a self-hosted runner for an organization

PUT /orgs/{org}/actions/runners/{runner_id}/labels

Remove all previous custom labels and set the new custom labels for a specific

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_idpathyesUnique identifier of the self-hosted runner.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Remove all custom labels from a self-hosted runner for an organization

DELETE /orgs/{org}/actions/runners/{runner_id}/labels

Remove all custom labels from a self-hosted runner configured in an

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_idpathyesUnique identifier of the self-hosted runner.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes

Remove a custom label from a self-hosted runner for an organization

DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}

Remove a custom label from a self-hosted runner configured

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
runner_idpathyesUnique identifier of the self-hosted runner.
namepathyesThe name of a self-hosted runner's custom label.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

List organization secrets

GET /orgs/{org}/actions/secrets

Lists all secrets available in an organization without revealing their

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Get an organization public key

GET /orgs/{org}/actions/secrets/public-key

Gets your public key, which you need to encrypt secrets. You need to

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Get an organization secret

GET /orgs/{org}/actions/secrets/{secret_name}

Gets a single organization secret without revealing its encrypted value.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
secret_namepathyesThe name of the secret.

Responses

StatusDescriptionHas JSON body
200Responseyes

Create or update an organization secret

PUT /orgs/{org}/actions/secrets/{secret_name}

Creates or updates an organization secret with an encrypted value. Encrypt your secret using

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
secret_namepathyesThe name of the secret.

Responses

StatusDescriptionHas JSON body
201Response when creating a secretyes
204Response when updating a secretno

Delete an organization secret

DELETE /orgs/{org}/actions/secrets/{secret_name}

Deletes a secret in an organization using the secret name.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
secret_namepathyesThe name of the secret.

Responses

StatusDescriptionHas JSON body
204Responseno

List selected repositories for an organization secret

GET /orgs/{org}/actions/secrets/{secret_name}/repositories

Lists all repositories that have been selected when the visibility

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
secret_namepathyesThe name of the secret.
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Set selected repositories for an organization secret

PUT /orgs/{org}/actions/secrets/{secret_name}/repositories

Replaces all repositories for an organization secret when the visibility

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
secret_namepathyesThe name of the secret.

Responses

StatusDescriptionHas JSON body
204Responseno

Add selected repository to an organization secret

PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}

Adds a repository to an organization secret when the visibility for

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
secret_namepathyesThe name of the secret.
repository_idpathyes

Responses

StatusDescriptionHas JSON body
204No Content when repository was added to the selected listno
409Conflict when visibility type is not set to selectedno

Remove selected repository from an organization secret

DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}

Removes a repository from an organization secret when the visibility

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
secret_namepathyesThe name of the secret.
repository_idpathyes

Responses

StatusDescriptionHas JSON body
204Response when repository was removed from the selected listno
409Conflict when visibility type not set to selectedno

List organization variables

GET /orgs/{org}/actions/variables

Lists all organization variables.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 30). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Create an organization variable

POST /orgs/{org}/actions/variables

Creates an organization variable that you can reference in a GitHub Actions workflow.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Response when creating a variableyes

Get an organization variable

GET /orgs/{org}/actions/variables/{name}

Gets a specific variable in an organization.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
namepathyesThe name of the variable.

Responses

StatusDescriptionHas JSON body
200Responseyes

Update an organization variable

PATCH /orgs/{org}/actions/variables/{name}

Updates an organization variable that you can reference in a GitHub Actions workflow.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
namepathyesThe name of the variable.

Responses

StatusDescriptionHas JSON body
204Responseno

Delete an organization variable

DELETE /orgs/{org}/actions/variables/{name}

Deletes an organization variable using the variable name.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
namepathyesThe name of the variable.

Responses

StatusDescriptionHas JSON body
204Responseno

List selected repositories for an organization variable

GET /orgs/{org}/actions/variables/{name}/repositories

Lists all repositories that can access an organization variable

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
namepathyesThe name of the variable.
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
409Response when the visibility of the variable is not set to selectedno

Set selected repositories for an organization variable

PUT /orgs/{org}/actions/variables/{name}/repositories

Replaces all repositories for an organization variable that is available

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
namepathyesThe name of the variable.

Responses

StatusDescriptionHas JSON body
204Responseno
409Response when the visibility of the variable is not set to selectedno

Add selected repository to an organization variable

PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}

Adds a repository to an organization variable that is available to selected repositories.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
namepathyesThe name of the variable.
repository_idpathyes

Responses

StatusDescriptionHas JSON body
204Responseno
409Response when the visibility of the variable is not set to selectedno

Remove selected repository from an organization variable

DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}

Removes a repository from an organization variable that is

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
namepathyesThe name of the variable.
repository_idpathyes

Responses

StatusDescriptionHas JSON body
204Responseno
409Response when the visibility of the variable is not set to selectedno

List artifacts for a repository

GET /repos/{owner}/{repo}/actions/artifacts

Lists all artifacts for a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
namequerynoThe name field of an artifact. When specified, only artifacts with this name will be returned.

Responses

StatusDescriptionHas JSON body
200Responseyes

Get an artifact

GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}

Gets a specific artifact for a workflow run.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
artifact_idpathyesThe unique identifier of the artifact.

Responses

StatusDescriptionHas JSON body
200Responseyes

Delete an artifact

DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}

Deletes an artifact for a workflow run.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
artifact_idpathyesThe unique identifier of the artifact.

Responses

StatusDescriptionHas JSON body
204Responseno

Download an artifact

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
artifact_idpathyesThe unique identifier of the artifact.
archive_formatpathyes

Responses

StatusDescriptionHas JSON body
302Responseno
410Goneyes

Get GitHub Actions cache retention limit for a repository

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Set GitHub Actions cache retention limit for a repository

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Responseno
400Bad Requestyes
403Forbiddenyes
404Resource not foundyes

Get GitHub Actions cache storage limit for a repository

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Set GitHub Actions cache storage limit for a repository

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Responseno
400Bad Requestyes
403Forbiddenyes
404Resource not foundyes

Get GitHub Actions cache usage for a repository

GET /repos/{owner}/{repo}/actions/cache/usage

Gets GitHub Actions cache usage for a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

List GitHub Actions caches for a repository

GET /repos/{owner}/{repo}/actions/caches

Lists the GitHub Actions caches for a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
refquerynoThe 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.
keyquerynoAn explicit key or prefix for identifying the cache
sortquerynoThe 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.
directionquerynoThe direction to sort the results by.

Responses

StatusDescriptionHas JSON body
200Responseyes

Delete GitHub Actions caches for a repository (using a cache key)

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
keyqueryyesA key for identifying the cache.
refquerynoThe 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.

Responses

StatusDescriptionHas JSON body
200Responseyes

Delete a GitHub Actions cache for a repository (using a cache ID)

DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}

Deletes a GitHub Actions cache for a repository, using a cache ID.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
cache_idpathyesThe unique identifier of the GitHub Actions cache.

Responses

StatusDescriptionHas JSON body
204Responseno

List concurrency groups for a repository

GET /repos/{owner}/{repo}/actions/concurrency_groups

Lists the active concurrency groups for a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
afterquerynoA 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."

Responses

StatusDescriptionHas JSON body
200Responseyes
422Validation failed, or the endpoint has been spammed.yes

Get a concurrency group for a repository

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
concurrency_group_namepathyesThe name of the concurrency group.
ahead_of_runquerynoFilter to items ahead of this workflow run ID in the queue, plus the run itself.
ahead_of_jobquerynoFilter to items ahead of this job ID in the queue, plus the job itself.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Get a job for a workflow run

GET /repos/{owner}/{repo}/actions/jobs/{job_id}

Gets a specific job in a workflow run.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
job_idpathyesThe unique identifier of the job.

Responses

StatusDescriptionHas JSON body
200Responseyes

Download job logs for a workflow run

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
job_idpathyesThe unique identifier of the job.

Responses

StatusDescriptionHas JSON body
302Responseno

Re-run a job from a workflow run

POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun

Re-run a job and its dependent jobs in a workflow run.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
job_idpathyesThe unique identifier of the job.

Responses

StatusDescriptionHas JSON body
201Responseyes
403Forbiddenyes

Get the customization template for an OIDC subject claim for a repository

GET /repos/{owner}/{repo}/actions/oidc/customization/sub

Gets the customization template for an OpenID Connect (OIDC) subject claim.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Status responseyes
400Bad Requestyes
404Resource not foundyes

Set the customization template for an OIDC subject claim for a repository

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Empty responseyes
404Resource not foundyes
400Bad Requestyes
422Validation failed, or the endpoint has been spammed.yes

List repository organization secrets

GET /repos/{owner}/{repo}/actions/organization-secrets

Lists all organization secrets shared with a repository without revealing their encrypted

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

List repository organization variables

GET /repos/{owner}/{repo}/actions/organization-variables

Lists all organization variables shared with a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 30). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Get GitHub Actions permissions for a repository

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Set GitHub Actions permissions for a repository

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Responseno

Get the level of access for workflows outside of the repository

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Set the level of access for workflows outside of the repository

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Responseno

Get artifact and log retention settings for a repository

GET /repos/{owner}/{repo}/actions/permissions/artifact-and-log-retention

Gets artifact and log retention settings for a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes

Set artifact and log retention settings for a repository

PUT /repos/{owner}/{repo}/actions/permissions/artifact-and-log-retention

Sets artifact and log retention settings for a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Empty response for successful settings updateno
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Get fork PR contributor approval permissions for a repository

GET /repos/{owner}/{repo}/actions/permissions/fork-pr-contributor-approval

Gets the fork PR contributor approval policy for a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes

Set fork PR contributor approval permissions for a repository

PUT /repos/{owner}/{repo}/actions/permissions/fork-pr-contributor-approval

Sets the fork PR contributor approval policy for a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Responseno
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Get private repo fork PR workflow settings for a repository

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes

Set private repo fork PR workflow settings for a repository

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Empty response for successful settings updateno
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Get allowed actions and reusable workflows for a repository

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Set allowed actions and reusable workflows for a repository

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Responseno

Get default workflow permissions for a repository

GET /repos/{owner}/{repo}/actions/permissions/workflow

Gets the default workflow permissions granted to the GITHUB_TOKEN when running workflows in a repository,

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Set default workflow permissions for a repository

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
204Success responseno
409Conflict response when changing a setting is prevented by the owning organizationno

List self-hosted runners for a repository

GET /repos/{owner}/{repo}/actions/runners

Lists all self-hosted runners configured in a repository.

Parameters

NameInRequiredDescription
namequerynoThe name of a self-hosted runner.
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

List runner applications for a repository

GET /repos/{owner}/{repo}/actions/runners/downloads

Lists binaries for the runner application that you can download and run.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Create configuration for a just-in-time runner for a repository

POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig

Generates a configuration that can be passed to the runner application at startup.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Responseyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes
409Conflictyes

Create a registration token for a repository

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Responseyes

Create a remove token for a repository

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Responseyes

Get a self-hosted runner for a repository

GET /repos/{owner}/{repo}/actions/runners/{runner_id}

Gets a specific self-hosted runner configured in a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
runner_idpathyesUnique identifier of the self-hosted runner.

Responses

StatusDescriptionHas JSON body
200Responseyes

Delete a self-hosted runner from a repository

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
runner_idpathyesUnique identifier of the self-hosted runner.

Responses

StatusDescriptionHas JSON body
204Responseno
422Validation failed, or the endpoint has been spammed.yes

List labels for a self-hosted runner for a repository

GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels

Lists all labels for a self-hosted runner configured in a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
runner_idpathyesUnique identifier of the self-hosted runner.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes

Add custom labels to a self-hosted runner for a repository

POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels

Adds custom labels to a self-hosted runner configured in a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
runner_idpathyesUnique identifier of the self-hosted runner.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Set custom labels for a self-hosted runner for a repository

PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels

Remove all previous custom labels and set the new custom labels for a specific

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
runner_idpathyesUnique identifier of the self-hosted runner.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Remove all custom labels from a self-hosted runner for a repository

DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels

Remove all custom labels from a self-hosted runner configured in a

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
runner_idpathyesUnique identifier of the self-hosted runner.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes

Remove a custom label from a self-hosted runner for a repository

DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}

Remove a custom label from a self-hosted runner configured

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
runner_idpathyesUnique identifier of the self-hosted runner.
namepathyesThe name of a self-hosted runner's custom label.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

List workflow runs for a repository

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
actorquerynoReturns someone's workflow runs. Use the login for the user who created the push associated with the check suite or workflow run.
branchquerynoReturns workflow runs associated with a branch. Use the name of the branch of the push.
eventquerynoReturns workflow run triggered by the event you specify. For example, push, pull_request or issue. For more information, see "Events that trigger workflows."
statusquerynoReturns 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_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
createdquerynoReturns workflow runs created within the given date-time range. For more information on the syntax, see "Understanding the search syntax."
exclude_pull_requestsquerynoIf true pull requests are omitted from the response (empty array).
check_suite_idquerynoReturns workflow runs with the check_suite_id that you specify.
head_shaquerynoOnly returns workflow runs that are associated with the specified head_sha.

Responses

StatusDescriptionHas JSON body
200Responseyes

Get a workflow run

GET /repos/{owner}/{repo}/actions/runs/{run_id}

Gets a specific workflow run.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.
exclude_pull_requestsquerynoIf true pull requests are omitted from the response (empty array).

Responses

StatusDescriptionHas JSON body
200Responseyes

Delete a workflow run

DELETE /repos/{owner}/{repo}/actions/runs/{run_id}

Deletes a specific workflow run.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.

Responses

StatusDescriptionHas JSON body
204Responseno

Get the review history for a workflow run

GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals

Anyone with read access to the repository can use this endpoint.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.

Responses

StatusDescriptionHas JSON body
200Responseyes

Approve a workflow run for a fork pull request

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.

Responses

StatusDescriptionHas JSON body
201Responseyes
404Resource not foundyes
403Forbiddenyes

List workflow run artifacts

GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts

Lists artifacts for a workflow run.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
namequerynoThe name field of an artifact. When specified, only artifacts with this name will be returned.
directionquerynoThe direction to sort the results by.

Responses

StatusDescriptionHas JSON body
200Responseyes

Get a workflow run attempt

GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}

Gets a specific workflow run attempt.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.
attempt_numberpathyesThe attempt number of the workflow run.
exclude_pull_requestsquerynoIf true pull requests are omitted from the response (empty array).

Responses

StatusDescriptionHas JSON body
200Responseyes

List jobs for a workflow run attempt

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.
attempt_numberpathyesThe attempt number of the workflow run.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes

Download workflow run attempt logs

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.
attempt_numberpathyesThe attempt number of the workflow run.

Responses

StatusDescriptionHas JSON body
302Responseno

Cancel a workflow run

POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel

Cancels a workflow run using its id.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.

Responses

StatusDescriptionHas JSON body
202Responseyes
409Conflictyes

List concurrency groups for a workflow run

GET /repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups

Lists all concurrency groups associated with a workflow run or its jobs.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
beforequerynoA 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."
afterquerynoA 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."

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Review custom deployment protection rules for a workflow run

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.

Responses

StatusDescriptionHas JSON body
204Responseno

Force cancel a workflow run

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.

Responses

StatusDescriptionHas JSON body
202Responseyes
409Conflictyes

List jobs for a workflow run

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.
filterquerynoFilters 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_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Download workflow run logs

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.

Responses

StatusDescriptionHas JSON body
302Responseno

Delete workflow run logs

DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs

Deletes all logs for a workflow run.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.

Responses

StatusDescriptionHas JSON body
204Responseno
403Forbiddenyes
500Internal Erroryes

Get pending deployments for a workflow run

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.

Responses

StatusDescriptionHas JSON body
200Responseyes

Review pending deployments for a workflow run

POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments

Approve or reject pending deployments that are waiting on approval by a required reviewer.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.

Responses

StatusDescriptionHas JSON body
200Responseyes

Re-run a workflow

POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun

Re-runs your workflow run using its id.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.

Responses

StatusDescriptionHas JSON body
201Responseyes

Re-run failed jobs from a workflow run

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.

Responses

StatusDescriptionHas JSON body
201Responseyes

Get workflow run usage

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
run_idpathyesThe unique identifier of the workflow run.

Responses

StatusDescriptionHas JSON body
200Responseyes

List repository secrets

GET /repos/{owner}/{repo}/actions/secrets

Lists all secrets available in a repository without revealing their encrypted

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Get a repository public key

GET /repos/{owner}/{repo}/actions/secrets/public-key

Gets your public key, which you need to encrypt secrets. You need to

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
200Responseyes

Get a repository secret

GET /repos/{owner}/{repo}/actions/secrets/{secret_name}

Gets a single repository secret without revealing its encrypted value.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
secret_namepathyesThe name of the secret.

Responses

StatusDescriptionHas JSON body
200Responseyes

Create or update a repository secret

PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}

Creates or updates a repository secret with an encrypted value. Encrypt your secret using

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
secret_namepathyesThe name of the secret.

Responses

StatusDescriptionHas JSON body
201Response when creating a secretyes
204Response when updating a secretno

Delete a repository secret

DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}

Deletes a secret in a repository using the secret name.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
secret_namepathyesThe name of the secret.

Responses

StatusDescriptionHas JSON body
204Responseno

List repository variables

GET /repos/{owner}/{repo}/actions/variables

Lists all repository variables.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 30). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Create a repository variable

POST /repos/{owner}/{repo}/actions/variables

Creates a repository variable that you can reference in a GitHub Actions workflow.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Responseyes

Get a repository variable

GET /repos/{owner}/{repo}/actions/variables/{name}

Gets a specific variable in a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
namepathyesThe name of the variable.

Responses

StatusDescriptionHas JSON body
200Responseyes

Update a repository variable

PATCH /repos/{owner}/{repo}/actions/variables/{name}

Updates a repository variable that you can reference in a GitHub Actions workflow.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
namepathyesThe name of the variable.

Responses

StatusDescriptionHas JSON body
204Responseno

Delete a repository variable

DELETE /repos/{owner}/{repo}/actions/variables/{name}

Deletes a repository variable using the variable name.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
namepathyesThe name of the variable.

Responses

StatusDescriptionHas JSON body
204Responseno

List repository workflows

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

Lists the workflows in a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Get a workflow

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

Gets a specific workflow. You can replace workflow_id with the workflow

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
workflow_idpathyesThe ID of the workflow. You can also pass the workflow file name as a string.

Responses

StatusDescriptionHas JSON body
200Responseyes

Disable a workflow

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
workflow_idpathyesThe ID of the workflow. You can also pass the workflow file name as a string.

Responses

StatusDescriptionHas JSON body
204Responseno

Create a workflow dispatch event

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
workflow_idpathyesThe ID of the workflow. You can also pass the workflow file name as a string.

Responses

StatusDescriptionHas JSON body
204Empty response when return_run_details parameter is false.no
200Response including the workflow run ID and URLs when return_run_details parameter is true.yes

Enable a workflow

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
workflow_idpathyesThe ID of the workflow. You can also pass the workflow file name as a string.

Responses

StatusDescriptionHas JSON body
204Responseno

List workflow runs for a workflow

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.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
workflow_idpathyesThe ID of the workflow. You can also pass the workflow file name as a string.
actorquerynoReturns someone's workflow runs. Use the login for the user who created the push associated with the check suite or workflow run.
branchquerynoReturns workflow runs associated with a branch. Use the name of the branch of the push.
eventquerynoReturns workflow run triggered by the event you specify. For example, push, pull_request or issue. For more information, see "Events that trigger workflows."
statusquerynoReturns 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_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
createdquerynoReturns workflow runs created within the given date-time range. For more information on the syntax, see "Understanding the search syntax."
exclude_pull_requestsquerynoIf true pull requests are omitted from the response (empty array).
check_suite_idquerynoReturns workflow runs with the check_suite_id that you specify.
head_shaquerynoOnly returns workflow runs that are associated with the specified head_sha.

Responses

StatusDescriptionHas JSON body
200Responseyes

Get workflow usage

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
workflow_idpathyesThe ID of the workflow. You can also pass the workflow file name as a string.

Responses

StatusDescriptionHas JSON body
200Responseyes

List environment secrets

GET /repos/{owner}/{repo}/environments/{environment_name}/secrets

Lists all secrets available in an environment without revealing their

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
environment_namepathyesThe name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Get an environment public key

GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key

Get the public key for an environment, which you need to encrypt environment

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
environment_namepathyesThe name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F.

Responses

StatusDescriptionHas JSON body
200Responseyes

Get an environment secret

GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}

Gets a single environment secret without revealing its encrypted value.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
environment_namepathyesThe name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F.
secret_namepathyesThe name of the secret.

Responses

StatusDescriptionHas JSON body
200Responseyes

Create or update an environment secret

PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}

Creates or updates an environment secret with an encrypted value. Encrypt your secret using

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
environment_namepathyesThe name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F.
secret_namepathyesThe name of the secret.

Responses

StatusDescriptionHas JSON body
201Response when creating a secretyes
204Response when updating a secretno

Delete an environment secret

DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}

Deletes a secret in an environment using the secret name.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
environment_namepathyesThe name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F.
secret_namepathyesThe name of the secret.

Responses

StatusDescriptionHas JSON body
204Default responseno

List environment variables

GET /repos/{owner}/{repo}/environments/{environment_name}/variables

Lists all environment variables.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
environment_namepathyesThe name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F.
per_pagequerynoThe number of results per page (max 30). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

Create an environment variable

POST /repos/{owner}/{repo}/environments/{environment_name}/variables

Create an environment variable that you can reference in a GitHub Actions workflow.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
environment_namepathyesThe name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F.

Responses

StatusDescriptionHas JSON body
201Responseyes

Get an environment variable

GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}

Gets a specific variable in an environment.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
environment_namepathyesThe name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F.
namepathyesThe name of the variable.

Responses

StatusDescriptionHas JSON body
200Responseyes

Update an environment variable

PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}

Updates an environment variable that you can reference in a GitHub Actions workflow.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
namepathyesThe name of the variable.
environment_namepathyesThe name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F.

Responses

StatusDescriptionHas JSON body
204Responseno

Delete an environment variable

DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}

Deletes an environment variable using the variable name.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
namepathyesThe name of the variable.
environment_namepathyesThe name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F.

Responses

StatusDescriptionHas JSON body
204Responseno