Search + K

Command Palette

Search for a command to run...

Sign In

Add custom labels to a self-hosted runner for a repository

POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels
Copy endpoint
https://api.github.com

Adds custom labels to a self-hosted runner configured in a repository.

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

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

Parameters

path Path Parameters

Name Type
owner required

The account owner of the repository. The name is not case sensitive.

string
repo required

The name of the repository without the .git extension. The name is not case sensitive.

string
runner_id required

Unique identifier of the self-hosted runner.

number

Request Body

application/json required
{ labels: string[]; }

Responses

200 application/json

Response

{ total_count: number;labels: RunnerLabel

A label for a self hosted runner

interface RunnerLabel {
id?: number;
name: string;
type?: "read-only" | "custom";
}
[]
; }

Client Errors

404 application/json

Resource not found

interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
422 application/json

Validation failed, or the endpoint has been spammed.

interface ValidationErrorSimple {
message: string;
documentation_url: string;
errors?: string[];
}