Query all host runners under the specified runner group¶
GET /api/v8/orgs/{org}/actions/runner-groups/{runner_group_id}/runners
Call this endpoint to query all host runners under the specified runner group.
Access token support¶
- AtomGit user access tokens
Anonymous access¶
This endpoint does not allow anonymous access.
Request parameters¶
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
org |
path | string | Yes | Organization path |
runner_group_id |
path | string | Yes | Runner Group ID |
access_token |
query | string | Yes | User authorization code |
keyword |
query | string | No | Keyword filter |
page |
query | integer | No | Current page number, default 1 |
per_page |
query | integer | No | Number of items per page, default 10 |
Response parameters¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
total_count |
integer | Yes | No | Runner total |
runners |
object[] | Yes | No | Runner list |
runners object
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
runners.id |
string | — | — | Runner ID |
runners.runner_group_id |
string | — | — | Runner Group ID |
runners.runner_name |
string | — | — | Runner name |
runners.name |
string | — | — | Name |
runners.work_dir |
string | — | — | Working directory |
runners.labels |
object[] | — | — | Label list |
runners.status |
string | — | — | State; enum: IDLE / BUSY / OFFLINE / DISABLE |
runners.create_time |
integer | — | — | Creation time |
runners.update_time |
integer | — | — | Update time |
runners.memory |
number | — | — | Memory usage (%) |
runners.disk |
number | — | — | Available disk (GB) |
runners.labels object¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
runners.labels.label_name |
string | — | — | Label name |
runners.labels.label_value |
string | — | — | Label value |
runners.labels.label_color |
string | — | — | Label color |
Error responses¶
400 Invalid parameters
{
"error": "invalid_request",
"message": "The runner_group_id parameter cannot be empty",
"field": "runner_group_id"
}
401 Unauthenticated
404 Resource not found
The error field names returned by the backend take precedence.
HTTP response status codes¶
| Status code | Description |
|---|---|
200 |
Success (OK) |
400 |
Invalid parameters or the request could not be parsed |
401 |
Requires authentication |
404 |
The requested resource was not found |
500 |
Internal server error |
Request example¶
Parameter notes¶
<org>is replaced with the organization path name (enterprise, organization, or personal address path);<runner_group_id>is replaced with the runner group ID;<token>is replaced with your AtomGit user access token.
cURL¶
curl -X GET 'https://api.atomgit.com/api/v8/orgs/<org>/actions/runner-groups/<runner_group_id>/runners?access_token=<token>&keyword=<keyword>&page=1&per_page=10' \
-H 'Accept: application/json'
JavaScript¶
// Native fetch (Node.js 18+ / browser)
const params = new URLSearchParams({
access_token: "<YOUR-TOKEN>",
keyword: "build",
page: "1",
per_page: "10",
});
const response = await fetch(
`https://api.atomgit.com/api/v8/orgs/<org>/actions/runner-groups/<runner_group_id>/runners?${params}`,
{
headers: { "Accept": "application/json" },
}
);
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
Python¶
import requests
resp = requests.get(
"https://api.atomgit.com/api/v8/orgs/<org>/actions/runner-groups/<runner_group_id>/runners",
params={
"access_token": "<YOUR-TOKEN>",
"keyword": "build",
"page": 1,
"per_page": 10,
},
headers={"Accept": "application/json"},
timeout=10,
)
resp.raise_for_status()
print(resp.json())
Response example¶
Status code: 200
{
"total_count": 0,
"runners": [
{
"id": "string",
"runner_group_id": "string",
"runner_name": "string",
"name": "string",
"work_dir": "string",
"labels": [
{
"label_name": "string",
"label_value": "string",
"label_color": "string"
}
],
"status": "IDLE",
"create_time": 0,
"update_time": 0,
"memory": 0,
"disk": 0
}
]
}
Error codes¶
| Error code | Description |
|---|---|
400 |
Invalid parameters or the request could not be parsed |
401 |
Unauthenticated or invalid credentials (missing or invalid access token) |
404 |
The request path does not exist |
500 |
Internal server error |
Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc