Set repositories allowed to use self-hosted runners in an organization
PUT
/orgs/{org}/actions/permissions/self-hosted-runners/repositories
Sets repositories that are allowed to use self-hosted runners in an organization.
OAuth app tokens and personal access tokens (classic) need the admin:org scope or the “Actions policies” fine-grained permission to use this endpoint.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org
required
string
The organization name. The name is not case sensitive.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
selected_repository_ids
required
IDs of repositories that can use repository-level self-hosted runners
Array<integer>
Examples
Exampleapplication/json
{ "selected_repository_ids": [ 1, 2, 3 ]}Responses
Section titled “Responses”No content
Forbidden
Media typeapplication/json
Basic Error
Basic Error
object
message
string
documentation_url
string
url
string
status
string
Examplegenerated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Media typeapplication/json
Basic Error
Basic Error
object
message
string
documentation_url
string
url
string
status
string
Examplegenerated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Validation failed, or the endpoint has been spammed.
Media typeapplication/json
Validation Error
Validation Error
object
message
required
string
documentation_url
required
string
errors
Array<object>
object
resource
string
field
string
message
string
code
required
string
index
integer
value
One of:
string
integer
Array<string>
Examplegenerated
{ "message": "example", "documentation_url": "example", "errors": [ { "resource": "example", "field": "example", "message": "example", "code": "example", "index": 1, "value": [ "example" ] } ]}