GitHub v3 REST API

Set self-hosted runners in a group for an enterprise

Replaces the list of self-hosted runners that are part of an enterprise runner group.

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

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

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
runnersarray[integer]required

Unique identifier of the runner.

Response

204

Response

put/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners

Body

{ "runners": [ 9, 2 ] }
 
204

Add a self-hosted runner to a group for an enterprise

Adds a self-hosted runner to a runner group configured in an enterprise.

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

put
{protocol}://{hostname}/api/v3/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_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.

runner_idintegerrequired

Unique identifier of the self-hosted runner.

Response

204

Response

put/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}
 
204

Remove a self-hosted runner from a group for an enterprise

Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group.

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}/runners/{runner_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.

runner_idintegerrequired

Unique identifier of the self-hosted runner.

Response

204

Response

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

List self-hosted runners for an enterprise

Lists all self-hosted runners configured 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/runners

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_countnumber
runnersarray[object]

A self hosted runner

Show Child Parameters
get/enterprises/{enterprise}/actions/runners
 
200 application/json

List runner applications for an enterprise

Lists binaries for the runner application that you can download and run.

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

get
{protocol}://{hostname}/api/v3/enterprises/{enterprise}/actions/runners/downloads

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

Runner Application

osstringrequired
architecturestringrequired
download_urlstringrequired
filenamestringrequired
temp_download_tokenstring

A short lived bearer token used to download the runner, if needed.

sha256_checksumstring
get/enterprises/{enterprise}/actions/runners/downloads
 
200 application/json