Set custom labels for a self-hosted runner for an organization
Remove all previous custom labels and set the new custom labels for a specific self-hosted runner configured in an organization.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. If the repository is private, the repo scope is also required.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The organization name. The name is not case sensitive.
Unique identifier of the self-hosted runner.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels.
Examples
{ "labels": [ "gpu", "accelerated" ]}Responses
Section titled “Responses”Response
object
A label for a self hosted runner
object
Unique identifier of the label.
Name of the label.
The type of label. Read-only labels are applied automatically when the runner is configured.
Examples
{ "total_count": 4, "labels": [ { "id": 5, "name": "self-hosted", "type": "read-only" }, { "id": 7, "name": "X64", "type": "read-only" }, { "id": 20, "name": "macOS", "type": "read-only" }, { "id": 21, "name": "no-gpu", "type": "custom" } ]}Resource not found
Basic Error
object
Examplegenerated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Validation failed, or the endpoint has been spammed.
Validation Error Simple
object
Examplegenerated
{ "message": "example", "documentation_url": "example", "errors": [ "example" ]}