GitHub v3 REST API

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
http://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
http://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
http://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

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

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

delete
http://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

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

List self-hosted runners in a group for an organization

Lists self-hosted runners that are in a specific organization group.
You must authenticate using an access token with the admin:org scope to use this endpoint.

get
http://HOSTNAME/api/v3/orgs/{org}/actions/runner-groups/{runner_group_id}/runners

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

orgstringrequired
runner_group_idintegerrequired

Unique identifier of the self-hosted runner group.

Response

200 application/json

Response

total_countnumberrequired
runnersarray[object]required

A self hosted runner

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