GitHub v3 REST API

GitHub v3 REST API

v1.1.4OAS 3.0

GitHub’s v3 REST API.

API Base URL
  • Server 1:{protocol}://{hostname}/api/v3

Get GitHub Actions permissions for an organization

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

You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the administration organization permission to use this API.

get
{protocol}://{hostname}/api/v3/orgs/{org}/actions/permissions

Path Parameters

orgstringrequired

Response

200 application/json

Response

actions-organization-permissions

enabled_repositoriesstringrequired

The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all, none, or selected.

Allowed values:allnoneselected

selected_repositories_urlstring

The API URL to use to get or set the selected repositories that are allowed to run GitHub Actions, when enabled_repositories is set to selected.

allowed_actionsstring

The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.

Allowed values:alllocal_onlyselected

selected_actions_urlstring

The API URL to use to get or set the actions that are allowed to run, when allowed_actions is set to selected.

get/orgs/{org}/actions/permissions
 
200 application/json

Set GitHub Actions permissions for an organization

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

If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as allowed_actions to selected actions, then you cannot override them for the organization.

You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the administration organization permission to use this API.

put
{protocol}://{hostname}/api/v3/orgs/{org}/actions/permissions

Path Parameters

orgstringrequired

Body

application/json
enabled_repositoriesstringrequired

The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: all, none, or selected.

Allowed values:allnoneselected

allowed_actionsstring

The permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.

Allowed values:alllocal_onlyselected

Response

204

Response

put/orgs/{org}/actions/permissions

Body

{ "enabled_repositories": "all", "allowed_actions": "selected" }
 
204

List selected repositories enabled for GitHub Actions in an organization

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

You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the administration organization permission to use this API.

get
{protocol}://{hostname}/api/v3/orgs/{org}/actions/permissions/repositories

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

orgstringrequired

Response

200 application/json

Response

total_countnumberrequired
repositoriesarray[object]required

A git repository

Show Child Parameters
get/orgs/{org}/actions/permissions/repositories
 
200 application/json