Search + K

Command Palette

Search for a command to run...

Sign In

Add custom labels to a self-hosted runner for an organization

POST /orgs/{org}/actions/runners/{runner_id}/labels
Copy endpoint
https://api.github.com

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

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

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

Parameters

path Path Parameters

Name Type
org required

The organization name. 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[];
}