Sample - GitHub REST API
GET/repos/{owner}/{repo}/actions/runners/{runner_id}/labels

List labels for a self-hosted runner for a repository

Lists all labels for a self-hosted runner configured in a repository.

Authenticated users must have admin access to the repository to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

3 parameters
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
runner_idintegerrequired
Unique identifier of the self-hosted runner.

2 status codes
200Response
total_countintegerrequired
labelsarray<SelfHostedRunnerLabel>required
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 404 is returned: Resource not found.