GitHub v3 REST API

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
{protocol}://{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

Create a self-hosted runner group for an enterprise

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

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

post
{protocol}://{hostname}/api/v3/enterprises/{enterprise}/actions/runner-groups

Path Parameters

enterprisestringrequired

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

Body

application/json
namestringrequired

Name of the runner group.

visibilitystring

Visibility of a runner group. You can select all organizations or select individual organization. Can be one of: all or selected

Allowed values:selectedall

selected_organization_idsarray[integer]

Unique identifier of the organization.

runnersarray[integer]

Unique identifier of the runner.

allows_public_repositoriesboolean

Whether the runner group can be used by public repositories.

Default:false

Response

201 application/json

Response

runner-groups-enterprise

idnumberrequired
namestringrequired
visibilitystringrequired
defaultbooleanrequired
selected_organizations_urlstring
runners_urlstringrequired
allows_public_repositoriesbooleanrequired
post/enterprises/{enterprise}/actions/runner-groups

Body

{ "name": "Expensive hardware runners", "visibility": "selected", "selected_organization_ids": [ 32, 91 ], "runners": [ 9, 2 ] }
 
201 application/json

Get a self-hosted runner group for an enterprise

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

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

get
{protocol}://{hostname}/api/v3/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}

Path Parameters

enterprisestringrequired

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

runner_group_idintegerrequired

Unique identifier of the self-hosted runner group.

Response

200 application/json

Response

runner-groups-enterprise

idnumberrequired
namestringrequired
visibilitystringrequired
defaultbooleanrequired
selected_organizations_urlstring
runners_urlstringrequired
allows_public_repositoriesbooleanrequired
get/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}
 
200 application/json

Update a self-hosted runner group for an enterprise

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

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

patch
{protocol}://{hostname}/api/v3/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}

Path Parameters

enterprisestringrequired

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

runner_group_idintegerrequired

Unique identifier of the self-hosted runner group.

Body

application/json
namestring

Name of the runner group.

visibilitystring

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

Allowed values:selectedall

Default:all

allows_public_repositoriesboolean

Whether the runner group can be used by public repositories.

Default:false

Response

200 application/json

Response

runner-groups-enterprise

idnumberrequired
namestringrequired
visibilitystringrequired
defaultbooleanrequired
selected_organizations_urlstring
runners_urlstringrequired
allows_public_repositoriesbooleanrequired
patch/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}

Body

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

Delete a self-hosted runner group from an enterprise

Deletes a self-hosted runner group for an enterprise.

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

delete
{protocol}://{hostname}/api/v3/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}

Path Parameters

enterprisestringrequired

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

runner_group_idintegerrequired

Unique identifier of the self-hosted runner group.

Response

204

Response

delete/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}
 
204