GitHub v3 REST API

List selected repositories for an organization secret

Lists all repositories that have been selected when the visibility for repository access to a secret is set to selected. 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
{protocol}://{hostname}/api/v3/orgs/{org}/actions/secrets/{secret_name}/repositories

Query Parameters

pageinteger

Page number of the results to fetch.

Default:1

per_pageinteger

Results per page (max 100)

Default:30

Path Parameters

orgstringrequired
secret_namestringrequired

secret_name parameter

Response

200 application/json

Response

total_countintegerrequired
repositoriesarray[object]required

Minimal Repository

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

Set selected repositories for an organization secret

Replaces all repositories for an organization secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret. 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.

put
{protocol}://{hostname}/api/v3/orgs/{org}/actions/secrets/{secret_name}/repositories

Path Parameters

orgstringrequired
secret_namestringrequired

secret_name parameter

Body

application/json
selected_repository_idsarray[integer]required

An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the visibility is set to selected. You can add and remove individual repositories using the Set selected repositories for an organization secret and Remove selected repository from an organization secret endpoints.

Response

204

Response

put/orgs/{org}/actions/secrets/{secret_name}/repositories

Body

{ "selected_repository_ids": [ 64780797 ] }
 
204

Add selected repository to an organization secret

Adds a repository to an organization secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret. 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.

put
{protocol}://{hostname}/api/v3/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}

Path Parameters

orgstringrequired
secret_namestringrequired

secret_name parameter

repository_idintegerrequired

Response

No Content when repository was added to the selected list

put/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}
 

Remove selected repository from an organization secret

Removes a repository from an organization secret when the visibility for repository access is set to selected. The visibility is set when you Create or update an organization secret. 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.

delete
{protocol}://{hostname}/api/v3/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}

Path Parameters

orgstringrequired
secret_namestringrequired

secret_name parameter

repository_idintegerrequired

Response

Response when repository was removed from the selected list

delete/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}
 

List artifacts for a repository

Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.

get
{protocol}://{hostname}/api/v3/repos/{owner}/{repo}/actions/artifacts

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

ownerstringrequired
repostringrequired

Response

200 application/json

Response

total_countintegerrequired
artifactsarray[object]required

An artifact

Show Child Parameters
get/repos/{owner}/{repo}/actions/artifacts
 
200 application/json