Query all host runners shared with the repository¶
GET /api/v8/repos/{owner}/{repo}/actions/runners/shared-runners
Call this endpoint to query all host runners shared with the repository.
Access token support¶
- AtomGit user access tokens
Anonymous access¶
This endpoint does not allow anonymous access.
Request parameters¶
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
owner |
path | string | Yes | Address path of the namespace that owns the repository (organization or personal address path) |
repo |
path | string | Yes | Repository path (path) |
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 | — | Runner total |
runners |
object[] | Yes | — | Runner list |
runners object
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
runners[].id |
string | Yes | — | Runner ID |
runners[].runner_group_id |
string | Yes | — | Runner Group ID |
runners[].runner_name |
string | Yes | — | Runner name |
runners[].name |
string | Yes | — | Name |
runners[].work_dir |
string | Yes | — | Working directory |
runners[].labels |
object[] | Yes | — | Label list |
runners[].status |
string | Yes | — | State; enum: IDLE / BUSY / OFFLINE / DISABLE |
runners[].create_time |
integer | Yes | — | Creation time |
runners[].update_time |
integer | Yes | — | Update time |
runners[].memory |
number | Yes | — | Memory usage (%) |
runners[].disk |
number | Yes | — | Available disk (GB) |
runners[].labels object¶
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
runners[].labels[].label_name |
string | Yes | — | Label name |
runners[].labels[].label_value |
string | Yes | — | Label value |
runners[].labels[].label_color |
string | Yes | — | Label color |
Error responses¶
This endpoint requires authentication and does not allow anonymous access. The following are common failure response shapes; the error field names returned by the backend take precedence.
400 Invalid parameters
401 Unauthenticated
HTTP response status codes¶
| Status code | Description |
|---|---|
200 |
Success (OK) |
401 |
Requires authentication |
403 |
Forbidden |
Request example¶
Parameter notes¶
<owner>is replaced with the address path of the namespace that owns the repository (organization or personal address path);<repo>is replaced with the repository path;<token>is replaced with your AtomGit user access token.
cURL¶
curl -X GET 'https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/runners/shared-runners?access_token=<token>&keyword=<keyword>&page=1&per_page=10' \
-H 'Accept: application/json'
JavaScript¶
// Native fetch (Node.js 18+ / browser)
const response = await fetch(
"https://api.atomgit.com/api/v8/repos/<owner>/<repo>/actions/runners/shared-runners?access_token=<token>&keyword=<keyword>&page=1&per_page=10",
{
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/repos/<owner>/<repo>/actions/runners/shared-runners",
params={
"access_token": "<token>",
"keyword": "<keyword>",
"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": 1,
"runners": [
{
"id": "1001",
"runner_group_id": "2001",
"runner_name": "host-runner-01",
"name": "runner-01",
"work_dir": "/data/runner",
"labels": [
{
"label_name": "os",
"label_value": "linux",
"label_color": "#888888"
}
],
"status": "IDLE",
"create_time": 1690000000,
"update_time": 1690000100,
"memory": 45.5,
"disk": 120.3
}
]
}
Error codes¶
| Error code | Description |
|---|---|
401 |
Unauthenticated or invalid credentials (missing or invalid access token) |
400 |
Invalid parameters or the request could not be parsed |
404 |
The request path does not exist |
405 |
The request method is not supported |
429 |
Too many requests; rate limit triggered |
500 |
Internal server error |
Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc