GitHub v3 REST API

Get a self-hosted runner for an organization

Gets a specific self-hosted runner configured in an organization.

You must authenticate using an access token with the admin:org scope to use this endpoint.

get
http://HOSTNAME/api/v3/orgs/{org}/actions/runners/{runner_id}

Path Parameters

orgstringrequired
runner_idintegerrequired

Unique identifier of the self-hosted runner.

Response

200 application/json

Response

Self hosted runners

A self hosted runner

idintegerrequired

The id of the runner.

Example:5

namestringrequired

The name of the runner.

Example:iMac

osstringrequired

The Operating System of the runner.

Example:macos

statusstringrequired

The status of the runner.

Example:online

busybooleanrequired
labelsarray[object]required

A label for a self hosted runner

Show Child Parameters
get/orgs/{org}/actions/runners/{runner_id}
 
200 application/json

Delete a self-hosted runner from an organization

Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.

You must authenticate using an access token with the admin:org scope to use this endpoint.

delete
http://HOSTNAME/api/v3/orgs/{org}/actions/runners/{runner_id}

Path Parameters

orgstringrequired
runner_idintegerrequired

Unique identifier of the self-hosted runner.

Response

204

Response

delete/orgs/{org}/actions/runners/{runner_id}
 
204

List organization secrets

Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the secrets organization permission to use this endpoint.

get
http://HOSTNAME/api/v3/orgs/{org}/actions/secrets

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

orgstringrequired

Response

200 application/json

Response

total_countintegerrequired
secretsarray[object]required

Secrets for GitHub Actions for an organization.

Show Child Parameters
get/orgs/{org}/actions/secrets
 
200 application/json

Get an organization public key

Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the secrets organization permission to use this endpoint.

get
http://HOSTNAME/api/v3/orgs/{org}/actions/secrets/public-key

Path Parameters

orgstringrequired

Response

200 application/json

Response

ActionsPublicKey

The public key used for setting Actions Secrets.

key_idstringrequired

The identifier for the key.

Example:1234567

keystringrequired

The Base64 encoded public key.

Example:hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs=

idinteger

Example:2

urlstring

Example:https://api.github.com/user/keys/2

titlestring

Example:ssh-rsa AAAAB3NzaC1yc2EAAA

created_atstring

Example:2011-01-26T19:01:12Z

get/orgs/{org}/actions/secrets/public-key
 
200 application/json

Get an organization secret

Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the admin:org scope to use this endpoint. GitHub Apps must have the secrets organization permission to use this endpoint.

get
http://HOSTNAME/api/v3/orgs/{org}/actions/secrets/{secret_name}

Path Parameters

orgstringrequired
secret_namestringrequired

secret_name parameter

Response

200 application/json

Response

Actions Secret for an Organization

Secrets for GitHub Actions for an organization.

namestringrequired

The name of the secret.

Example:SECRET_TOKEN

created_atstring(date-time)required
updated_atstring(date-time)required
visibilitystringrequired

Visibility of a secret

Allowed values:allprivateselected

selected_repositories_urlstring(uri)

Example:https://api.github.com/organizations/org/secrets/my_secret/repositories

get/orgs/{org}/actions/secrets/{secret_name}
 
200 application/json