Executores hospedados no GitHub
Use a API REST para interagir com os executores hospedados no GitHub no GitHub Actions.
List GitHub-hosted runners for an organization
Lists all GitHub-hosted runners configured in an organization.
OAuth app tokens and personal access tokens (classic) need the manage_runner:org scope to use this endpoint.
Tokens de acesso refinados para "List GitHub-hosted runners for an organization"
Esse ponto de extremidade funciona com os seguintes tipos de token refinados:
- Tokens de acesso de usuário do aplicativo GitHub
- Tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Administration" organization permissions (read)
Parâmetros para "List GitHub-hosted runners for an organization"
| Nome, Tipo, Descrição | 
|---|
| acceptstringSetting to  | 
| Nome, Tipo, Descrição | 
|---|
| orgstring ObrigatórioThe organization name. The name is not case sensitive. | 
| Nome, Tipo, Descrição | 
|---|
| per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API." Padrão:  | 
| pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API." Padrão:  | 
Códigos de status de resposta HTTP para "List GitHub-hosted runners for an organization"
| Código de status | Descrição | 
|---|---|
| 200 | OK | 
Exemplos de código para "List GitHub-hosted runners for an organization"
Exemplo de solicitação
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/hosted-runnersResponse
Status: 200{
  "total_count": 2,
  "runners": [
    {
      "id": 5,
      "name": "My hosted ubuntu runner",
      "runner_group_id": 2,
      "platform": "linux-x64",
      "image": {
        "id": "ubuntu-20.04",
        "size": 86
      },
      "machine_size_details": {
        "id": "4-core",
        "cpu_cores": 4,
        "memory_gb": 16,
        "storage_gb": 150
      },
      "status": "Ready",
      "maximum_runners": 10,
      "public_ip_enabled": true,
      "public_ips": [
        {
          "enabled": true,
          "prefix": "20.80.208.150",
          "length": 31
        }
      ],
      "last_active_on": "2022-10-09T23:39:01Z"
    },
    {
      "id": 7,
      "name": "My hosted Windows runner",
      "runner_group_id": 2,
      "platform": "win-x64",
      "image": {
        "id": "windows-latest",
        "size": 256
      },
      "machine_size_details": {
        "id": "8-core",
        "cpu_cores": 8,
        "memory_gb": 32,
        "storage_gb": 300
      },
      "status": "Ready",
      "maximum_runners": 20,
      "public_ip_enabled": false,
      "public_ips": [],
      "last_active_on": "2023-04-26T15:23:37Z"
    }
  ]
}Create a GitHub-hosted runner for an organization
Creates a GitHub-hosted runner for an organization.
OAuth tokens and personal access tokens (classic) need the manage_runners:org scope to use this endpoint.
Tokens de acesso refinados para "Create a GitHub-hosted runner for an organization"
Esse ponto de extremidade funciona com os seguintes tipos de token refinados:
- Tokens de acesso de usuário do aplicativo GitHub
- Tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Administration" organization permissions (write)
Parâmetros para "Create a GitHub-hosted runner for an organization"
| Nome, Tipo, Descrição | 
|---|
| acceptstringSetting to  | 
| Nome, Tipo, Descrição | 
|---|
| orgstring ObrigatórioThe organization name. The name is not case sensitive. | 
| Nome, Tipo, Descrição | ||||
|---|---|---|---|---|
| namestring ObrigatórioName of the runner. Must be between 1 and 64 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. | ||||
| imageobject ObrigatórioThe image of runner. To list all available images, use  | ||||
| Properties of  | 
| Nome, Tipo, Descrição | 
|---|
| idstringThe unique identifier of the runner image. | 
| sourcestringThe source of the runner image. Pode ser um dos:  | 
| versionstring or nullThe version of the runner image to deploy. This is relevant only for runners using custom images. | 
size string ObrigatórioThe machine size of the runner. To list available sizes, use GET actions/hosted-runners/machine-sizes
runner_group_id integer ObrigatórioThe existing runner group to add this runner to.
maximum_runners integer The maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost.
enable_static_ip boolean Whether this runner should be created with a static public IP. Note limit on account. To list limits on account, use GET actions/hosted-runners/limits
image_gen boolean Whether this runner should be used to generate custom images.
Padrão: false
Códigos de status de resposta HTTP para "Create a GitHub-hosted runner for an organization"
| Código de status | Descrição | 
|---|---|
| 201 | Created | 
Exemplos de código para "Create a GitHub-hosted runner for an organization"
Exemplo de solicitação
curl -L \
  -X POST \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/hosted-runners \
  -d '{"name":"My Hosted runner","image":{"id":"ubuntu-latest","source":"github"},"runner_group_id":1,"size":"4-core","maximum_runners":50,"enable_static_ip":false}'Response
Status: 201{
  "id": 5,
  "name": "My hosted ubuntu runner",
  "runner_group_id": 2,
  "platform": "linux-x64",
  "image": {
    "id": "ubuntu-20.04",
    "size": 86
  },
  "machine_size_details": {
    "id": "4-core",
    "cpu_cores": 4,
    "memory_gb": 16,
    "storage_gb": 150
  },
  "status": "Ready",
  "maximum_runners": 10,
  "public_ip_enabled": true,
  "public_ips": [
    {
      "enabled": true,
      "prefix": "20.80.208.150",
      "length": 31
    }
  ],
  "last_active_on": "2022-10-09T23:39:01Z"
}List custom images for an organization
List custom images for an organization.
OAuth tokens and personal access tokens (classic) need the manage_runners:org scope to use this endpoint.
Tokens de acesso refinados para "List custom images for an organization"
Esse ponto de extremidade funciona com os seguintes tipos de token refinados:
- Tokens de acesso de usuário do aplicativo GitHub
- Tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Hosted runner custom images" organization permissions (read)
Parâmetros para "List custom images for an organization"
| Nome, Tipo, Descrição | 
|---|
| acceptstringSetting to  | 
| Nome, Tipo, Descrição | 
|---|
| orgstring ObrigatórioThe organization name. The name is not case sensitive. | 
Códigos de status de resposta HTTP para "List custom images for an organization"
| Código de status | Descrição | 
|---|---|
| 200 | OK | 
Exemplos de código para "List custom images for an organization"
Exemplo de solicitação
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/hosted-runners/images/customResponse
Status: 200{
  "total_count": 2,
  "image_versions": [
    {
      "version": "1.1.0",
      "size_gb": 75,
      "state": "Ready",
      "created_on": "2024-11-09T23:39:01Z"
    },
    {
      "version": "1.0.0",
      "size_gb": 75,
      "state": "Ready",
      "created_on": "2024-11-08T20:39:01Z"
    }
  ]
}Get a custom image definition for GitHub Actions Hosted Runners
Get a custom image definition for GitHub Actions Hosted Runners.
OAuth tokens and personal access tokens (classic) need the manage_runners:org scope to use this endpoint.
Tokens de acesso refinados para "Get a custom image definition for GitHub Actions Hosted Runners"
Esse ponto de extremidade funciona com os seguintes tipos de token refinados:
- Tokens de acesso de usuário do aplicativo GitHub
- Tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Hosted runner custom images" organization permissions (read)
Parâmetros para "Get a custom image definition for GitHub Actions Hosted Runners"
| Nome, Tipo, Descrição | 
|---|
| acceptstringSetting to  | 
| Nome, Tipo, Descrição | 
|---|
| orgstring ObrigatórioThe organization name. The name is not case sensitive. | 
| image_definition_idinteger ObrigatórioImage definition ID of custom image | 
Códigos de status de resposta HTTP para "Get a custom image definition for GitHub Actions Hosted Runners"
| Código de status | Descrição | 
|---|---|
| 200 | OK | 
Exemplos de código para "Get a custom image definition for GitHub Actions Hosted Runners"
Exemplo de solicitação
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/hosted-runners/images/custom/IMAGE_DEFINITION_IDResponse
Status: 200{
  "id": 1,
  "platform": "linux-x64",
  "name": "CustomImage",
  "source": "custom",
  "versions_count": 4,
  "total_versions_size": 200,
  "latest_version": "1.3.0",
  "state": "Ready"
}Delete a custom image from the organization
Delete a custom image from the organization.
OAuth tokens and personal access tokens (classic) need the manage_runners:org scope to use this endpoint.
Tokens de acesso refinados para "Delete a custom image from the organization"
Esse ponto de extremidade funciona com os seguintes tipos de token refinados:
- Tokens de acesso de usuário do aplicativo GitHub
- Tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Hosted runner custom images" organization permissions (write)
Parâmetros para "Delete a custom image from the organization"
| Nome, Tipo, Descrição | 
|---|
| acceptstringSetting to  | 
| Nome, Tipo, Descrição | 
|---|
| orgstring ObrigatórioThe organization name. The name is not case sensitive. | 
| image_definition_idinteger ObrigatórioImage definition ID of custom image | 
Códigos de status de resposta HTTP para "Delete a custom image from the organization"
| Código de status | Descrição | 
|---|---|
| 204 | No Content | 
Exemplos de código para "Delete a custom image from the organization"
Exemplo de solicitação
curl -L \
  -X DELETE \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/hosted-runners/images/custom/IMAGE_DEFINITION_IDResponse
Status: 204List image versions of a custom image for an organization
List image versions of a custom image for an organization.
OAuth tokens and personal access tokens (classic) need the manage_runners:org scope to use this endpoint.
Tokens de acesso refinados para "List image versions of a custom image for an organization"
Esse ponto de extremidade funciona com os seguintes tipos de token refinados:
- Tokens de acesso de usuário do aplicativo GitHub
- Tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Hosted runner custom images" organization permissions (read)
Parâmetros para "List image versions of a custom image for an organization"
| Nome, Tipo, Descrição | 
|---|
| acceptstringSetting to  | 
| Nome, Tipo, Descrição | 
|---|
| image_definition_idinteger ObrigatórioImage definition ID of custom image | 
| orgstring ObrigatórioThe organization name. The name is not case sensitive. | 
Códigos de status de resposta HTTP para "List image versions of a custom image for an organization"
| Código de status | Descrição | 
|---|---|
| 200 | OK | 
Exemplos de código para "List image versions of a custom image for an organization"
Exemplo de solicitação
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/hosted-runners/images/custom/IMAGE_DEFINITION_ID/versionsResponse
Status: 200{
  "total_count": 2,
  "image_versions": [
    {
      "version": "1.1.0",
      "size_gb": 75,
      "state": "Ready",
      "created_on": "2024-11-09T23:39:01Z"
    },
    {
      "version": "1.0.0",
      "size_gb": 75,
      "state": "Ready",
      "created_on": "2024-11-08T20:39:01Z"
    }
  ]
}Get an image version of a custom image for GitHub Actions Hosted Runners
Get an image version of a custom image for GitHub Actions Hosted Runners.
OAuth tokens and personal access tokens (classic) need the manage_runners:org scope to use this endpoint.
Tokens de acesso refinados para "Get an image version of a custom image for GitHub Actions Hosted Runners"
Esse ponto de extremidade funciona com os seguintes tipos de token refinados:
- Tokens de acesso de usuário do aplicativo GitHub
- Tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Hosted runner custom images" organization permissions (read)
Parâmetros para "Get an image version of a custom image for GitHub Actions Hosted Runners"
| Nome, Tipo, Descrição | 
|---|
| acceptstringSetting to  | 
| Nome, Tipo, Descrição | 
|---|
| orgstring ObrigatórioThe organization name. The name is not case sensitive. | 
| image_definition_idinteger ObrigatórioImage definition ID of custom image | 
| versionstring ObrigatórioVersion of a custom image | 
Códigos de status de resposta HTTP para "Get an image version of a custom image for GitHub Actions Hosted Runners"
| Código de status | Descrição | 
|---|---|
| 200 | OK | 
Exemplos de código para "Get an image version of a custom image for GitHub Actions Hosted Runners"
Exemplo de solicitação
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/hosted-runners/images/custom/IMAGE_DEFINITION_ID/versions/VERSIONResponse
Status: 200{
  "version": "1.0.0",
  "size_gb": 75,
  "state": "Ready",
  "created_on": "2024-11-08T20:39:01Z"
}Delete an image version of custom image from the organization
Delete an image version of custom image from the organization.
OAuth tokens and personal access tokens (classic) need the manage_runners:org scope to use this endpoint.
Tokens de acesso refinados para "Delete an image version of custom image from the organization"
Esse ponto de extremidade funciona com os seguintes tipos de token refinados:
- Tokens de acesso de usuário do aplicativo GitHub
- Tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Hosted runner custom images" organization permissions (write)
Parâmetros para "Delete an image version of custom image from the organization"
| Nome, Tipo, Descrição | 
|---|
| acceptstringSetting to  | 
| Nome, Tipo, Descrição | 
|---|
| orgstring ObrigatórioThe organization name. The name is not case sensitive. | 
| image_definition_idinteger ObrigatórioImage definition ID of custom image | 
| versionstring ObrigatórioVersion of a custom image | 
Códigos de status de resposta HTTP para "Delete an image version of custom image from the organization"
| Código de status | Descrição | 
|---|---|
| 204 | No Content | 
Exemplos de código para "Delete an image version of custom image from the organization"
Exemplo de solicitação
curl -L \
  -X DELETE \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/hosted-runners/images/custom/IMAGE_DEFINITION_ID/versions/VERSIONResponse
Status: 204Get GitHub-owned images for GitHub-hosted runners in an organization
Get the list of GitHub-owned images available for GitHub-hosted runners for an organization.
Tokens de acesso refinados para "Get GitHub-owned images for GitHub-hosted runners in an organization"
Esse ponto de extremidade funciona com os seguintes tipos de token refinados:
- Tokens de acesso de usuário do aplicativo GitHub
- Tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Administration" organization permissions (read)
Parâmetros para "Get GitHub-owned images for GitHub-hosted runners in an organization"
| Nome, Tipo, Descrição | 
|---|
| acceptstringSetting to  | 
| Nome, Tipo, Descrição | 
|---|
| orgstring ObrigatórioThe organization name. The name is not case sensitive. | 
Códigos de status de resposta HTTP para "Get GitHub-owned images for GitHub-hosted runners in an organization"
| Código de status | Descrição | 
|---|---|
| 200 | OK | 
Exemplos de código para "Get GitHub-owned images for GitHub-hosted runners in an organization"
Exemplo de solicitação
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/hosted-runners/images/github-ownedResponse
Status: 200{
  "id": "ubuntu-20.04",
  "platform": "linux-x64",
  "size_gb": 86,
  "display_name": "20.04",
  "source": "github"
}Get partner images for GitHub-hosted runners in an organization
Get the list of partner images available for GitHub-hosted runners for an organization.
Tokens de acesso refinados para "Get partner images for GitHub-hosted runners in an organization"
Esse ponto de extremidade funciona com os seguintes tipos de token refinados:
- Tokens de acesso de usuário do aplicativo GitHub
- Tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Administration" organization permissions (read)
Parâmetros para "Get partner images for GitHub-hosted runners in an organization"
| Nome, Tipo, Descrição | 
|---|
| acceptstringSetting to  | 
| Nome, Tipo, Descrição | 
|---|
| orgstring ObrigatórioThe organization name. The name is not case sensitive. | 
Códigos de status de resposta HTTP para "Get partner images for GitHub-hosted runners in an organization"
| Código de status | Descrição | 
|---|---|
| 200 | OK | 
Exemplos de código para "Get partner images for GitHub-hosted runners in an organization"
Exemplo de solicitação
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/hosted-runners/images/partnerResponse
Status: 200{
  "id": "ubuntu-20.04",
  "platform": "linux-x64",
  "size_gb": 86,
  "display_name": "20.04",
  "source": "github"
}Get limits on GitHub-hosted runners for an organization
Get the GitHub-hosted runners limits for an organization.
Tokens de acesso refinados para "Get limits on GitHub-hosted runners for an organization"
Esse ponto de extremidade funciona com os seguintes tipos de token refinados:
- Tokens de acesso de usuário do aplicativo GitHub
- Tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Administration" organization permissions (read)
Parâmetros para "Get limits on GitHub-hosted runners for an organization"
| Nome, Tipo, Descrição | 
|---|
| acceptstringSetting to  | 
| Nome, Tipo, Descrição | 
|---|
| orgstring ObrigatórioThe organization name. The name is not case sensitive. | 
Códigos de status de resposta HTTP para "Get limits on GitHub-hosted runners for an organization"
| Código de status | Descrição | 
|---|---|
| 200 | OK | 
Exemplos de código para "Get limits on GitHub-hosted runners for an organization"
Exemplo de solicitação
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/hosted-runners/limitsResponse
Status: 200{
  "public_ips": {
    "current_usage": 17,
    "maximum": 50
  }
}Get GitHub-hosted runners machine specs for an organization
Get the list of machine specs available for GitHub-hosted runners for an organization.
Tokens de acesso refinados para "Get GitHub-hosted runners machine specs for an organization"
Esse ponto de extremidade funciona com os seguintes tipos de token refinados:
- Tokens de acesso de usuário do aplicativo GitHub
- Tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Administration" organization permissions (read)
Parâmetros para "Get GitHub-hosted runners machine specs for an organization"
| Nome, Tipo, Descrição | 
|---|
| acceptstringSetting to  | 
| Nome, Tipo, Descrição | 
|---|
| orgstring ObrigatórioThe organization name. The name is not case sensitive. | 
Códigos de status de resposta HTTP para "Get GitHub-hosted runners machine specs for an organization"
| Código de status | Descrição | 
|---|---|
| 200 | OK | 
Exemplos de código para "Get GitHub-hosted runners machine specs for an organization"
Exemplo de solicitação
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/hosted-runners/machine-sizesResponse
Status: 200{
  "id": "4-core",
  "cpu_cores": 4,
  "memory_gb": 16,
  "storage_gb": 150
}Get platforms for GitHub-hosted runners in an organization
Get the list of platforms available for GitHub-hosted runners for an organization.
Tokens de acesso refinados para "Get platforms for GitHub-hosted runners in an organization"
Esse ponto de extremidade funciona com os seguintes tipos de token refinados:
- Tokens de acesso de usuário do aplicativo GitHub
- Tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Administration" organization permissions (read)
Parâmetros para "Get platforms for GitHub-hosted runners in an organization"
| Nome, Tipo, Descrição | 
|---|
| acceptstringSetting to  | 
| Nome, Tipo, Descrição | 
|---|
| orgstring ObrigatórioThe organization name. The name is not case sensitive. | 
Códigos de status de resposta HTTP para "Get platforms for GitHub-hosted runners in an organization"
| Código de status | Descrição | 
|---|---|
| 200 | OK | 
Exemplos de código para "Get platforms for GitHub-hosted runners in an organization"
Exemplo de solicitação
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/hosted-runners/platformsResponse
Status: 200{
  "total_count": 1,
  "platforms": [
    "linux-x64",
    "win-x64"
  ]
}Get a GitHub-hosted runner for an organization
Gets a GitHub-hosted runner configured in an organization.
OAuth app tokens and personal access tokens (classic) need the manage_runners:org scope to use this endpoint.
Tokens de acesso refinados para "Get a GitHub-hosted runner for an organization"
Esse ponto de extremidade funciona com os seguintes tipos de token refinados:
- Tokens de acesso de usuário do aplicativo GitHub
- Tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Administration" organization permissions (read)
Parâmetros para "Get a GitHub-hosted runner for an organization"
| Nome, Tipo, Descrição | 
|---|
| acceptstringSetting to  | 
| Nome, Tipo, Descrição | 
|---|
| orgstring ObrigatórioThe organization name. The name is not case sensitive. | 
| hosted_runner_idinteger ObrigatórioUnique identifier of the GitHub-hosted runner. | 
Códigos de status de resposta HTTP para "Get a GitHub-hosted runner for an organization"
| Código de status | Descrição | 
|---|---|
| 200 | OK | 
Exemplos de código para "Get a GitHub-hosted runner for an organization"
Exemplo de solicitação
curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/hosted-runners/HOSTED_RUNNER_IDResponse
Status: 200{
  "id": 5,
  "name": "My hosted ubuntu runner",
  "runner_group_id": 2,
  "platform": "linux-x64",
  "image": {
    "id": "ubuntu-20.04",
    "size": 86
  },
  "machine_size_details": {
    "id": "4-core",
    "cpu_cores": 4,
    "memory_gb": 16,
    "storage_gb": 150
  },
  "status": "Ready",
  "maximum_runners": 10,
  "public_ip_enabled": true,
  "public_ips": [
    {
      "enabled": true,
      "prefix": "20.80.208.150",
      "length": 31
    }
  ],
  "last_active_on": "2022-10-09T23:39:01Z"
}Update a GitHub-hosted runner for an organization
Updates a GitHub-hosted runner for an organization.
OAuth app tokens and personal access tokens (classic) need the manage_runners:org scope to use this endpoint.
Tokens de acesso refinados para "Update a GitHub-hosted runner for an organization"
Esse ponto de extremidade funciona com os seguintes tipos de token refinados:
- Tokens de acesso de usuário do aplicativo GitHub
- Tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Administration" organization permissions (write)
Parâmetros para "Update a GitHub-hosted runner for an organization"
| Nome, Tipo, Descrição | 
|---|
| acceptstringSetting to  | 
| Nome, Tipo, Descrição | 
|---|
| orgstring ObrigatórioThe organization name. The name is not case sensitive. | 
| hosted_runner_idinteger ObrigatórioUnique identifier of the GitHub-hosted runner. | 
| Nome, Tipo, Descrição | 
|---|
| namestringName of the runner. Must be between 1 and 64 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'. | 
| runner_group_idintegerThe existing runner group to add this runner to. | 
| maximum_runnersintegerThe maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost. | 
| enable_static_ipbooleanWhether this runner should be updated with a static public IP. Note limit on account. To list limits on account, use  | 
| image_versionstring or nullThe version of the runner image to deploy. This is relevant only for runners using custom images. | 
Códigos de status de resposta HTTP para "Update a GitHub-hosted runner for an organization"
| Código de status | Descrição | 
|---|---|
| 200 | OK | 
Exemplos de código para "Update a GitHub-hosted runner for an organization"
Exemplo de solicitação
curl -L \
  -X PATCH \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/hosted-runners/HOSTED_RUNNER_ID \
  -d '{"name":"My larger runner","runner_group_id":1,"maximum_runners":50,"enable_static_ip":false}'Response
Status: 200{
  "id": 5,
  "name": "My hosted ubuntu runner",
  "runner_group_id": 2,
  "platform": "linux-x64",
  "image": {
    "id": "ubuntu-20.04",
    "size": 86
  },
  "machine_size_details": {
    "id": "4-core",
    "cpu_cores": 4,
    "memory_gb": 16,
    "storage_gb": 150
  },
  "status": "Ready",
  "maximum_runners": 10,
  "public_ip_enabled": true,
  "public_ips": [
    {
      "enabled": true,
      "prefix": "20.80.208.150",
      "length": 31
    }
  ],
  "last_active_on": "2022-10-09T23:39:01Z"
}Delete a GitHub-hosted runner for an organization
Deletes a GitHub-hosted runner for an organization.
Tokens de acesso refinados para "Delete a GitHub-hosted runner for an organization"
Esse ponto de extremidade funciona com os seguintes tipos de token refinados:
- Tokens de acesso de usuário do aplicativo GitHub
- Tokens de acesso à instalação do aplicativo GitHub
- Tokens de acesso pessoal refinados
O token refinado deve ter os seguintes conjuntos de permissões:
- "Administration" organization permissions (write)
Parâmetros para "Delete a GitHub-hosted runner for an organization"
| Nome, Tipo, Descrição | 
|---|
| acceptstringSetting to  | 
| Nome, Tipo, Descrição | 
|---|
| orgstring ObrigatórioThe organization name. The name is not case sensitive. | 
| hosted_runner_idinteger ObrigatórioUnique identifier of the GitHub-hosted runner. | 
Códigos de status de resposta HTTP para "Delete a GitHub-hosted runner for an organization"
| Código de status | Descrição | 
|---|---|
| 202 | Accepted | 
Exemplos de código para "Delete a GitHub-hosted runner for an organization"
Exemplo de solicitação
curl -L \
  -X DELETE \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/actions/hosted-runners/HOSTED_RUNNER_IDResponse
Status: 202{
  "id": 5,
  "name": "My hosted ubuntu runner",
  "runner_group_id": 2,
  "platform": "linux-x64",
  "image": {
    "id": "ubuntu-20.04",
    "size": 86
  },
  "machine_size_details": {
    "id": "4-core",
    "cpu_cores": 4,
    "memory_gb": 16,
    "storage_gb": 150
  },
  "status": "Ready",
  "maximum_runners": 10,
  "public_ip_enabled": true,
  "public_ips": [
    {
      "enabled": true,
      "prefix": "20.80.208.150",
      "length": 31
    }
  ],
  "last_active_on": "2022-10-09T23:39:01Z"
}