Sample - GitHub REST API
POST/repos/{owner}/{repo}/actions/runners/generate-jitconfig

Create configuration for a just-in-time runner for a repository

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

The authenticated user must have admin access to the repository.

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

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

2 parameters · 4 body fields
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.
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.