Skip to content

List GitHub-hosted runners for an organization

GET
/orgs/{org}/actions/hosted-runners

Lists all GitHub-hosted runners configured in an organization.

OAuth app tokens and personal access tokens (classic) need the manage_runner:org scope to use this endpoint.

API method documentation

org
required
string

The organization name. The name is not case sensitive.

per_page
integer
default: 30

The number of results per page (max 100). For more information, see “Using pagination in the REST API.”

page
integer
default: 1

The page number of the results to fetch. For more information, see “Using pagination in the REST API.”

Response

Media type application/json
object
total_count
required
integer
runners
required
Array<object>
GitHub-hosted hosted runner

A Github-hosted hosted runner.

object
id
required

The unique identifier of the hosted runner.

integer
name
required

The name of the hosted runner.

string
runner_group_id

The unique identifier of the group that the hosted runner belongs to.

integer
image_details
required
GitHub-hosted runner image details.

Provides details of a hosted runner image

object
id
required

The ID of the image. Use this ID for the image parameter when creating a new larger runner.

string
size_gb
required

Image size in GB.

integer
display_name
required

Display name for this image.

string
source
required

The image provider.

string
Allowed values: github partner custom
version

The image version of the hosted runner pool.

string
machine_size_details
required
Github-owned VM details.

Provides details of a particular machine spec.

object
id
required

The ID used for the size parameter when creating a new runner.

string
cpu_cores
required

The number of cores.

integer
memory_gb
required

The available RAM for the machine spec.

integer
storage_gb
required

The available SSD storage for the machine spec.

integer
status
required

The status of the runner.

string
Allowed values: Ready Provisioning Shutdown Deleting Stuck
platform
required

The operating system of the image.

string
maximum_runners

The maximum amount of hosted runners. Runners will not scale automatically above this number. Use this setting to limit your cost.

integer
default: 10
public_ip_enabled
required

Whether public IP is enabled for the hosted runners.

boolean
public_ips

The public IP ranges when public IP is enabled for the hosted runners.

Array<object>
Public IP for a GitHub-hosted larger runners.

Provides details of Public IP for a GitHub-hosted larger runners

object
enabled

Whether public IP is enabled.

boolean
prefix

The prefix for the public IP.

string
length

The length of the IP prefix.

integer
last_active_on

The time at which the runner was last used, in ISO 8601 format.

string format: date-time
nullable
image_gen

Whether custom image generation is enabled for the hosted runners.

boolean
Examples
Example default
{
"total_count": 2,
"runners": [
{
"id": 5,
"name": "My hosted ubuntu runner",
"runner_group_id": 2,
"platform": "linux-x64",
"image": {
"id": "ubuntu-20.04",
"size": 86
},
"machine_size_details": {
"id": "4-core",
"cpu_cores": 4,
"memory_gb": 16,
"storage_gb": 150
},
"status": "Ready",
"maximum_runners": 10,
"public_ip_enabled": true,
"public_ips": [
{
"enabled": true,
"prefix": "20.80.208.150",
"length": 31
}
],
"last_active_on": "2022-10-09T23:39:01Z"
},
{
"id": 7,
"name": "My hosted Windows runner",
"runner_group_id": 2,
"platform": "win-x64",
"image": {
"id": "windows-latest",
"size": 256
},
"machine_size_details": {
"id": "8-core",
"cpu_cores": 8,
"memory_gb": 32,
"storage_gb": 300
},
"status": "Ready",
"maximum_runners": 20,
"public_ip_enabled": false,
"public_ips": [],
"last_active_on": "2023-04-26T15:23:37Z"
}
]
}
Link
string
Example
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"