{"meta":{"title":"セルフホステッド ランナーの REST API エンドポイント","intro":"REST API を使って、GitHub Actions のセルフホステッド ランナーを操作します。","product":"REST API","breadcrumbs":[{"href":"/ja/rest","title":"REST API"},{"href":"/ja/rest/actions","title":"アクション"},{"href":"/ja/rest/actions/self-hosted-runners","title":"セルフホステッド ランナー"}],"documentType":"article"},"body":"# セルフホステッド ランナーの REST API エンドポイント\n\nREST API を使って、GitHub Actions のセルフホステッド ランナーを操作します。\n\n## GitHub Actions\n\nのセルフホスティング可能なランナーについて\n\nREST API を使って、GitHub Actions\nのセルフホステッド ランナーを登録、表示、削除できます。 セルフホストランナーを使えば、独自のランナーをホストして、GitHub Actionsワークフロー中でジョブの実行に使われる環境をカスタマイズできます。 詳細については、「[セルフホステッド ランナーの管理](/ja/actions/how-tos/managing-self-hosted-runners)」を参照してください。\n\n> \\[!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.\n\n## List self-hosted runners for an organization\n\n```\nGET /orgs/{org}/actions/runners\n```\n\nLists all self-hosted runners configured in an organization.\nAuthenticated users must have admin access to the organization to use this endpoint.\nOAuth 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.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`name`** (string)\n  The name of a self-hosted runner.\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/actions/runners\n```\n\n**Response schema (Status: 200):**\n\n* `total_count`: required, integer\n* `runners`: required, array of `Self hosted runners`:\n  * `id`: required, integer\n  * `runner_group_id`: integer\n  * `name`: required, string\n  * `os`: required, string\n  * `status`: required, string\n  * `busy`: required, boolean\n  * `labels`: required, array of `Self hosted runner label`:\n    * `id`: integer\n    * `name`: required, string\n    * `type`: string, enum: `read-only`, `custom`\n  * `ephemeral`: boolean\n\n## List runner applications for an organization\n\n```\nGET /orgs/{org}/actions/runners/downloads\n```\n\nLists binaries for the runner application that you can download and run.\nAuthenticated users must have admin access to the organization to use this endpoint.\nOAuth 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.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/actions/runners/downloads\n```\n\n**Response schema (Status: 200):**\n\nArray of `Runner Application`:\n\n* `os`: required, string\n* `architecture`: required, string\n* `download_url`: required, string\n* `filename`: required, string\n* `temp_download_token`: string\n* `sha256_checksum`: string\n\n## Create configuration for a just-in-time runner for an organization\n\n```\nPOST /orgs/{org}/actions/runners/generate-jitconfig\n```\n\nGenerates a configuration that can be passed to the runner application at startup.\nThe authenticated user must have admin access to the organization.\nOAuth 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.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n#### Body parameters\n\n* **`name`** (string) (required)\n  The name of the new runner.\n\n* **`runner_group_id`** (integer) (required)\n  The ID of the runner group to register the runner to.\n\n* **`labels`** (array of strings) (required)\n  The names of the custom labels to add to the runner. Minimum items: 1. Maximum items: 100.\n\n* **`work_folder`** (string)\n  The working directory to be used for job execution, relative to the runner install directory.\n  Default: `_work`\n\n### HTTP response status codes\n\n* **201** - Created\n\n* **404** - Resource not found\n\n* **409** - Conflict\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/orgs/ORG/actions/runners/generate-jitconfig \\\n  -d '{\n  \"name\": \"New runner\",\n  \"runner_group_id\": 1,\n  \"labels\": [\n    \"self-hosted\",\n    \"X64\",\n    \"macOS\",\n    \"no-gpu\"\n  ],\n  \"work_folder\": \"_work\"\n}'\n```\n\n**Response schema (Status: 201):**\n\n* `runner`: required, `Self hosted runners`:\n  * `id`: required, integer\n  * `runner_group_id`: integer\n  * `name`: required, string\n  * `os`: required, string\n  * `status`: required, string\n  * `busy`: required, boolean\n  * `labels`: required, array of `Self hosted runner label`:\n    * `id`: integer\n    * `name`: required, string\n    * `type`: string, enum: `read-only`, `custom`\n  * `ephemeral`: boolean\n* `encoded_jit_config`: required, string\n\n## Create a registration token for an organization\n\n```\nPOST /orgs/{org}/actions/runners/registration-token\n```\n\nReturns a token that you can pass to the config script. The token expires after one hour.\nFor example, you can replace TOKEN in the following example with the registration token provided by this endpoint to configure your self-hosted runner:\n./config.sh --url <https://github.com/octo-org> --token TOKEN\n\nAuthenticated users must have admin access to the organization to use this endpoint.\nOAuth 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.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **201** - Created\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/orgs/ORG/actions/runners/registration-token\n```\n\n**Response schema (Status: 201):**\n\n* `token`: required, string\n* `expires_at`: required, string, format: date-time\n* `permissions`: object\n* `repositories`: array of `Repository`:\n  * `id`: required, integer, format: int64\n  * `node_id`: required, string\n  * `name`: required, string\n  * `full_name`: required, string\n  * `license`: required, any of:\n    * **null**\n    * **License Simple**\n      * `key`: required, string\n      * `name`: required, string\n      * `url`: required, string or null, format: uri\n      * `spdx_id`: required, string or null\n      * `node_id`: required, string\n      * `html_url`: string, format: uri\n  * `forks`: required, integer\n  * `permissions`: object:\n    * `admin`: required, boolean\n    * `pull`: required, boolean\n    * `triage`: boolean\n    * `push`: required, boolean\n    * `maintain`: boolean\n  * `owner`: required, `Simple User`:\n    * `name`: string or null\n    * `email`: string or null\n    * `login`: required, string\n    * `id`: required, integer, format: int64\n    * `node_id`: required, string\n    * `avatar_url`: required, string, format: uri\n    * `gravatar_id`: required, string or null\n    * `url`: required, string, format: uri\n    * `html_url`: required, string, format: uri\n    * `followers_url`: required, string, format: uri\n    * `following_url`: required, string\n    * `gists_url`: required, string\n    * `starred_url`: required, string\n    * `subscriptions_url`: required, string, format: uri\n    * `organizations_url`: required, string, format: uri\n    * `repos_url`: required, string, format: uri\n    * `events_url`: required, string\n    * `received_events_url`: required, string, format: uri\n    * `type`: required, string\n    * `site_admin`: required, boolean\n    * `starred_at`: string\n    * `user_view_type`: string\n  * `private`: required, boolean, default: `false`\n  * `html_url`: required, string, format: uri\n  * `description`: required, string or null\n  * `fork`: required, boolean\n  * `url`: required, string, format: uri\n  * `archive_url`: required, string\n  * `assignees_url`: required, string\n  * `blobs_url`: required, string\n  * `branches_url`: required, string\n  * `collaborators_url`: required, string\n  * `comments_url`: required, string\n  * `commits_url`: required, string\n  * `compare_url`: required, string\n  * `contents_url`: required, string\n  * `contributors_url`: required, string, format: uri\n  * `deployments_url`: required, string, format: uri\n  * `downloads_url`: required, string, format: uri\n  * `events_url`: required, string, format: uri\n  * `forks_url`: required, string, format: uri\n  * `git_commits_url`: required, string\n  * `git_refs_url`: required, string\n  * `git_tags_url`: required, string\n  * `git_url`: required, string\n  * `issue_comment_url`: required, string\n  * `issue_events_url`: required, string\n  * `issues_url`: required, string\n  * `keys_url`: required, string\n  * `labels_url`: required, string\n  * `languages_url`: required, string, format: uri\n  * `merges_url`: required, string, format: uri\n  * `milestones_url`: required, string\n  * `notifications_url`: required, string\n  * `pulls_url`: required, string\n  * `releases_url`: required, string\n  * `ssh_url`: required, string\n  * `stargazers_url`: required, string, format: uri\n  * `statuses_url`: required, string\n  * `subscribers_url`: required, string, format: uri\n  * `subscription_url`: required, string, format: uri\n  * `tags_url`: required, string, format: uri\n  * `teams_url`: required, string, format: uri\n  * `trees_url`: required, string\n  * `clone_url`: required, string\n  * `mirror_url`: required, string or null, format: uri\n  * `hooks_url`: required, string, format: uri\n  * `svn_url`: required, string, format: uri\n  * `homepage`: required, string or null, format: uri\n  * `language`: required, string or null\n  * `forks_count`: required, integer\n  * `stargazers_count`: required, integer\n  * `watchers_count`: required, integer\n  * `size`: required, integer\n  * `default_branch`: required, string\n  * `open_issues_count`: required, integer\n  * `is_template`: boolean, default: `false`\n  * `topics`: array of string\n  * `has_issues`: required, boolean, default: `true`\n  * `has_projects`: required, boolean, default: `true`\n  * `has_wiki`: required, boolean, default: `true`\n  * `has_pages`: required, boolean\n  * `has_discussions`: boolean, default: `false`\n  * `has_pull_requests`: boolean, default: `true`\n  * `pull_request_creation_policy`: string, enum: `all`, `collaborators_only`\n  * `archived`: required, boolean, default: `false`\n  * `disabled`: required, boolean\n  * `visibility`: string, default: `\"public\"`\n  * `pushed_at`: required, string or null, format: date-time\n  * `created_at`: required, string or null, format: date-time\n  * `updated_at`: required, string or null, format: date-time\n  * `allow_rebase_merge`: boolean, default: `true`\n  * `temp_clone_token`: string\n  * `allow_squash_merge`: boolean, default: `true`\n  * `allow_auto_merge`: boolean, default: `false`\n  * `delete_branch_on_merge`: boolean, default: `false`\n  * `allow_update_branch`: boolean, default: `false`\n  * `squash_merge_commit_title`: string, enum: `PR_TITLE`, `COMMIT_OR_PR_TITLE`\n  * `squash_merge_commit_message`: string, enum: `PR_BODY`, `COMMIT_MESSAGES`, `BLANK`\n  * `merge_commit_title`: string, enum: `PR_TITLE`, `MERGE_MESSAGE`\n  * `merge_commit_message`: string, enum: `PR_BODY`, `PR_TITLE`, `BLANK`\n  * `allow_merge_commit`: boolean, default: `true`\n  * `allow_forking`: boolean\n  * `web_commit_signoff_required`: boolean, default: `false`\n  * `open_issues`: required, integer\n  * `watchers`: required, integer\n  * `starred_at`: string\n  * `anonymous_access_enabled`: boolean\n  * `code_search_index_status`: object:\n    * `lexical_search_ok`: boolean\n    * `lexical_commit_sha`: string\n* `single_file`: string or null\n* `repository_selection`: string, enum: `all`, `selected`\n\n## Create a remove token for an organization\n\n```\nPOST /orgs/{org}/actions/runners/remove-token\n```\n\nReturns 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.\nFor 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:\n./config.sh remove --token TOKEN\n\nAuthenticated users must have admin access to the organization to use this endpoint.\nOAuth 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.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **201** - Created\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/orgs/ORG/actions/runners/remove-token\n```\n\n**Response schema (Status: 201):**\n\nSame response schema as [Create a registration token for an organization](#create-a-registration-token-for-an-organization).\n\n## Get a self-hosted runner for an organization\n\n```\nGET /orgs/{org}/actions/runners/{runner_id}\n```\n\nGets a specific self-hosted runner configured in an organization.\nAuthenticated users must have admin access to the organization to use this endpoint.\nOAuth 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.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n* **`runner_id`** (integer) (required)\n  Unique identifier of the self-hosted runner.\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/actions/runners/RUNNER_ID\n```\n\n**Response schema (Status: 200):**\n\n* `id`: required, integer\n* `runner_group_id`: integer\n* `name`: required, string\n* `os`: required, string\n* `status`: required, string\n* `busy`: required, boolean\n* `labels`: required, array of `Self hosted runner label`:\n  * `id`: integer\n  * `name`: required, string\n  * `type`: string, enum: `read-only`, `custom`\n* `ephemeral`: boolean\n\n## Delete a self-hosted runner from an organization\n\n```\nDELETE /orgs/{org}/actions/runners/{runner_id}\n```\n\nForces 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.\nAuthenticated users must have admin access to the organization to use this endpoint.\nOAuth 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.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n* **`runner_id`** (integer) (required)\n  Unique identifier of the self-hosted runner.\n\n### HTTP response status codes\n\n* **204** - No Content\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/orgs/ORG/actions/runners/RUNNER_ID\n```\n\n**Response schema (Status: 204):**\n\n## List labels for a self-hosted runner for an organization\n\n```\nGET /orgs/{org}/actions/runners/{runner_id}/labels\n```\n\nLists all labels for a self-hosted runner configured in an organization.\nAuthenticated users must have admin access to the organization to use this endpoint.\nOAuth 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.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n* **`runner_id`** (integer) (required)\n  Unique identifier of the self-hosted runner.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/actions/runners/RUNNER_ID/labels\n```\n\n**Response schema (Status: 200):**\n\n* `total_count`: required, integer\n* `labels`: required, array of `Self hosted runner label`:\n  * `id`: integer\n  * `name`: required, string\n  * `type`: string, enum: `read-only`, `custom`\n\n## Add custom labels to a self-hosted runner for an organization\n\n```\nPOST /orgs/{org}/actions/runners/{runner_id}/labels\n```\n\nAdds custom labels to a self-hosted runner configured in an organization.\nAuthenticated users must have admin access to the organization to use this endpoint.\nOAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n* **`runner_id`** (integer) (required)\n  Unique identifier of the self-hosted runner.\n\n#### Body parameters\n\n* **`labels`** (array of strings) (required)\n  The names of the custom labels to add to the runner.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **404** - Resource not found\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/orgs/ORG/actions/runners/RUNNER_ID/labels \\\n  -d '{\n  \"labels\": [\n    \"gpu\",\n    \"accelerated\"\n  ]\n}'\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List labels for a self-hosted runner for an organization](#list-labels-for-a-self-hosted-runner-for-an-organization).\n\n## Set custom labels for a self-hosted runner for an organization\n\n```\nPUT /orgs/{org}/actions/runners/{runner_id}/labels\n```\n\nRemove all previous custom labels and set the new custom labels for a specific\nself-hosted runner configured in an organization.\nAuthenticated users must have admin access to the organization to use this endpoint.\nOAuth 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.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n* **`runner_id`** (integer) (required)\n  Unique identifier of the self-hosted runner.\n\n#### Body parameters\n\n* **`labels`** (array of strings) (required)\n  The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **404** - Resource not found\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PUT \\\n  https://api.github.com/orgs/ORG/actions/runners/RUNNER_ID/labels \\\n  -d '{\n  \"labels\": [\n    \"gpu\",\n    \"accelerated\"\n  ]\n}'\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List labels for a self-hosted runner for an organization](#list-labels-for-a-self-hosted-runner-for-an-organization).\n\n## Remove all custom labels from a self-hosted runner for an organization\n\n```\nDELETE /orgs/{org}/actions/runners/{runner_id}/labels\n```\n\nRemove all custom labels from a self-hosted runner configured in an\norganization. Returns the remaining read-only labels from the runner.\nAuthenticated users must have admin access to the organization to use this endpoint.\nOAuth 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.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n* **`runner_id`** (integer) (required)\n  Unique identifier of the self-hosted runner.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/orgs/ORG/actions/runners/RUNNER_ID/labels\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List labels for a self-hosted runner for an organization](#list-labels-for-a-self-hosted-runner-for-an-organization).\n\n## Remove a custom label from a self-hosted runner for an organization\n\n```\nDELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}\n```\n\nRemove a custom label from a self-hosted runner configured\nin an organization. Returns the remaining labels from the runner.\nThis endpoint returns a 404 Not Found status if the custom label is not\npresent on the runner.\nAuthenticated users must have admin access to the organization to use this endpoint.\nOAuth 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.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n* **`runner_id`** (integer) (required)\n  Unique identifier of the self-hosted runner.\n\n* **`name`** (string) (required)\n  The name of a self-hosted runner's custom label.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **404** - Resource not found\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/orgs/ORG/actions/runners/RUNNER_ID/labels/NAME\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List labels for a self-hosted runner for an organization](#list-labels-for-a-self-hosted-runner-for-an-organization).\n\n## List self-hosted runners for a repository\n\n```\nGET /repos/{owner}/{repo}/actions/runners\n```\n\nLists all self-hosted runners configured in a repository.\nAuthenticated users must have admin access to the repository to use this endpoint.\nOAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`name`** (string)\n  The name of a self-hosted runner.\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/actions/runners\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List self-hosted runners for an organization](#list-self-hosted-runners-for-an-organization).\n\n## List runner applications for a repository\n\n```\nGET /repos/{owner}/{repo}/actions/runners/downloads\n```\n\nLists binaries for the runner application that you can download and run.\nAuthenticated users must have admin access to the repository to use this endpoint.\nOAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/actions/runners/downloads\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List runner applications for an organization](#list-runner-applications-for-an-organization).\n\n## Create configuration for a just-in-time runner for a repository\n\n```\nPOST /repos/{owner}/{repo}/actions/runners/generate-jitconfig\n```\n\nGenerates a configuration that can be passed to the runner application at startup.\nThe authenticated user must have admin access to the repository.\nOAuth tokens and personal access tokens (classic) need therepo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n#### Body parameters\n\n* **`name`** (string) (required)\n  The name of the new runner.\n\n* **`runner_group_id`** (integer) (required)\n  The ID of the runner group to register the runner to.\n\n* **`labels`** (array of strings) (required)\n  The names of the custom labels to add to the runner. Minimum items: 1. Maximum items: 100.\n\n* **`work_folder`** (string)\n  The working directory to be used for job execution, relative to the runner install directory.\n  Default: `_work`\n\n### HTTP response status codes\n\n* **201** - Created\n\n* **404** - Resource not found\n\n* **409** - Conflict\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/repos/OWNER/REPO/actions/runners/generate-jitconfig \\\n  -d '{\n  \"name\": \"New runner\",\n  \"runner_group_id\": 1,\n  \"labels\": [\n    \"self-hosted\",\n    \"X64\",\n    \"macOS\",\n    \"no-gpu\"\n  ],\n  \"work_folder\": \"_work\"\n}'\n```\n\n**Response schema (Status: 201):**\n\nSame response schema as [Create configuration for a just-in-time runner for an organization](#create-configuration-for-a-just-in-time-runner-for-an-organization).\n\n## Create a registration token for a repository\n\n```\nPOST /repos/{owner}/{repo}/actions/runners/registration-token\n```\n\nReturns a token that you can pass to the config script. The token expires after one hour.\nFor example, you can replace TOKEN in the following example with the registration token provided by this endpoint to configure your self-hosted runner:\n./config.sh --url <https://github.com/octo-org> --token TOKEN\n\nAuthenticated users must have admin access to the repository to use this endpoint.\nOAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **201** - Created\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/repos/OWNER/REPO/actions/runners/registration-token\n```\n\n**Response schema (Status: 201):**\n\nSame response schema as [Create a registration token for an organization](#create-a-registration-token-for-an-organization).\n\n## Create a remove token for a repository\n\n```\nPOST /repos/{owner}/{repo}/actions/runners/remove-token\n```\n\nReturns 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.\nFor 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:\n./config.sh remove --token TOKEN\n\nAuthenticated users must have admin access to the repository to use this endpoint.\nOAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **201** - Created\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/repos/OWNER/REPO/actions/runners/remove-token\n```\n\n**Response schema (Status: 201):**\n\nSame response schema as [Create a registration token for an organization](#create-a-registration-token-for-an-organization).\n\n## Get a self-hosted runner for a repository\n\n```\nGET /repos/{owner}/{repo}/actions/runners/{runner_id}\n```\n\nGets a specific self-hosted runner configured in a repository.\nAuthenticated users must have admin access to the repository to use this endpoint.\nOAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`runner_id`** (integer) (required)\n  Unique identifier of the self-hosted runner.\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/actions/runners/RUNNER_ID\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Get a self-hosted runner for an organization](#get-a-self-hosted-runner-for-an-organization).\n\n## Delete a self-hosted runner from a repository\n\n```\nDELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\n```\n\nForces 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.\nAuthenticated users must have admin access to the repository to use this endpoint.\nOAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`runner_id`** (integer) (required)\n  Unique identifier of the self-hosted runner.\n\n### HTTP response status codes\n\n* **204** - No Content\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/repos/OWNER/REPO/actions/runners/RUNNER_ID\n```\n\n**Response schema (Status: 204):**\n\n## List labels for a self-hosted runner for a repository\n\n```\nGET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\n```\n\nLists all labels for a self-hosted runner configured in a repository.\nAuthenticated users must have admin access to the repository to use this endpoint.\nOAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`runner_id`** (integer) (required)\n  Unique identifier of the self-hosted runner.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/actions/runners/RUNNER_ID/labels\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List labels for a self-hosted runner for an organization](#list-labels-for-a-self-hosted-runner-for-an-organization).\n\n## Add custom labels to a self-hosted runner for a repository\n\n```\nPOST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\n```\n\nAdds custom labels to a self-hosted runner configured in a repository.\nAuthenticated users must have admin access to the organization to use this endpoint.\nOAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`runner_id`** (integer) (required)\n  Unique identifier of the self-hosted runner.\n\n#### Body parameters\n\n* **`labels`** (array of strings) (required)\n  The names of the custom labels to add to the runner.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **404** - Resource not found\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/repos/OWNER/REPO/actions/runners/RUNNER_ID/labels \\\n  -d '{\n  \"labels\": [\n    \"gpu\",\n    \"accelerated\"\n  ]\n}'\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List labels for a self-hosted runner for an organization](#list-labels-for-a-self-hosted-runner-for-an-organization).\n\n## Set custom labels for a self-hosted runner for a repository\n\n```\nPUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\n```\n\nRemove all previous custom labels and set the new custom labels for a specific\nself-hosted runner configured in a repository.\nAuthenticated users must have admin access to the repository to use this endpoint.\nOAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`runner_id`** (integer) (required)\n  Unique identifier of the self-hosted runner.\n\n#### Body parameters\n\n* **`labels`** (array of strings) (required)\n  The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **404** - Resource not found\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PUT \\\n  https://api.github.com/repos/OWNER/REPO/actions/runners/RUNNER_ID/labels \\\n  -d '{\n  \"labels\": [\n    \"gpu\",\n    \"accelerated\"\n  ]\n}'\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List labels for a self-hosted runner for an organization](#list-labels-for-a-self-hosted-runner-for-an-organization).\n\n## Remove all custom labels from a self-hosted runner for a repository\n\n```\nDELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\n```\n\nRemove all custom labels from a self-hosted runner configured in a\nrepository. Returns the remaining read-only labels from the runner.\nAuthenticated users must have admin access to the repository to use this endpoint.\nOAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`runner_id`** (integer) (required)\n  Unique identifier of the self-hosted runner.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/repos/OWNER/REPO/actions/runners/RUNNER_ID/labels\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List labels for a self-hosted runner for an organization](#list-labels-for-a-self-hosted-runner-for-an-organization).\n\n## Remove a custom label from a self-hosted runner for a repository\n\n```\nDELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}\n```\n\nRemove a custom label from a self-hosted runner configured\nin a repository. Returns the remaining labels from the runner.\nThis endpoint returns a 404 Not Found status if the custom label is not\npresent on the runner.\nAuthenticated users must have admin access to the repository to use this endpoint.\nOAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`runner_id`** (integer) (required)\n  Unique identifier of the self-hosted runner.\n\n* **`name`** (string) (required)\n  The name of a self-hosted runner's custom label.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **404** - Resource not found\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/repos/OWNER/REPO/actions/runners/RUNNER_ID/labels/NAME\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List labels for a self-hosted runner for an organization](#list-labels-for-a-self-hosted-runner-for-an-organization)."}