GitHub v3 REST API

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

Adds a self-hosted runner to a 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}/runners/{runner_id}

Path Parameters

orgstringrequired
runner_group_idintegerrequired

Unique identifier of the self-hosted runner group.

runner_idintegerrequired

Unique identifier of the self-hosted runner.

Response

204

Response

put/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}
 
204

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

Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group.
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}/runners/{runner_id}

Path Parameters

orgstringrequired
runner_group_idintegerrequired

Unique identifier of the self-hosted runner group.

runner_idintegerrequired

Unique identifier of the self-hosted runner.

Response

204

Response

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

List self-hosted runners for an organization

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

Response

200 application/json

Response

total_countintegerrequired
runnersarray[object]required

A self hosted runner

Show Child Parameters
get/orgs/{org}/actions/runners
 
200 application/json

List runner applications for an organization

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

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

get
{protocol}://{hostname}/api/v3/orgs/{org}/actions/runners/downloads

Path Parameters

orgstringrequired

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/orgs/{org}/actions/runners/downloads
 
200 application/json

Create a registration token for an organization

Returns a token that you can pass to the config script. The token expires after one hour.

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

Example using registration token

Configure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint.

./config.sh --url https://github.com/octo-org --token TOKEN
post
{protocol}://{hostname}/api/v3/orgs/{org}/actions/runners/registration-token

Path Parameters

orgstringrequired

Response

201 application/json

Response

Authentication Token

Authentication Token

tokenstringrequired

The token used for authentication

Example:v1.1f699f1069f60xxx

expires_atstring(date-time)required

The time this token expires

Example:2016-07-11T22:14:10Z

permissionsobject

Example:{"issues":"read","deployments":"write"}

repositoriesarray[object]

A git repository

Show Child Parameters
single_filestring | null

Example:config.yaml

repository_selectionstring

Describe whether all repositories have been selected or there’s a selection involved

Allowed values:allselected

post/orgs/{org}/actions/runners/registration-token
 
201 application/json