GitHub v3 REST API

Enable a selected organization for GitHub Actions in an enterprise

Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for enabled_organizations must be configured to selected. For more information, see “Set GitHub Actions permissions for an enterprise.”

You must authenticate using an access token with the admin:enterprise scope to use this endpoint.

put
http://HOSTNAME/api/v3/enterprises/{enterprise}/actions/permissions/organizations/{org_id}

Path Parameters

enterprisestringrequired

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

org_idintegerrequired

Unique identifier of an organization.

Response

204

Response

put/enterprises/{enterprise}/actions/permissions/organizations/{org_id}
 
204

Disable a selected organization for GitHub Actions in an enterprise

Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for enabled_organizations must be configured to selected. For more information, see “Set GitHub Actions permissions for an enterprise.”

You must authenticate using an access token with the admin:enterprise scope to use this endpoint.

delete
http://HOSTNAME/api/v3/enterprises/{enterprise}/actions/permissions/organizations/{org_id}

Path Parameters

enterprisestringrequired

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

org_idintegerrequired

Unique identifier of an organization.

Response

204

Response

delete/enterprises/{enterprise}/actions/permissions/organizations/{org_id}
 
204

Get allowed actions for an enterprise

Gets the selected actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for allowed_actions must be configured to selected. For more information, see “Set GitHub Actions permissions for an enterprise.”

You must authenticate using an access token with the admin:enterprise scope to use this endpoint.

get
http://HOSTNAME/api/v3/enterprises/{enterprise}/actions/permissions/selected-actions

Path Parameters

enterprisestringrequired

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Response

200 application/json

Response

selected-actions

github_owned_allowedbooleanrequired

Whether GitHub-owned actions are allowed. For example, this includes the actions in the actions organization.

patterns_allowedarray[string]required

Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@*, monalisa/octocat@v2, monalisa/*."

get/enterprises/{enterprise}/actions/permissions/selected-actions
 
200 application/json

Set allowed actions for an enterprise

Sets the actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for allowed_actions must be configured to selected. For more information, see “Set GitHub Actions permissions for an enterprise.”

You must authenticate using an access token with the admin:enterprise scope to use this endpoint.

put
http://HOSTNAME/api/v3/enterprises/{enterprise}/actions/permissions/selected-actions

Path Parameters

enterprisestringrequired

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Body

application/json

selected-actions

github_owned_allowedbooleanrequired

Whether GitHub-owned actions are allowed. For example, this includes the actions in the actions organization.

patterns_allowedarray[string]required

Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, monalisa/octocat@*, monalisa/octocat@v2, monalisa/*."

Response

204

Response

put/enterprises/{enterprise}/actions/permissions/selected-actions

Body

{ "github_owned_allowed": true, "verified_allowed": false, "patterns_allowed": [ "monalisa/octocat@*", "docker/*" ] }
 
204

List self-hosted runner groups for an enterprise

Lists all self-hosted runner groups for an enterprise.

You must authenticate using an access token with the admin:enterprise scope to use this endpoint.

get
http://HOSTNAME/api/v3/enterprises/{enterprise}/actions/runner-groups

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

enterprisestringrequired

The slug version of the enterprise name. You can also substitute this value with the enterprise id.

Response

200 application/json

Response

total_countnumberrequired
runner_groupsarray[object]required
Show Child Parameters
get/enterprises/{enterprise}/actions/runner-groups
 
200 application/json