Skip to main content

self_hosted_runners

Overview

Nameself_hosted_runners
TypeResource
Idgithub.enterprise_admin.self_hosted_runners

Fields

NameDatatypeDescription
idintegerThe id of the runner.
namestringThe name of the runner.
labelsarray
osstringThe Operating System of the runner.
statusstringThe status of the runner.
busyboolean

Methods

NameAccessible byRequired ParamsDescription
get_self_hosted_runner_for_enterpriseSELECTenterprise, runner_idGets a specific self-hosted runner configured in an enterprise.

You must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
list_self_hosted_runners_for_enterpriseSELECTenterpriseLists all self-hosted runners configured for an enterprise.

You must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
list_self_hosted_runners_in_group_for_enterpriseSELECTenterprise, runner_group_idLists the self-hosted runners that are in a specific enterprise group.

You must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
add_self_hosted_runner_to_group_for_enterpriseINSERTenterprise, runner_group_id, runner_idAdds a self-hosted runner to a runner group configured in an enterprise.

You must authenticate using an access token with the manage_runners:enterprise
scope to use this endpoint.
delete_self_hosted_runner_from_enterpriseDELETEenterprise, runner_idForces 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 manage_runners:enterprise scope to use this endpoint.
remove_self_hosted_runner_from_group_for_enterpriseDELETEenterprise, runner_group_id, runner_idRemoves a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group.

You must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.
create_registration_token_for_enterpriseEXECenterpriseReturns 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 manage_runners: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.

<br />./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN<br />
create_remove_token_for_enterpriseEXECenterpriseReturns 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 manage_runners: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.

<br />./config.sh remove --token TOKEN<br />
set_self_hosted_runners_in_group_for_enterpriseEXECenterprise, runner_group_id, data__runnersReplaces the list of self-hosted runners that are part of an enterprise runner group.

You must authenticate using an access token with the manage_runners:enterprise scope to use this endpoint.