GitHub v3 REST API

Delete workflow run logs

Deletes all logs 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/runs/{run_id}/logs

Path Parameters

ownerstringrequired
repostringrequired
run_idintegerrequired

The id of the workflow run.

Response

Response

delete/repos/{owner}/{repo}/actions/runs/{run_id}/logs
 

Re-run a workflow

DEPRECATED

Re-runs your workflow run using its id. 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.

post
http://HOSTNAME/api/v3/repos/{owner}/{repo}/actions/runs/{run_id}/rerun

Path Parameters

ownerstringrequired
repostringrequired
run_idintegerrequired

The id of the workflow run.

Response

201 application/json

Response

object
* Additional properties are NOT allowed.
post/repos/{owner}/{repo}/actions/runs/{run_id}/rerun
 
201 application/json

List repository secrets

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

get
http://HOSTNAME/api/v3/repos/{owner}/{repo}/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

ownerstringrequired
repostringrequired

Response

200 application/json

Response

total_countintegerrequired
secretsarray[object]required

Set secrets for GitHub Actions.

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

Get a repository 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. 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 secrets repository permission to use this endpoint.

get
http://HOSTNAME/api/v3/repos/{owner}/{repo}/actions/secrets/public-key

Path Parameters

ownerstringrequired
repostringrequired

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/repos/{owner}/{repo}/actions/secrets/public-key
 
200 application/json

Get a repository secret

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

get
http://HOSTNAME/api/v3/repos/{owner}/{repo}/actions/secrets/{secret_name}

Path Parameters

ownerstringrequired
repostringrequired
secret_namestringrequired

secret_name parameter

Response

200 application/json

Response

Actions Secret

Set secrets for GitHub Actions.

namestringrequired

The name of the secret.

Example:SECRET_TOKEN

created_atstring(date-time)required
updated_atstring(date-time)required
get/repos/{owner}/{repo}/actions/secrets/{secret_name}
 
200 application/json