GitHub v3 REST API

Update a self-hosted runner group for an organization

Updates the name and visibility of a self-hosted runner group in an organization.
You must authenticate using an access token with the admin:org scope to use this endpoint.

patch
{protocol}://{hostname}/api/v3/orgs/{org}/actions/runner-groups/{runner_group_id}

Path Parameters

orgstringrequired
runner_group_idintegerrequired

Unique identifier of the self-hosted runner group.

Body

application/json
namestringrequired

Name of the runner group.

visibilitystring

Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. Can be one of: all, selected, or private.

Allowed values:selectedallprivate

allows_public_repositoriesboolean

Whether the runner group can be used by public repositories.

Default:false

Response

200 application/json

Response

runner-groups-org

idnumberrequired
namestringrequired
visibilitystringrequired
defaultbooleanrequired
selected_repositories_urlstring

Link to the selected repositories resource for this runner group. Not present unless visibility was set to selected

runners_urlstringrequired
inheritedbooleanrequired
inherited_allows_public_repositoriesboolean
allows_public_repositoriesbooleanrequired
patch/orgs/{org}/actions/runner-groups/{runner_group_id}

Body

{ "name": "Expensive hardware runners", "visibility": "selected" }
 
200 application/json

Delete a self-hosted runner group from an organization

Deletes a self-hosted runner group for an organization.
You must authenticate using an access token with the admin:org scope to use this endpoint.

delete
{protocol}://{hostname}/api/v3/orgs/{org}/actions/runner-groups/{runner_group_id}

Path Parameters

orgstringrequired
runner_group_idintegerrequired

Unique identifier of the self-hosted runner group.

Response

204

Response

delete/orgs/{org}/actions/runner-groups/{runner_group_id}
 
204

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

The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see “GitHub’s products.”

Lists the repositories with access to a self-hosted runner group configured in an organization.

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

get
{protocol}://{hostname}/api/v3/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories

Query Parameters

pageinteger

Page number of the results to fetch.

Default:1

per_pageinteger

Results per page (max 100)

Default:30

Path Parameters

orgstringrequired
runner_group_idintegerrequired

Unique identifier of the self-hosted runner group.

Response

200 application/json

Response

total_countnumberrequired
repositoriesarray[object]required

Minimal Repository

Show Child Parameters
get/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories
 
200 application/json

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

Replaces the list of repositories that have access to a self-hosted runner group configured in an organization.
You must authenticate using an access token with the admin:org scope to use this endpoint.

put
{protocol}://{hostname}/api/v3/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories

Path Parameters

orgstringrequired
runner_group_idintegerrequired

Unique identifier of the self-hosted runner group.

Body

application/json
selected_repository_idsarray[integer]required

Unique identifier of the repository.

Response

204

Response

put/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories

Body

{ "selected_repository_ids": [ 32, 91 ] }
 
204

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

Adds a repository to 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.”
You must authenticate using an access token with the admin:org scope to use this endpoint.

put
{protocol}://{hostname}/api/v3/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}

Path Parameters

orgstringrequired
runner_group_idintegerrequired

Unique identifier of the self-hosted runner group.

repository_idintegerrequired

Response

204

Response

put/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}
 
204