セルフホステッド ランナー
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.
You must authenticate using an access token with the admin:enterprise scope to use this endpoint.
"List self-hosted runners for an enterprise" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
enterprise string 必須The slug version of the enterprise name. You can also substitute this value with the enterprise id. |
| 名前, Type, 説明 |
|---|
per_page integer The number of results per page (max 100). Default: |
page integer Page number of the results to fetch. Default: |
"List self-hosted runners for an enterprise" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | OK |
"List self-hosted runners for an enterprise" のコード サンプル
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runnersResponse
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.
You must authenticate using an access token with the admin:enterprise scope to use this endpoint.
"List runner applications for an enterprise" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
enterprise string 必須The slug version of the enterprise name. You can also substitute this value with the enterprise id. |
"List runner applications for an enterprise" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | OK |
"List runner applications for an enterprise" のコード サンプル
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners/downloadsResponse
Status: 200[
{
"os": "osx",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-osx-x64-2.164.0.tar.gz",
"filename": "actions-runner-osx-x64-2.164.0.tar.gz"
},
{
"os": "linux",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-x64-2.164.0.tar.gz",
"filename": "actions-runner-linux-x64-2.164.0.tar.gz"
},
{
"os": "linux",
"architecture": "arm",
"download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm-2.164.0.tar.gz",
"filename": "actions-runner-linux-arm-2.164.0.tar.gz"
},
{
"os": "win",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-win-x64-2.164.0.zip",
"filename": "actions-runner-win-x64-2.164.0.zip"
},
{
"os": "linux",
"architecture": "arm64",
"download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm64-2.164.0.tar.gz",
"filename": "actions-runner-linux-arm64-2.164.0.tar.gz"
}
]Create a registration token for an enterprise
Returns a token that you can pass to the config script. The token expires after one hour.
You must authenticate using an access token with the admin:enterprise scope to use this endpoint.
Example using registration token:
Configure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint.
./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN
"Create a registration token for an enterprise" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
enterprise string 必須The slug version of the enterprise name. You can also substitute this value with the enterprise id. |
"Create a registration token for an enterprise" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
201 | Created |
"Create a registration token for an enterprise" のコード サンプル
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners/registration-tokenResponse
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.
You must authenticate using an access token with the admin:enterprise scope to use this endpoint.
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
"Create a remove token for an enterprise" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
enterprise string 必須The slug version of the enterprise name. You can also substitute this value with the enterprise id. |
"Create a remove token for an enterprise" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
201 | Created |
"Create a remove token for an enterprise" のコード サンプル
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners/remove-tokenResponse
Get a self-hosted runner for an enterprise
Gets a specific self-hosted runner configured in an enterprise.
You must authenticate using an access token with the admin:enterprise scope to use this endpoint.
"Get a self-hosted runner for an enterprise" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
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. |
"Get a self-hosted runner for an enterprise" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | OK |
"Get a self-hosted runner for an enterprise" のコード サンプル
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners/RUNNER_IDResponse
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.
You must authenticate using an access token with the admin:enterprise scope to use this endpoint.
"Delete a self-hosted runner from an enterprise" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
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. |
"Delete a self-hosted runner from an enterprise" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
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>" \
https://HOSTNAME/api/v3/enterprises/ENTERPRISE/actions/runners/RUNNER_IDResponse
Status: 204List self-hosted runners for an organization
Lists all self-hosted runners configured in an organization.
You must authenticate using an access token with the admin:org scope to use this endpoint.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
"List self-hosted runners for an organization" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
org string 必須The organization name. The name is not case sensitive. |
| 名前, Type, 説明 |
|---|
per_page integer The number of results per page (max 100). Default: |
page integer Page number of the results to fetch. Default: |
"List self-hosted runners for an organization" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | OK |
"List self-hosted runners for an organization" のコード サンプル
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/orgs/ORG/actions/runnersResponse
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.
You must authenticate using an access token with the admin:org scope to use this endpoint.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
"List runner applications for an organization" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
org string 必須The organization name. The name is not case sensitive. |
"List runner applications for an organization" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | OK |
"List runner applications for an organization" のコード サンプル
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/orgs/ORG/actions/runners/downloadsResponse
Status: 200[
{
"os": "osx",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-osx-x64-2.164.0.tar.gz",
"filename": "actions-runner-osx-x64-2.164.0.tar.gz"
},
{
"os": "linux",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-x64-2.164.0.tar.gz",
"filename": "actions-runner-linux-x64-2.164.0.tar.gz"
},
{
"os": "linux",
"architecture": "arm",
"download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm-2.164.0.tar.gz",
"filename": "actions-runner-linux-arm-2.164.0.tar.gz"
},
{
"os": "win",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-win-x64-2.164.0.zip",
"filename": "actions-runner-win-x64-2.164.0.zip"
},
{
"os": "linux",
"architecture": "arm64",
"download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm64-2.164.0.tar.gz",
"filename": "actions-runner-linux-arm64-2.164.0.tar.gz"
}
]Create a registration token for an organization
Returns a token that you can pass to the config script. The token expires after one hour.
You must authenticate using an access token with the admin:org scope to use this endpoint.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
Example using registration token:
Configure your self-hosted runner, replacing TOKEN with the registration token provided by this endpoint.
./config.sh --url https://github.com/octo-org --token TOKEN
"Create a registration token for an organization" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
org string 必須The organization name. The name is not case sensitive. |
"Create a registration token for an organization" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
201 | Created |
"Create a registration token for an organization" のコード サンプル
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/orgs/ORG/actions/runners/registration-tokenResponse
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.
You must authenticate using an access token with the admin:org scope to use this endpoint.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
Example using remove token:
To remove your self-hosted runner from an organization, replace TOKEN with the remove token provided by this
endpoint.
./config.sh remove --token TOKEN
"Create a remove token for an organization" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
org string 必須The organization name. The name is not case sensitive. |
"Create a remove token for an organization" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
201 | Created |
"Create a remove token for an organization" のコード サンプル
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/orgs/ORG/actions/runners/remove-tokenResponse
Get a self-hosted runner for an organization
Gets a specific self-hosted runner configured in an organization.
You must authenticate using an access token with the admin:org scope to use this endpoint.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
"Get a self-hosted runner for an organization" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
org string 必須The organization name. The name is not case sensitive. |
runner_id integer 必須Unique identifier of the self-hosted runner. |
"Get a self-hosted runner for an organization" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | OK |
"Get a self-hosted runner for an organization" のコード サンプル
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/orgs/ORG/actions/runners/RUNNER_IDResponse
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.
You must authenticate using an access token with the admin:org scope to use this endpoint.
If the repository is private, you must use an access token with the repo scope.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
"Delete a self-hosted runner from an organization" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
org string 必須The organization name. The name is not case sensitive. |
runner_id integer 必須Unique identifier of the self-hosted runner. |
"Delete a self-hosted runner from an organization" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
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>" \
https://HOSTNAME/api/v3/orgs/ORG/actions/runners/RUNNER_IDResponse
Status: 204List self-hosted runners for a repository
Lists all self-hosted runners configured in a repository.
You must authenticate using an access token with the repo scope to use this endpoint.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
"List self-hosted runners for a repository" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
owner string 必須The account owner of the repository. The name is not case sensitive. |
repo string 必須The name of the repository without the |
| 名前, Type, 説明 |
|---|
per_page integer The number of results per page (max 100). Default: |
page integer Page number of the results to fetch. Default: |
"List self-hosted runners for a repository" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | OK |
"List self-hosted runners for a repository" のコード サンプル
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runnersResponse
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.
You must authenticate using an access token with the repo scope to use this endpoint.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
"List runner applications for a repository" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
owner string 必須The account owner of the repository. The name is not case sensitive. |
repo string 必須The name of the repository without the |
"List runner applications for a repository" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | OK |
"List runner applications for a repository" のコード サンプル
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners/downloadsResponse
Status: 200[
{
"os": "osx",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-osx-x64-2.164.0.tar.gz",
"filename": "actions-runner-osx-x64-2.164.0.tar.gz"
},
{
"os": "linux",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-x64-2.164.0.tar.gz",
"filename": "actions-runner-linux-x64-2.164.0.tar.gz"
},
{
"os": "linux",
"architecture": "arm",
"download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm-2.164.0.tar.gz",
"filename": "actions-runner-linux-arm-2.164.0.tar.gz"
},
{
"os": "win",
"architecture": "x64",
"download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-win-x64-2.164.0.zip",
"filename": "actions-runner-win-x64-2.164.0.zip"
},
{
"os": "linux",
"architecture": "arm64",
"download_url": "https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm64-2.164.0.tar.gz",
"filename": "actions-runner-linux-arm64-2.164.0.tar.gz"
}
]Create a registration token for a repository
Returns a token that you can pass to the config script. The token
expires after one hour.
You must authenticate using an access token with the repo scope to use this endpoint.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
Example using registration token:
Configure your self-hosted runner, replacing TOKEN with the registration token provided
by this endpoint.
config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN
"Create a registration token for a repository" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
owner string 必須The account owner of the repository. The name is not case sensitive. |
repo string 必須The name of the repository without the |
"Create a registration token for a repository" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
201 | Created |
"Create a registration token for a repository" のコード サンプル
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners/registration-tokenResponse
Create a remove token for a repository
Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.
You must authenticate using an access token with the repo scope to use this endpoint.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
Example using remove token:
To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.
config.sh remove --token TOKEN
"Create a remove token for a repository" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
owner string 必須The account owner of the repository. The name is not case sensitive. |
repo string 必須The name of the repository without the |
"Create a remove token for a repository" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
201 | Created |
"Create a remove token for a repository" のコード サンプル
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners/remove-tokenResponse
Get a self-hosted runner for a repository
Gets a specific self-hosted runner configured in a repository.
You must authenticate using an access token with the repo scope to use this endpoint.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
"Get a self-hosted runner for a repository" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
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. |
"Get a self-hosted runner for a repository" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | OK |
"Get a self-hosted runner for a repository" のコード サンプル
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners/RUNNER_IDResponse
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.
You must authenticate using an access token with the repo scope to use this endpoint.
GitHub Apps must have the administration permission for repositories and the organization_self_hosted_runners permission for organizations.
Authenticated users must have admin access to repositories or organizations, or the manage_runners:enterprise scope for enterprises, to use these endpoints.
"Delete a self-hosted runner from a repository" のパラメーター
| 名前, Type, 説明 |
|---|
accept string Setting to |
| 名前, Type, 説明 |
|---|
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. |
"Delete a self-hosted runner from a repository" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
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>" \
https://HOSTNAME/api/v3/repos/OWNER/REPO/actions/runners/RUNNER_IDResponse
Status: 204