Конечные точки REST API для локальных runners
Используйте REST API для взаимодействия с локальными средствами выполнения в GitHub Actions.
Сведения о локальных запусках в GitHub Actions
Rest API можно использовать для регистрации, просмотра и удаления локальных модулей выполнения в GitHub Actions. Локальные средства выполнения позволяют размещать собственные средства выполнения и настраивать среду, используемую для выполнения заданий в рабочих процессах GitHub Actions. Дополнительные сведения см. в разделе "Размещение собственных средств выполнения".
List self-hosted runners for an enterprise
Lists all self-hosted runners configured for an enterprise.
OAuth app tokens and personal access tokens (classic) need the manage_runners:enterprise
scope to use this endpoint.
Подробные маркеры доступа для "List self-hosted runners for an enterprise
Эта конечная точка не работает с маркерами доступа пользователей приложения GitHub, маркерами доступа к установке приложения GitHub или точными личными маркерами доступа.
Параметры для "List self-hosted runners for an enterprise"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
enterprise string Обязательное полеThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
Имя., Тип, Description |
---|
name string The name of a self-hosted runner. |
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." По умолчанию.: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." По умолчанию.: |
Коды состояния http-ответа для "List self-hosted runners for an enterprise"
Код состояния | Описание |
---|---|
200 | OK |
Примеры кода для "List self-hosted runners for an enterprise"
Пример запроса
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners
Response
Status: 200
{
"total_count": 2,
"runners": [
{
"id": 23,
"name": "linux_runner",
"os": "linux",
"status": "online",
"busy": true,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 11,
"name": "Linux",
"type": "read-only"
}
]
},
{
"id": 24,
"name": "mac_runner",
"os": "macos",
"status": "offline",
"busy": false,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
]
}
List runner applications for an enterprise
Lists binaries for the runner application that you can download and run.
OAuth app tokens and personal access tokens (classic) need the manage_runners:enterprise
scope to use this endpoint.
Подробные маркеры доступа для "List runner applications for an enterprise
Эта конечная точка не работает с маркерами доступа пользователей приложения GitHub, маркерами доступа к установке приложения GitHub или точными личными маркерами доступа.
Параметры для "List runner applications for an enterprise"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
enterprise string Обязательное полеThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
Коды состояния http-ответа для "List runner applications for an enterprise"
Код состояния | Описание |
---|---|
200 | OK |
Примеры кода для "List runner applications for an enterprise"
Пример запроса
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners/downloads
Response
Status: 200
[
{
"os": "osx",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-osx-x64-2.277.1.tar.gz",
"filename": "actions-runner-osx-x64-2.277.1.tar.gz",
"temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIwZTZkODAxYi02NzVlLTQ1YzAtOWM4NC1jYTkzNjdlZjc1NjciLCJzaWQiOiI4ZTE5MDliZC1kYzU1LTQ2MWYtOTk2Mi1hZTI0OTEzNzU4OWIiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MDQxNzUsImV4cCI6MTYxNzkwODM3NX0.YNsRXL9pBuIfLVndnyVQOpru77Br8hgYIX7LPsOaMfKk4K88YG89a2VIXUWPyHRiOaC-4J0lIPei8ujezEtnMfNZCwHdWq0Niiy-2-ywcfGPmcz-RHz_ZglkPFbzKaiZWJcFKCGHCP0Ta3kdXumJQqiVJEIyppxIY-caR_Wsw2L4BZHOefJq-odsJ0guPgm9fVuU9FxVRkucho1UH_bzt0tAMl1gEWOLBLZ88U9LKCzHWaxheFeBV4DTt1lAcSm213gKP1eMbgAGn5heWhR4RMRBzZc2HO3Lf1syu4E8fW8a-esRAxEYPfqPHwN9LNj2jaU3D3nPwa8lHQLLtA1PNA",
"sha256_checksum": "f1fa173889dc9036cd529417e652e1729e5a3f4d35ec0151806d7480fda6b89b"
},
{
"os": "linux",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-linux-x64-2.277.1.tar.gz",
"filename": "actions-runner-linux-x64-2.277.1.tar.gz",
"temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIwZTZkODAxYi02NzVlLTQ1YzAtOWM4NC1jYTkzNjdlZjc1NjciLCJzaWQiOiI4ZTE5MDliZC1kYzU1LTQ2MWYtOTk2Mi1hZTI0OTEzNzU4OWIiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MDQxNzUsImV4cCI6MTYxNzkwODM3NX0.YNsRXL9pBuIfLVndnyVQOpru77Br8hgYIX7LPsOaMfKk4K88YG89a2VIXUWPyHRiOaC-4J0lIPei8ujezEtnMfNZCwHdWq0Niiy-2-ywcfGPmcz-RHz_ZglkPFbzKaiZWJcFKCGHCP0Ta3kdXumJQqiVJEIyppxIY-caR_Wsw2L4BZHOefJq-odsJ0guPgm9fVuU9FxVRkucho1UH_bzt0tAMl1gEWOLBLZ88U9LKCzHWaxheFeBV4DTt1lAcSm213gKP1eMbgAGn5heWhR4RMRBzZc2HO3Lf1syu4E8fW8a-esRAxEYPfqPHwN9LNj2jaU3D3nPwa8lHQLLtA1PNA",
"sha256_checksum": "02d710fc9e0008e641274bb7da7fde61f7c9aa1cbb541a2990d3450cc88f4e98"
},
{
"os": "linux",
"architecture": "arm",
"download_url": "https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-linux-arm-2.277.1.tar.gz",
"filename": "actions-runner-linux-arm-2.277.1.tar.gz",
"temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIyYTEzZDRmZC01ZDhkLTRjNzgtYjg2MS0zYTMxZGQ3MmYzNjQiLCJzaWQiOiI0MzZiNTg3YS04ODMyLTRiMTMtOWM2Ny05OWRkMjA2ZTQzNmMiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MzE1NzEsImV4cCI6MTYxNzkzNTc3MX0.PMhU7-MOnZRDj5k5a4ieeFlQCmKPl2pQvpVRhGZq-9ByKF5s9G0rsnGBxDcolTYlbvEAmSSkeAEwF486F7P0kMVEb-GI14WbErqqMSyaPL81c3W7UHxMJLaSBnDs9ftHMv_IkJmRzaROS8q1ObzUW-ErlltxCdj2zF_5ruK9G2RR566AOAtiA3AHV6k7-FCY5--sDYJN_YXPgpwI0fPN1TM92fdPm93hJnoXuCJNpBYp1vl5W4gwGtU_Pa07ESdqqFN1YJJHUloedNhiIOczGfGVSapRc8vyGm9P_VCM_yKD8JI-MkOXl8JI5fCfhmjmKsw-vSAh9NW67RGvmehmpw",
"sha256_checksum": "2f2bda21e2fd8fed6938b33182a293f6b1f74e4c5d09acd6d9a0fe3f979f5c85"
},
{
"os": "win",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-win-x64-2.277.1.zip",
"filename": "actions-runner-win-x64-2.277.1.zip",
"temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIwZTZkODAxYi02NzVlLTQ1YzAtOWM4NC1jYTkzNjdlZjc1NjciLCJzaWQiOiI4ZTE5MDliZC1kYzU1LTQ2MWYtOTk2Mi1hZTI0OTEzNzU4OWIiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MDQxNzUsImV4cCI6MTYxNzkwODM3NX0.YNsRXL9pBuIfLVndnyVQOpru77Br8hgYIX7LPsOaMfKk4K88YG89a2VIXUWPyHRiOaC-4J0lIPei8ujezEtnMfNZCwHdWq0Niiy-2-ywcfGPmcz-RHz_ZglkPFbzKaiZWJcFKCGHCP0Ta3kdXumJQqiVJEIyppxIY-caR_Wsw2L4BZHOefJq-odsJ0guPgm9fVuU9FxVRkucho1UH_bzt0tAMl1gEWOLBLZ88U9LKCzHWaxheFeBV4DTt1lAcSm213gKP1eMbgAGn5heWhR4RMRBzZc2HO3Lf1syu4E8fW8a-esRAxEYPfqPHwN9LNj2jaU3D3nPwa8lHQLLtA1PNA",
"sha256_checksum": "7215c75a462eeb6a839fa8ed298d79f620617d44d47d37c583114fc3f3b27b30"
},
{
"os": "linux",
"architecture": "arm64",
"download_url": "https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-linux-arm64-2.277.1.tar.gz",
"filename": "actions-runner-linux-arm64-2.277.1.tar.gz",
"temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIwZTZkODAxYi02NzVlLTQ1YzAtOWM4NC1jYTkzNjdlZjc1NjciLCJzaWQiOiI4ZTE5MDliZC1kYzU1LTQ2MWYtOTk2Mi1hZTI0OTEzNzU4OWIiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MDQxNzUsImV4cCI6MTYxNzkwODM3NX0.YNsRXL9pBuIfLVndnyVQOpru77Br8hgYIX7LPsOaMfKk4K88YG89a2VIXUWPyHRiOaC-4J0lIPei8ujezEtnMfNZCwHdWq0Niiy-2-ywcfGPmcz-RHz_ZglkPFbzKaiZWJcFKCGHCP0Ta3kdXumJQqiVJEIyppxIY-caR_Wsw2L4BZHOefJq-odsJ0guPgm9fVuU9FxVRkucho1UH_bzt0tAMl1gEWOLBLZ88U9LKCzHWaxheFeBV4DTt1lAcSm213gKP1eMbgAGn5heWhR4RMRBzZc2HO3Lf1syu4E8fW8a-esRAxEYPfqPHwN9LNj2jaU3D3nPwa8lHQLLtA1PNA",
"sha256_checksum": "a6aa6dd0ba217118ef2b4ea24e9e0a85b02b13c38052a5de0776d6ced3a79c64"
}
]
Create configuration for a just-in-time runner for an Enterprise
Generates a configuration that can be passed to the runner application at startup.
OAuth tokens and personal access tokens (classic) need the manage_runners:enterprise
scope to use this endpoint.
Подробные маркеры доступа для "Create configuration for a just-in-time runner for an Enterprise
Эта конечная точка не работает с маркерами доступа пользователей приложения GitHub, маркерами доступа к установке приложения GitHub или точными личными маркерами доступа.
Параметры для "Create configuration for a just-in-time runner for an Enterprise"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
enterprise string Обязательное полеThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
Имя., Тип, Description |
---|
name string Обязательное полеThe name of the new runner. |
runner_group_id integer Обязательное полеThe ID of the runner group to register the runner to. |
labels array of strings Обязательное полеThe names of the custom labels to add to the runner. Minimum items: 1. Maximum items: 100. |
work_folder string The working directory to be used for job execution, relative to the runner install directory. По умолчанию.: |
Коды состояния http-ответа для "Create configuration for a just-in-time runner for an Enterprise"
Код состояния | Описание |
---|---|
201 | Created |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Примеры кода для "Create configuration for a just-in-time runner for an Enterprise"
Пример запроса
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners/generate-jitconfig \
-d '{"name":"New runner","runner_group_id":1,"labels":["self-hosted","X64","macOS","no-gpu"],"work_folder":"_work"}'
Response
Status: 201
{
"runner": {
"id": 23,
"name": "New runner",
"os": "unknown",
"status": "offline",
"busy": false,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
},
"encoded_jit_config": "abc123"
}
Create a registration token for an enterprise
Returns a token that you can pass to the config
script. The token expires after one hour.
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/enterprises/octo-enterprise --token TOKEN
OAuth app tokens and personal access tokens (classic) need the manage_runners:enterprise
scope to use this endpoint.
Подробные маркеры доступа для "Create a registration token for an enterprise
Эта конечная точка не работает с маркерами доступа пользователей приложения GitHub, маркерами доступа к установке приложения GitHub или точными личными маркерами доступа.
Параметры для "Create a registration token for an enterprise"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
enterprise string Обязательное полеThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
Коды состояния http-ответа для "Create a registration token for an enterprise"
Код состояния | Описание |
---|---|
201 | Created |
Примеры кода для "Create a registration token for an enterprise"
Пример запроса
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners/registration-token
Response
Status: 201
{
"token": "LLBF3JGZDX3P5PMEXLND6TS6FCWO6",
"expires_at": "2020-01-22T12:13:35.123-08:00"
}
Create a remove token for an enterprise
Returns a token that you can pass to the config
script to remove a self-hosted runner from an enterprise. The token expires after one hour.
Example using remove token:
To remove your self-hosted runner from an enterprise, replace TOKEN
with the remove token provided by this
endpoint.
./config.sh remove --token TOKEN
OAuth app tokens and personal access tokens (classic) need the manage_runners:enterprise
scope to use this endpoint.
Подробные маркеры доступа для "Create a remove token for an enterprise
Эта конечная точка не работает с маркерами доступа пользователей приложения GitHub, маркерами доступа к установке приложения GitHub или точными личными маркерами доступа.
Параметры для "Create a remove token for an enterprise"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
enterprise string Обязательное полеThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
Коды состояния http-ответа для "Create a remove token for an enterprise"
Код состояния | Описание |
---|---|
201 | Created |
Примеры кода для "Create a remove token for an enterprise"
Пример запроса
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners/remove-token
Response
Status: 201
{
"token": "AABF3JGZDX3P5PMEXLND6TS6FCWO6",
"expires_at": "2020-01-29T12:13:35.123-08:00"
}
Get a self-hosted runner for an enterprise
Gets a specific self-hosted runner configured in an enterprise.
OAuth app tokens and personal access tokens (classic) need the manage_runners:enterprise
scope to use this endpoint.
Подробные маркеры доступа для "Get a self-hosted runner for an enterprise
Эта конечная точка не работает с маркерами доступа пользователей приложения GitHub, маркерами доступа к установке приложения GitHub или точными личными маркерами доступа.
Параметры для "Get a self-hosted runner for an enterprise"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
enterprise string Обязательное полеThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Коды состояния http-ответа для "Get a self-hosted runner for an enterprise"
Код состояния | Описание |
---|---|
200 | OK |
Примеры кода для "Get a self-hosted runner for an enterprise"
Пример запроса
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners/RUNNER_ID
Response
Status: 200
{
"id": 23,
"name": "MBP",
"os": "macos",
"status": "online",
"busy": true,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
Delete a self-hosted runner from an enterprise
Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
OAuth app tokens and personal access tokens (classic) need the manage_runners:enterprise
scope to use this endpoint.
Подробные маркеры доступа для "Delete a self-hosted runner from an enterprise
Эта конечная точка не работает с маркерами доступа пользователей приложения GitHub, маркерами доступа к установке приложения GitHub или точными личными маркерами доступа.
Параметры для "Delete a self-hosted runner from an enterprise"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
enterprise string Обязательное полеThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Коды состояния http-ответа для "Delete a self-hosted runner from an enterprise"
Код состояния | Описание |
---|---|
204 | No Content |
Примеры кода для "Delete a self-hosted runner from an enterprise"
Пример запроса
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners/RUNNER_ID
Response
Status: 204
List labels for a self-hosted runner for an enterprise
Lists all labels for a self-hosted runner configured in an enterprise.
OAuth app tokens and personal access tokens (classic) need the manage_runners:enterprise
scope to use this endpoint.
Подробные маркеры доступа для "List labels for a self-hosted runner for an enterprise
Эта конечная точка не работает с маркерами доступа пользователей приложения GitHub, маркерами доступа к установке приложения GitHub или точными личными маркерами доступа.
Параметры для "List labels for a self-hosted runner for an enterprise"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
enterprise string Обязательное полеThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Коды состояния http-ответа для "List labels for a self-hosted runner for an enterprise"
Код состояния | Описание |
---|---|
200 | OK |
404 | Resource not found |
Примеры кода для "List labels for a self-hosted runner for an enterprise"
Пример запроса
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners/RUNNER_ID/labels
Response
Status: 200
{
"total_count": 4,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
Add custom labels to a self-hosted runner for an enterprise
Add custom labels to a self-hosted runner configured in an enterprise.
OAuth app tokens and personal access tokens (classic) need the manage_runners:enterprise
scope to use this endpoint.
Подробные маркеры доступа для "Add custom labels to a self-hosted runner for an enterprise
Эта конечная точка не работает с маркерами доступа пользователей приложения GitHub, маркерами доступа к установке приложения GitHub или точными личными маркерами доступа.
Параметры для "Add custom labels to a self-hosted runner for an enterprise"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
enterprise string Обязательное полеThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Имя., Тип, Description |
---|
labels array of strings Обязательное полеThe names of the custom labels to add to the runner. |
Коды состояния http-ответа для "Add custom labels to a self-hosted runner for an enterprise"
Код состояния | Описание |
---|---|
200 | OK |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Примеры кода для "Add custom labels to a self-hosted runner for an enterprise"
Пример запроса
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners/RUNNER_ID/labels \
-d '{"labels":["gpu","accelerated"]}'
Response
Status: 200
{
"total_count": 4,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
Set custom labels for a self-hosted runner for an enterprise
Remove all previous custom labels and set the new custom labels for a specific self-hosted runner configured in an enterprise.
OAuth app tokens and personal access tokens (classic) need the manage_runners:enterprise
scope to use this endpoint.
Подробные маркеры доступа для "Set custom labels for a self-hosted runner for an enterprise
Эта конечная точка не работает с маркерами доступа пользователей приложения GitHub, маркерами доступа к установке приложения GitHub или точными личными маркерами доступа.
Параметры для "Set custom labels for a self-hosted runner for an enterprise"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
enterprise string Обязательное полеThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Имя., Тип, Description |
---|
labels array of strings Обязательное полеThe names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. |
Коды состояния http-ответа для "Set custom labels for a self-hosted runner for an enterprise"
Код состояния | Описание |
---|---|
200 | OK |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Примеры кода для "Set custom labels for a self-hosted runner for an enterprise"
Пример запроса
curl -L \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners/RUNNER_ID/labels \
-d '{"labels":["gpu","accelerated"]}'
Response
Status: 200
{
"total_count": 4,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
Remove all custom labels from a self-hosted runner for an enterprise
Remove all custom labels from a self-hosted runner configured in an enterprise. Returns the remaining read-only labels from the runner.
OAuth app tokens and personal access tokens (classic) need the manage_runners:enterprise
scope to use this endpoint.
Подробные маркеры доступа для "Remove all custom labels from a self-hosted runner for an enterprise
Эта конечная точка не работает с маркерами доступа пользователей приложения GitHub, маркерами доступа к установке приложения GitHub или точными личными маркерами доступа.
Параметры для "Remove all custom labels from a self-hosted runner for an enterprise"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
enterprise string Обязательное полеThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Коды состояния http-ответа для "Remove all custom labels from a self-hosted runner for an enterprise"
Код состояния | Описание |
---|---|
200 | OK |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Примеры кода для "Remove all custom labels from a self-hosted runner for an enterprise"
Пример запроса
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners/RUNNER_ID/labels
Response
Status: 200
{
"total_count": 3,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
}
]
}
Remove a custom label from a self-hosted runner for an enterprise
Remove a custom label from a self-hosted runner configured in an enterprise. Returns the remaining labels from the runner.
This endpoint returns a 404 Not Found
status if the custom label is not
present on the runner.
OAuth app tokens and personal access tokens (classic) need the manage_runners:enterprise
scope to use this endpoint.
Подробные маркеры доступа для "Remove a custom label from a self-hosted runner for an enterprise
Эта конечная точка не работает с маркерами доступа пользователей приложения GitHub, маркерами доступа к установке приложения GitHub или точными личными маркерами доступа.
Параметры для "Remove a custom label from a self-hosted runner for an enterprise"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
enterprise string Обязательное полеThe slug version of the enterprise name. You can also substitute this value with the enterprise id. |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
name string Обязательное полеThe name of a self-hosted runner's custom label. |
Коды состояния http-ответа для "Remove a custom label from a self-hosted runner for an enterprise"
Код состояния | Описание |
---|---|
200 | OK |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Примеры кода для "Remove a custom label from a self-hosted runner for an enterprise"
Пример запроса
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners/RUNNER_ID/labels/NAME
Response
Status: 200
{
"total_count": 4,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
List self-hosted runners for an organization
Lists all self-hosted runners configured in an organization.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint. If the repository is private, the repo
scope is also required.
Подробные маркеры доступа для "List self-hosted runners for an organization
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Self-hosted runners" organization permissions (read)
Параметры для "List self-hosted runners for an organization"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
org string Обязательное полеThe organization name. The name is not case sensitive. |
Имя., Тип, Description |
---|
name string The name of a self-hosted runner. |
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." По умолчанию.: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." По умолчанию.: |
Коды состояния http-ответа для "List self-hosted runners for an organization"
Код состояния | Описание |
---|---|
200 | OK |
Примеры кода для "List self-hosted runners for an organization"
Пример запроса
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/orgs/ORG/actions/runners
Response
Status: 200
{
"total_count": 2,
"runners": [
{
"id": 23,
"name": "linux_runner",
"os": "linux",
"status": "online",
"busy": true,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 11,
"name": "Linux",
"type": "read-only"
}
]
},
{
"id": 24,
"name": "mac_runner",
"os": "macos",
"status": "offline",
"busy": false,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
]
}
List runner applications for an organization
Lists binaries for the runner application that you can download and run.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint. If the repository is private, the repo
scope is also required.
Подробные маркеры доступа для "List runner applications for an organization
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Self-hosted runners" organization permissions (read)
Параметры для "List runner applications for an organization"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
org string Обязательное полеThe organization name. The name is not case sensitive. |
Коды состояния http-ответа для "List runner applications for an organization"
Код состояния | Описание |
---|---|
200 | OK |
Примеры кода для "List runner applications for an organization"
Пример запроса
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/orgs/ORG/actions/runners/downloads
Response
Status: 200
[
{
"os": "osx",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-osx-x64-2.277.1.tar.gz",
"filename": "actions-runner-osx-x64-2.277.1.tar.gz",
"temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIwZTZkODAxYi02NzVlLTQ1YzAtOWM4NC1jYTkzNjdlZjc1NjciLCJzaWQiOiI4ZTE5MDliZC1kYzU1LTQ2MWYtOTk2Mi1hZTI0OTEzNzU4OWIiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MDQxNzUsImV4cCI6MTYxNzkwODM3NX0.YNsRXL9pBuIfLVndnyVQOpru77Br8hgYIX7LPsOaMfKk4K88YG89a2VIXUWPyHRiOaC-4J0lIPei8ujezEtnMfNZCwHdWq0Niiy-2-ywcfGPmcz-RHz_ZglkPFbzKaiZWJcFKCGHCP0Ta3kdXumJQqiVJEIyppxIY-caR_Wsw2L4BZHOefJq-odsJ0guPgm9fVuU9FxVRkucho1UH_bzt0tAMl1gEWOLBLZ88U9LKCzHWaxheFeBV4DTt1lAcSm213gKP1eMbgAGn5heWhR4RMRBzZc2HO3Lf1syu4E8fW8a-esRAxEYPfqPHwN9LNj2jaU3D3nPwa8lHQLLtA1PNA",
"sha256_checksum": "f1fa173889dc9036cd529417e652e1729e5a3f4d35ec0151806d7480fda6b89b"
},
{
"os": "linux",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-linux-x64-2.277.1.tar.gz",
"filename": "actions-runner-linux-x64-2.277.1.tar.gz",
"temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIwZTZkODAxYi02NzVlLTQ1YzAtOWM4NC1jYTkzNjdlZjc1NjciLCJzaWQiOiI4ZTE5MDliZC1kYzU1LTQ2MWYtOTk2Mi1hZTI0OTEzNzU4OWIiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MDQxNzUsImV4cCI6MTYxNzkwODM3NX0.YNsRXL9pBuIfLVndnyVQOpru77Br8hgYIX7LPsOaMfKk4K88YG89a2VIXUWPyHRiOaC-4J0lIPei8ujezEtnMfNZCwHdWq0Niiy-2-ywcfGPmcz-RHz_ZglkPFbzKaiZWJcFKCGHCP0Ta3kdXumJQqiVJEIyppxIY-caR_Wsw2L4BZHOefJq-odsJ0guPgm9fVuU9FxVRkucho1UH_bzt0tAMl1gEWOLBLZ88U9LKCzHWaxheFeBV4DTt1lAcSm213gKP1eMbgAGn5heWhR4RMRBzZc2HO3Lf1syu4E8fW8a-esRAxEYPfqPHwN9LNj2jaU3D3nPwa8lHQLLtA1PNA",
"sha256_checksum": "02d710fc9e0008e641274bb7da7fde61f7c9aa1cbb541a2990d3450cc88f4e98"
},
{
"os": "linux",
"architecture": "arm",
"download_url": "https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-linux-arm-2.277.1.tar.gz",
"filename": "actions-runner-linux-arm-2.277.1.tar.gz",
"temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIyYTEzZDRmZC01ZDhkLTRjNzgtYjg2MS0zYTMxZGQ3MmYzNjQiLCJzaWQiOiI0MzZiNTg3YS04ODMyLTRiMTMtOWM2Ny05OWRkMjA2ZTQzNmMiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MzE1NzEsImV4cCI6MTYxNzkzNTc3MX0.PMhU7-MOnZRDj5k5a4ieeFlQCmKPl2pQvpVRhGZq-9ByKF5s9G0rsnGBxDcolTYlbvEAmSSkeAEwF486F7P0kMVEb-GI14WbErqqMSyaPL81c3W7UHxMJLaSBnDs9ftHMv_IkJmRzaROS8q1ObzUW-ErlltxCdj2zF_5ruK9G2RR566AOAtiA3AHV6k7-FCY5--sDYJN_YXPgpwI0fPN1TM92fdPm93hJnoXuCJNpBYp1vl5W4gwGtU_Pa07ESdqqFN1YJJHUloedNhiIOczGfGVSapRc8vyGm9P_VCM_yKD8JI-MkOXl8JI5fCfhmjmKsw-vSAh9NW67RGvmehmpw",
"sha256_checksum": "2f2bda21e2fd8fed6938b33182a293f6b1f74e4c5d09acd6d9a0fe3f979f5c85"
},
{
"os": "win",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-win-x64-2.277.1.zip",
"filename": "actions-runner-win-x64-2.277.1.zip",
"temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIwZTZkODAxYi02NzVlLTQ1YzAtOWM4NC1jYTkzNjdlZjc1NjciLCJzaWQiOiI4ZTE5MDliZC1kYzU1LTQ2MWYtOTk2Mi1hZTI0OTEzNzU4OWIiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MDQxNzUsImV4cCI6MTYxNzkwODM3NX0.YNsRXL9pBuIfLVndnyVQOpru77Br8hgYIX7LPsOaMfKk4K88YG89a2VIXUWPyHRiOaC-4J0lIPei8ujezEtnMfNZCwHdWq0Niiy-2-ywcfGPmcz-RHz_ZglkPFbzKaiZWJcFKCGHCP0Ta3kdXumJQqiVJEIyppxIY-caR_Wsw2L4BZHOefJq-odsJ0guPgm9fVuU9FxVRkucho1UH_bzt0tAMl1gEWOLBLZ88U9LKCzHWaxheFeBV4DTt1lAcSm213gKP1eMbgAGn5heWhR4RMRBzZc2HO3Lf1syu4E8fW8a-esRAxEYPfqPHwN9LNj2jaU3D3nPwa8lHQLLtA1PNA",
"sha256_checksum": "7215c75a462eeb6a839fa8ed298d79f620617d44d47d37c583114fc3f3b27b30"
},
{
"os": "linux",
"architecture": "arm64",
"download_url": "https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-linux-arm64-2.277.1.tar.gz",
"filename": "actions-runner-linux-arm64-2.277.1.tar.gz",
"temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIwZTZkODAxYi02NzVlLTQ1YzAtOWM4NC1jYTkzNjdlZjc1NjciLCJzaWQiOiI4ZTE5MDliZC1kYzU1LTQ2MWYtOTk2Mi1hZTI0OTEzNzU4OWIiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MDQxNzUsImV4cCI6MTYxNzkwODM3NX0.YNsRXL9pBuIfLVndnyVQOpru77Br8hgYIX7LPsOaMfKk4K88YG89a2VIXUWPyHRiOaC-4J0lIPei8ujezEtnMfNZCwHdWq0Niiy-2-ywcfGPmcz-RHz_ZglkPFbzKaiZWJcFKCGHCP0Ta3kdXumJQqiVJEIyppxIY-caR_Wsw2L4BZHOefJq-odsJ0guPgm9fVuU9FxVRkucho1UH_bzt0tAMl1gEWOLBLZ88U9LKCzHWaxheFeBV4DTt1lAcSm213gKP1eMbgAGn5heWhR4RMRBzZc2HO3Lf1syu4E8fW8a-esRAxEYPfqPHwN9LNj2jaU3D3nPwa8lHQLLtA1PNA",
"sha256_checksum": "a6aa6dd0ba217118ef2b4ea24e9e0a85b02b13c38052a5de0776d6ced3a79c64"
}
]
Create configuration for a just-in-time runner for an organization
Generates a configuration that can be passed to the runner application at startup.
The authenticated user must have admin access to the organization.
OAuth tokens and personal access tokens (classic) need theadmin:org
scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
Подробные маркеры доступа для "Create configuration for a just-in-time runner for an organization
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Self-hosted runners" organization permissions (write)
Параметры для "Create configuration for a just-in-time runner for an organization"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
org string Обязательное полеThe organization name. The name is not case sensitive. |
Имя., Тип, Description |
---|
name string Обязательное полеThe name of the new runner. |
runner_group_id integer Обязательное полеThe ID of the runner group to register the runner to. |
labels array of strings Обязательное полеThe names of the custom labels to add to the runner. Minimum items: 1. Maximum items: 100. |
work_folder string The working directory to be used for job execution, relative to the runner install directory. По умолчанию.: |
Коды состояния http-ответа для "Create configuration for a just-in-time runner for an organization"
Код состояния | Описание |
---|---|
201 | Created |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Примеры кода для "Create configuration for a just-in-time runner for an organization"
Пример запроса
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/orgs/ORG/actions/runners/generate-jitconfig \
-d '{"name":"New runner","runner_group_id":1,"labels":["self-hosted","X64","macOS","no-gpu"],"work_folder":"_work"}'
Response
Status: 201
{
"runner": {
"id": 23,
"name": "New runner",
"os": "unknown",
"status": "offline",
"busy": false,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
},
"encoded_jit_config": "abc123"
}
Create a registration token for an organization
Returns a token that you can pass to the config
script. The token expires after one hour.
For example, you can replace TOKEN
in the following example with the registration token provided by this endpoint to configure your self-hosted runner:
./config.sh --url https://github.com/octo-org --token TOKEN
Authenticated users must have admin access to the organization to use this endpoint.
OAuth tokens and personal access tokens (classic) need theadmin:org
scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
Подробные маркеры доступа для "Create a registration token for an organization
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Self-hosted runners" organization permissions (write)
Параметры для "Create a registration token for an organization"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
org string Обязательное полеThe organization name. The name is not case sensitive. |
Коды состояния http-ответа для "Create a registration token for an organization"
Код состояния | Описание |
---|---|
201 | Created |
Примеры кода для "Create a registration token for an organization"
Пример запроса
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/orgs/ORG/actions/runners/registration-token
Response
Status: 201
{
"token": "LLBF3JGZDX3P5PMEXLND6TS6FCWO6",
"expires_at": "2020-01-22T12:13:35.123-08:00"
}
Create a remove token for an organization
Returns a token that you can pass to the config
script to remove a self-hosted runner from an organization. The token expires after one hour.
For example, you can replace TOKEN
in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization:
./config.sh remove --token TOKEN
Authenticated users must have admin access to the organization to use this endpoint.
OAuth tokens and personal access tokens (classic) need theadmin:org
scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
Подробные маркеры доступа для "Create a remove token for an organization
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Self-hosted runners" organization permissions (write)
Параметры для "Create a remove token for an organization"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
org string Обязательное полеThe organization name. The name is not case sensitive. |
Коды состояния http-ответа для "Create a remove token for an organization"
Код состояния | Описание |
---|---|
201 | Created |
Примеры кода для "Create a remove token for an organization"
Пример запроса
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/orgs/ORG/actions/runners/remove-token
Response
Status: 201
{
"token": "AABF3JGZDX3P5PMEXLND6TS6FCWO6",
"expires_at": "2020-01-29T12:13:35.123-08:00"
}
Get a self-hosted runner for an organization
Gets a specific self-hosted runner configured in an organization.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint. If the repository is private, the repo
scope is also required.
Подробные маркеры доступа для "Get a self-hosted runner for an organization
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Self-hosted runners" organization permissions (read)
Параметры для "Get a self-hosted runner for an organization"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
org string Обязательное полеThe organization name. The name is not case sensitive. |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Коды состояния http-ответа для "Get a self-hosted runner for an organization"
Код состояния | Описание |
---|---|
200 | OK |
Примеры кода для "Get a self-hosted runner for an organization"
Пример запроса
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/orgs/ORG/actions/runners/RUNNER_ID
Response
Status: 200
{
"id": 23,
"name": "MBP",
"os": "macos",
"status": "online",
"busy": true,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
Delete a self-hosted runner from an organization
Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth tokens and personal access tokens (classic) need theadmin:org
scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
Подробные маркеры доступа для "Delete a self-hosted runner from an organization
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Self-hosted runners" organization permissions (write)
Параметры для "Delete a self-hosted runner from an organization"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
org string Обязательное полеThe organization name. The name is not case sensitive. |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Коды состояния http-ответа для "Delete a self-hosted runner from an organization"
Код состояния | Описание |
---|---|
204 | No Content |
Примеры кода для "Delete a self-hosted runner from an organization"
Пример запроса
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/orgs/ORG/actions/runners/RUNNER_ID
Response
Status: 204
List labels for a self-hosted runner for an organization
Lists all labels for a self-hosted runner configured in an organization.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint. If the repository is private, the repo
scope is also required.
Подробные маркеры доступа для "List labels for a self-hosted runner for an organization
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Self-hosted runners" organization permissions (read)
Параметры для "List labels for a self-hosted runner for an organization"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
org string Обязательное полеThe organization name. The name is not case sensitive. |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Коды состояния http-ответа для "List labels for a self-hosted runner for an organization"
Код состояния | Описание |
---|---|
200 | OK |
404 | Resource not found |
Примеры кода для "List labels for a self-hosted runner for an organization"
Пример запроса
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/orgs/ORG/actions/runners/RUNNER_ID/labels
Response
Status: 200
{
"total_count": 4,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
Add custom labels to a self-hosted runner for an organization
Adds custom labels to a self-hosted runner configured in an organization.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint.
Подробные маркеры доступа для "Add custom labels to a self-hosted runner for an organization
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Self-hosted runners" organization permissions (write)
Параметры для "Add custom labels to a self-hosted runner for an organization"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
org string Обязательное полеThe organization name. The name is not case sensitive. |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Имя., Тип, Description |
---|
labels array of strings Обязательное полеThe names of the custom labels to add to the runner. |
Коды состояния http-ответа для "Add custom labels to a self-hosted runner for an organization"
Код состояния | Описание |
---|---|
200 | OK |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Примеры кода для "Add custom labels to a self-hosted runner for an organization"
Пример запроса
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/orgs/ORG/actions/runners/RUNNER_ID/labels \
-d '{"labels":["gpu","accelerated"]}'
Response
Status: 200
{
"total_count": 4,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
Set custom labels for a self-hosted runner for an organization
Remove all previous custom labels and set the new custom labels for a specific self-hosted runner configured in an organization.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint. If the repository is private, the repo
scope is also required.
Подробные маркеры доступа для "Set custom labels for a self-hosted runner for an organization
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Self-hosted runners" organization permissions (write)
Параметры для "Set custom labels for a self-hosted runner for an organization"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
org string Обязательное полеThe organization name. The name is not case sensitive. |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Имя., Тип, Description |
---|
labels array of strings Обязательное полеThe names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. |
Коды состояния http-ответа для "Set custom labels for a self-hosted runner for an organization"
Код состояния | Описание |
---|---|
200 | OK |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Примеры кода для "Set custom labels for a self-hosted runner for an organization"
Пример запроса
curl -L \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/orgs/ORG/actions/runners/RUNNER_ID/labels \
-d '{"labels":["gpu","accelerated"]}'
Response
Status: 200
{
"total_count": 4,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
Remove all custom labels from a self-hosted runner for an organization
Remove all custom labels from a self-hosted runner configured in an organization. Returns the remaining read-only labels from the runner.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint. If the repository is private, the repo
scope is also required.
Подробные маркеры доступа для "Remove all custom labels from a self-hosted runner for an organization
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Self-hosted runners" organization permissions (write)
Параметры для "Remove all custom labels from a self-hosted runner for an organization"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
org string Обязательное полеThe organization name. The name is not case sensitive. |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Коды состояния http-ответа для "Remove all custom labels from a self-hosted runner for an organization"
Код состояния | Описание |
---|---|
200 | OK |
404 | Resource not found |
Примеры кода для "Remove all custom labels from a self-hosted runner for an organization"
Пример запроса
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/orgs/ORG/actions/runners/RUNNER_ID/labels
Response
Status: 200
{
"total_count": 3,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
}
]
}
Remove a custom label from a self-hosted runner for an organization
Remove a custom label from a self-hosted runner configured in an organization. Returns the remaining labels from the runner.
This endpoint returns a 404 Not Found
status if the custom label is not
present on the runner.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org
scope to use this endpoint. If the repository is private, the repo
scope is also required.
Подробные маркеры доступа для "Remove a custom label from a self-hosted runner for an organization
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Self-hosted runners" organization permissions (write)
Параметры для "Remove a custom label from a self-hosted runner for an organization"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
org string Обязательное полеThe organization name. The name is not case sensitive. |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
name string Обязательное полеThe name of a self-hosted runner's custom label. |
Коды состояния http-ответа для "Remove a custom label from a self-hosted runner for an organization"
Код состояния | Описание |
---|---|
200 | OK |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Примеры кода для "Remove a custom label from a self-hosted runner for an organization"
Пример запроса
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/orgs/ORG/actions/runners/RUNNER_ID/labels/NAME
Response
Status: 200
{
"total_count": 4,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
List self-hosted runners for a repository
Lists all self-hosted runners configured in a repository.
Authenticated users must have admin access to the repository to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
Подробные маркеры доступа для "List self-hosted runners for a repository
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Administration" repository permissions (read)
Параметры для "List self-hosted runners for a repository"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
owner string Обязательное полеThe account owner of the repository. The name is not case sensitive. |
repo string Обязательное полеThe name of the repository without the |
Имя., Тип, Description |
---|
name string The name of a self-hosted runner. |
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." По умолчанию.: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." По умолчанию.: |
Коды состояния http-ответа для "List self-hosted runners for a repository"
Код состояния | Описание |
---|---|
200 | OK |
Примеры кода для "List self-hosted runners for a repository"
Пример запроса
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners
Response
Status: 200
{
"total_count": 2,
"runners": [
{
"id": 23,
"name": "linux_runner",
"os": "linux",
"status": "online",
"busy": true,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 11,
"name": "Linux",
"type": "read-only"
}
]
},
{
"id": 24,
"name": "mac_runner",
"os": "macos",
"status": "offline",
"busy": false,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
]
}
List runner applications for a repository
Lists binaries for the runner application that you can download and run.
Authenticated users must have admin access to the repository to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
Подробные маркеры доступа для "List runner applications for a repository
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Administration" repository permissions (read)
Параметры для "List runner applications for a repository"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
owner string Обязательное полеThe account owner of the repository. The name is not case sensitive. |
repo string Обязательное полеThe name of the repository without the |
Коды состояния http-ответа для "List runner applications for a repository"
Код состояния | Описание |
---|---|
200 | OK |
Примеры кода для "List runner applications for a repository"
Пример запроса
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners/downloads
Response
Status: 200
[
{
"os": "osx",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-osx-x64-2.277.1.tar.gz",
"filename": "actions-runner-osx-x64-2.277.1.tar.gz",
"temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIwZTZkODAxYi02NzVlLTQ1YzAtOWM4NC1jYTkzNjdlZjc1NjciLCJzaWQiOiI4ZTE5MDliZC1kYzU1LTQ2MWYtOTk2Mi1hZTI0OTEzNzU4OWIiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MDQxNzUsImV4cCI6MTYxNzkwODM3NX0.YNsRXL9pBuIfLVndnyVQOpru77Br8hgYIX7LPsOaMfKk4K88YG89a2VIXUWPyHRiOaC-4J0lIPei8ujezEtnMfNZCwHdWq0Niiy-2-ywcfGPmcz-RHz_ZglkPFbzKaiZWJcFKCGHCP0Ta3kdXumJQqiVJEIyppxIY-caR_Wsw2L4BZHOefJq-odsJ0guPgm9fVuU9FxVRkucho1UH_bzt0tAMl1gEWOLBLZ88U9LKCzHWaxheFeBV4DTt1lAcSm213gKP1eMbgAGn5heWhR4RMRBzZc2HO3Lf1syu4E8fW8a-esRAxEYPfqPHwN9LNj2jaU3D3nPwa8lHQLLtA1PNA",
"sha256_checksum": "f1fa173889dc9036cd529417e652e1729e5a3f4d35ec0151806d7480fda6b89b"
},
{
"os": "linux",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-linux-x64-2.277.1.tar.gz",
"filename": "actions-runner-linux-x64-2.277.1.tar.gz",
"temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIwZTZkODAxYi02NzVlLTQ1YzAtOWM4NC1jYTkzNjdlZjc1NjciLCJzaWQiOiI4ZTE5MDliZC1kYzU1LTQ2MWYtOTk2Mi1hZTI0OTEzNzU4OWIiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MDQxNzUsImV4cCI6MTYxNzkwODM3NX0.YNsRXL9pBuIfLVndnyVQOpru77Br8hgYIX7LPsOaMfKk4K88YG89a2VIXUWPyHRiOaC-4J0lIPei8ujezEtnMfNZCwHdWq0Niiy-2-ywcfGPmcz-RHz_ZglkPFbzKaiZWJcFKCGHCP0Ta3kdXumJQqiVJEIyppxIY-caR_Wsw2L4BZHOefJq-odsJ0guPgm9fVuU9FxVRkucho1UH_bzt0tAMl1gEWOLBLZ88U9LKCzHWaxheFeBV4DTt1lAcSm213gKP1eMbgAGn5heWhR4RMRBzZc2HO3Lf1syu4E8fW8a-esRAxEYPfqPHwN9LNj2jaU3D3nPwa8lHQLLtA1PNA",
"sha256_checksum": "02d710fc9e0008e641274bb7da7fde61f7c9aa1cbb541a2990d3450cc88f4e98"
},
{
"os": "linux",
"architecture": "arm",
"download_url": "https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-linux-arm-2.277.1.tar.gz",
"filename": "actions-runner-linux-arm-2.277.1.tar.gz",
"temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIyYTEzZDRmZC01ZDhkLTRjNzgtYjg2MS0zYTMxZGQ3MmYzNjQiLCJzaWQiOiI0MzZiNTg3YS04ODMyLTRiMTMtOWM2Ny05OWRkMjA2ZTQzNmMiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MzE1NzEsImV4cCI6MTYxNzkzNTc3MX0.PMhU7-MOnZRDj5k5a4ieeFlQCmKPl2pQvpVRhGZq-9ByKF5s9G0rsnGBxDcolTYlbvEAmSSkeAEwF486F7P0kMVEb-GI14WbErqqMSyaPL81c3W7UHxMJLaSBnDs9ftHMv_IkJmRzaROS8q1ObzUW-ErlltxCdj2zF_5ruK9G2RR566AOAtiA3AHV6k7-FCY5--sDYJN_YXPgpwI0fPN1TM92fdPm93hJnoXuCJNpBYp1vl5W4gwGtU_Pa07ESdqqFN1YJJHUloedNhiIOczGfGVSapRc8vyGm9P_VCM_yKD8JI-MkOXl8JI5fCfhmjmKsw-vSAh9NW67RGvmehmpw",
"sha256_checksum": "2f2bda21e2fd8fed6938b33182a293f6b1f74e4c5d09acd6d9a0fe3f979f5c85"
},
{
"os": "win",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-win-x64-2.277.1.zip",
"filename": "actions-runner-win-x64-2.277.1.zip",
"temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIwZTZkODAxYi02NzVlLTQ1YzAtOWM4NC1jYTkzNjdlZjc1NjciLCJzaWQiOiI4ZTE5MDliZC1kYzU1LTQ2MWYtOTk2Mi1hZTI0OTEzNzU4OWIiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MDQxNzUsImV4cCI6MTYxNzkwODM3NX0.YNsRXL9pBuIfLVndnyVQOpru77Br8hgYIX7LPsOaMfKk4K88YG89a2VIXUWPyHRiOaC-4J0lIPei8ujezEtnMfNZCwHdWq0Niiy-2-ywcfGPmcz-RHz_ZglkPFbzKaiZWJcFKCGHCP0Ta3kdXumJQqiVJEIyppxIY-caR_Wsw2L4BZHOefJq-odsJ0guPgm9fVuU9FxVRkucho1UH_bzt0tAMl1gEWOLBLZ88U9LKCzHWaxheFeBV4DTt1lAcSm213gKP1eMbgAGn5heWhR4RMRBzZc2HO3Lf1syu4E8fW8a-esRAxEYPfqPHwN9LNj2jaU3D3nPwa8lHQLLtA1PNA",
"sha256_checksum": "7215c75a462eeb6a839fa8ed298d79f620617d44d47d37c583114fc3f3b27b30"
},
{
"os": "linux",
"architecture": "arm64",
"download_url": "https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-linux-arm64-2.277.1.tar.gz",
"filename": "actions-runner-linux-arm64-2.277.1.tar.gz",
"temp_download_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIwZTZkODAxYi02NzVlLTQ1YzAtOWM4NC1jYTkzNjdlZjc1NjciLCJzaWQiOiI4ZTE5MDliZC1kYzU1LTQ2MWYtOTk2Mi1hZTI0OTEzNzU4OWIiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MDQxNzUsImV4cCI6MTYxNzkwODM3NX0.YNsRXL9pBuIfLVndnyVQOpru77Br8hgYIX7LPsOaMfKk4K88YG89a2VIXUWPyHRiOaC-4J0lIPei8ujezEtnMfNZCwHdWq0Niiy-2-ywcfGPmcz-RHz_ZglkPFbzKaiZWJcFKCGHCP0Ta3kdXumJQqiVJEIyppxIY-caR_Wsw2L4BZHOefJq-odsJ0guPgm9fVuU9FxVRkucho1UH_bzt0tAMl1gEWOLBLZ88U9LKCzHWaxheFeBV4DTt1lAcSm213gKP1eMbgAGn5heWhR4RMRBzZc2HO3Lf1syu4E8fW8a-esRAxEYPfqPHwN9LNj2jaU3D3nPwa8lHQLLtA1PNA",
"sha256_checksum": "a6aa6dd0ba217118ef2b4ea24e9e0a85b02b13c38052a5de0776d6ced3a79c64"
}
]
Create configuration for a just-in-time runner for a repository
Generates a configuration that can be passed to the runner application at startup.
The authenticated user must have admin access to the repository.
OAuth tokens and personal access tokens (classic) need therepo
scope to use this endpoint.
Подробные маркеры доступа для "Create configuration for a just-in-time runner for a repository
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Administration" repository permissions (write)
Параметры для "Create configuration for a just-in-time runner for a repository"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
owner string Обязательное полеThe account owner of the repository. The name is not case sensitive. |
repo string Обязательное полеThe name of the repository without the |
Имя., Тип, Description |
---|
name string Обязательное полеThe name of the new runner. |
runner_group_id integer Обязательное полеThe ID of the runner group to register the runner to. |
labels array of strings Обязательное полеThe names of the custom labels to add to the runner. Minimum items: 1. Maximum items: 100. |
work_folder string The working directory to be used for job execution, relative to the runner install directory. По умолчанию.: |
Коды состояния http-ответа для "Create configuration for a just-in-time runner for a repository"
Код состояния | Описание |
---|---|
201 | Created |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Примеры кода для "Create configuration for a just-in-time runner for a repository"
Пример запроса
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners/generate-jitconfig \
-d '{"name":"New runner","runner_group_id":1,"labels":["self-hosted","X64","macOS","no-gpu"],"work_folder":"_work"}'
Response
Status: 201
{
"runner": {
"id": 23,
"name": "New runner",
"os": "unknown",
"status": "offline",
"busy": false,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
},
"encoded_jit_config": "abc123"
}
Create a registration token for a repository
Returns a token that you can pass to the config
script. The token expires after one hour.
For example, you can replace TOKEN
in the following example with the registration token provided by this endpoint to configure your self-hosted runner:
./config.sh --url https://github.com/octo-org --token TOKEN
Authenticated users must have admin access to the repository to use this endpoint.
OAuth tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
Подробные маркеры доступа для "Create a registration token for a repository
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Administration" repository permissions (write)
Параметры для "Create a registration token for a repository"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
owner string Обязательное полеThe account owner of the repository. The name is not case sensitive. |
repo string Обязательное полеThe name of the repository without the |
Коды состояния http-ответа для "Create a registration token for a repository"
Код состояния | Описание |
---|---|
201 | Created |
Примеры кода для "Create a registration token for a repository"
Пример запроса
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners/registration-token
Response
Status: 201
{
"token": "LLBF3JGZDX3P5PMEXLND6TS6FCWO6",
"expires_at": "2020-01-22T12:13:35.123-08:00"
}
Create a remove token for a repository
Returns a token that you can pass to the config
script to remove a self-hosted runner from an repository. The token expires after one hour.
For example, you can replace TOKEN
in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization:
./config.sh remove --token TOKEN
Authenticated users must have admin access to the repository to use this endpoint.
OAuth tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
Подробные маркеры доступа для "Create a remove token for a repository
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Administration" repository permissions (write)
Параметры для "Create a remove token for a repository"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
owner string Обязательное полеThe account owner of the repository. The name is not case sensitive. |
repo string Обязательное полеThe name of the repository without the |
Коды состояния http-ответа для "Create a remove token for a repository"
Код состояния | Описание |
---|---|
201 | Created |
Примеры кода для "Create a remove token for a repository"
Пример запроса
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners/remove-token
Response
Status: 201
{
"token": "AABF3JGZDX3P5PMEXLND6TS6FCWO6",
"expires_at": "2020-01-29T12:13:35.123-08:00"
}
Get a self-hosted runner for a repository
Gets a specific self-hosted runner configured in a repository.
Authenticated users must have admin access to the repository to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
Подробные маркеры доступа для "Get a self-hosted runner for a repository
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Administration" repository permissions (read)
Параметры для "Get a self-hosted runner for a repository"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
owner string Обязательное полеThe account owner of the repository. The name is not case sensitive. |
repo string Обязательное полеThe name of the repository without the |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Коды состояния http-ответа для "Get a self-hosted runner for a repository"
Код состояния | Описание |
---|---|
200 | OK |
Примеры кода для "Get a self-hosted runner for a repository"
Пример запроса
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners/RUNNER_ID
Response
Status: 200
{
"id": 23,
"name": "MBP",
"os": "macos",
"status": "online",
"busy": true,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
Delete a self-hosted runner from a repository
Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
Authenticated users must have admin access to the repository to use this endpoint.
OAuth tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
Подробные маркеры доступа для "Delete a self-hosted runner from a repository
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Administration" repository permissions (write)
Параметры для "Delete a self-hosted runner from a repository"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
owner string Обязательное полеThe account owner of the repository. The name is not case sensitive. |
repo string Обязательное полеThe name of the repository without the |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Коды состояния http-ответа для "Delete a self-hosted runner from a repository"
Код состояния | Описание |
---|---|
204 | No Content |
Примеры кода для "Delete a self-hosted runner from a repository"
Пример запроса
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners/RUNNER_ID
Response
Status: 204
List labels for a self-hosted runner for a repository
Lists all labels for a self-hosted runner configured in a repository.
Authenticated users must have admin access to the repository to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
Подробные маркеры доступа для "List labels for a self-hosted runner for a repository
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Administration" repository permissions (read)
Параметры для "List labels for a self-hosted runner for a repository"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
owner string Обязательное полеThe account owner of the repository. The name is not case sensitive. |
repo string Обязательное полеThe name of the repository without the |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Коды состояния http-ответа для "List labels for a self-hosted runner for a repository"
Код состояния | Описание |
---|---|
200 | OK |
404 | Resource not found |
Примеры кода для "List labels for a self-hosted runner for a repository"
Пример запроса
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners/RUNNER_ID/labels
Response
Status: 200
{
"total_count": 4,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
Add custom labels to a self-hosted runner for a repository
Adds custom labels to a self-hosted runner configured in a repository.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
Подробные маркеры доступа для "Add custom labels to a self-hosted runner for a repository
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Administration" repository permissions (write)
Параметры для "Add custom labels to a self-hosted runner for a repository"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
owner string Обязательное полеThe account owner of the repository. The name is not case sensitive. |
repo string Обязательное полеThe name of the repository without the |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Имя., Тип, Description |
---|
labels array of strings Обязательное полеThe names of the custom labels to add to the runner. |
Коды состояния http-ответа для "Add custom labels to a self-hosted runner for a repository"
Код состояния | Описание |
---|---|
200 | OK |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Примеры кода для "Add custom labels to a self-hosted runner for a repository"
Пример запроса
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners/RUNNER_ID/labels \
-d '{"labels":["gpu","accelerated"]}'
Response
Status: 200
{
"total_count": 4,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
Set custom labels for a self-hosted runner for a repository
Remove all previous custom labels and set the new custom labels for a specific self-hosted runner configured in a repository.
Authenticated users must have admin access to the repository to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
Подробные маркеры доступа для "Set custom labels for a self-hosted runner for a repository
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Administration" repository permissions (write)
Параметры для "Set custom labels for a self-hosted runner for a repository"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
owner string Обязательное полеThe account owner of the repository. The name is not case sensitive. |
repo string Обязательное полеThe name of the repository without the |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Имя., Тип, Description |
---|
labels array of strings Обязательное полеThe names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. |
Коды состояния http-ответа для "Set custom labels for a self-hosted runner for a repository"
Код состояния | Описание |
---|---|
200 | OK |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Примеры кода для "Set custom labels for a self-hosted runner for a repository"
Пример запроса
curl -L \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners/RUNNER_ID/labels \
-d '{"labels":["gpu","accelerated"]}'
Response
Status: 200
{
"total_count": 4,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}
Remove all custom labels from a self-hosted runner for a repository
Remove all custom labels from a self-hosted runner configured in a repository. Returns the remaining read-only labels from the runner.
Authenticated users must have admin access to the repository to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
Подробные маркеры доступа для "Remove all custom labels from a self-hosted runner for a repository
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Administration" repository permissions (write)
Параметры для "Remove all custom labels from a self-hosted runner for a repository"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
owner string Обязательное полеThe account owner of the repository. The name is not case sensitive. |
repo string Обязательное полеThe name of the repository without the |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
Коды состояния http-ответа для "Remove all custom labels from a self-hosted runner for a repository"
Код состояния | Описание |
---|---|
200 | OK |
404 | Resource not found |
Примеры кода для "Remove all custom labels from a self-hosted runner for a repository"
Пример запроса
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners/RUNNER_ID/labels
Response
Status: 200
{
"total_count": 3,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
}
]
}
Remove a custom label from a self-hosted runner for a repository
Remove a custom label from a self-hosted runner configured in a repository. Returns the remaining labels from the runner.
This endpoint returns a 404 Not Found
status if the custom label is not
present on the runner.
Authenticated users must have admin access to the repository to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo
scope to use this endpoint.
Подробные маркеры доступа для "Remove a custom label from a self-hosted runner for a repository
Эта конечная точка работает со следующими точными типами маркеров:
- Маркеры доступа пользователей приложения GitHub
- Маркеры доступа к установке приложений GitHub
- Точные личные маркеры доступа
Маркер с точной детализацией должен иметь следующий набор разрешений.:
- "Administration" repository permissions (write)
Параметры для "Remove a custom label from a self-hosted runner for a repository"
Имя., Тип, Description |
---|
accept string Setting to |
Имя., Тип, Description |
---|
owner string Обязательное полеThe account owner of the repository. The name is not case sensitive. |
repo string Обязательное полеThe name of the repository without the |
runner_id integer Обязательное полеUnique identifier of the self-hosted runner. |
name string Обязательное полеThe name of a self-hosted runner's custom label. |
Коды состояния http-ответа для "Remove a custom label from a self-hosted runner for a repository"
Код состояния | Описание |
---|---|
200 | OK |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
Примеры кода для "Remove a custom label from a self-hosted runner for a repository"
Пример запроса
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners/RUNNER_ID/labels/NAME
Response
Status: 200
{
"total_count": 4,
"labels": [
{
"id": 5,
"name": "self-hosted",
"type": "read-only"
},
{
"id": 7,
"name": "X64",
"type": "read-only"
},
{
"id": 20,
"name": "macOS",
"type": "read-only"
},
{
"id": 21,
"name": "no-gpu",
"type": "custom"
}
]
}