GitHub v3 REST API

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
http://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
http://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
http://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

Get an artifact

Gets a specific artifact for a workflow run. 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
http://HOSTNAME/api/v3/repos/{owner}/{repo}/actions/artifacts/{artifact_id}

Path Parameters

ownerstringrequired
repostringrequired
artifact_idintegerrequired

artifact_id parameter

Response

200 application/json

Response

Artifact

An artifact

idintegerrequired

Example:5

node_idstringrequired

Example:MDEwOkNoZWNrU3VpdGU1

namestringrequired

The name of the artifact.

Example:AdventureWorks.Framework

size_in_bytesintegerrequired

The size in bytes of the artifact.

Example:12345

urlstringrequired

Example:https://api.github.com/repos/github/hello-world/actions/artifacts/5

archive_download_urlstringrequired

Example:https://api.github.com/repos/github/hello-world/actions/artifacts/5/zip

expiredbooleanrequired

Whether or not the artifact has expired.

created_atstring | null(date-time)required
expires_atstring | null(date-time)required
updated_atstring | null(date-time)required
get/repos/{owner}/{repo}/actions/artifacts/{artifact_id}
 
200 application/json

Delete an artifact

Deletes an artifact for a workflow run. You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the actions:write permission to use this endpoint.

delete
http://HOSTNAME/api/v3/repos/{owner}/{repo}/actions/artifacts/{artifact_id}

Path Parameters

ownerstringrequired
repostringrequired
artifact_idintegerrequired

artifact_id parameter

Response

204

Response

delete/repos/{owner}/{repo}/actions/artifacts/{artifact_id}
 
204