Sample - GitHub REST API
POST/orgs/{org}/actions/runners/generate-jitconfig

Create configuration for a just-in-time runner for an organization

Generates a configuration that can be passed to the runner application at startup.

The authenticated user must have admin access to the organization.

OAuth tokens and personal access tokens (classic) need theadmin:org scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.

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

1 parameter · 4 body fields
orgstringrequired
The organization name. The name is not case sensitive.
namestringrequired
The name of the new runner.
runner_group_idintegerrequired
The ID of the runner group to register the runner to.
labelsarray<string>required
The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100.
work_folderstringoptional
The working directory to be used for job execution, relative to the runner install directory.
Default:_work

4 status codes
201Response
runnerobjectrequired
A self hosted runner
encoded_jit_configstringrequired
The base64 encoded runner configuration.
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
409Conflict
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<string>optional

Error handling

A 404 is returned: Resource not found. A 409 is returned: Conflict. A 422 is returned: Validation failed, or the endpoint has been spammed.