Endpoints for Agents secrets and variables.
30 endpoints tagged agents, each listing its
parameters and possible responses. Search or scroll the index below to
jump to a specific endpoint.
No endpoints match your search.
GET /orgs/{org}/agents/secrets
Lists all secrets available in an organization without revealing their
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/agents/secrets/public-key
Gets your public key, which you need to encrypt secrets. You need to
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/agents/secrets/{secret_name}
Gets a single organization secret without revealing its encrypted value.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /orgs/{org}/agents/secrets/{secret_name}
Creates or updates an organization secret with an encrypted value. Encrypt your secret using
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response when creating a secret | yes |
| 204 | Response when updating a secret | no |
DELETE /orgs/{org}/agents/secrets/{secret_name}
Deletes a secret in an organization using the secret name.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/agents/secrets/{secret_name}/repositories
Lists all repositories that have been selected when the visibility
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /orgs/{org}/agents/secrets/{secret_name}/repositories
Replaces all repositories for an organization secret when the visibility
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
PUT /orgs/{org}/agents/secrets/{secret_name}/repositories/{repository_id}
Adds a repository to an organization secret when the visibility for
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
repository_id | path | yes |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | No Content when repository was added to the selected list | no |
| 409 | Conflict when visibility type is not set to selected | no |
DELETE /orgs/{org}/agents/secrets/{secret_name}/repositories/{repository_id}
Removes a repository from an organization secret when the visibility
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
repository_id | path | yes |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response when repository was removed from the selected list | no |
| 409 | Conflict when visibility type not set to selected | no |
GET /orgs/{org}/agents/variables
Lists all agent variables available in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 30). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
POST /orgs/{org}/agents/variables
Creates an organization agent variable that you can reference in a GitHub Actions workflow.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response when creating a variable | yes |
GET /orgs/{org}/agents/variables/{name}
Gets a specific agent variable in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
name | path | yes | The name of the variable. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PATCH /orgs/{org}/agents/variables/{name}
Updates an organization agent variable that you can reference in a GitHub Actions workflow.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
name | path | yes | The name of the variable. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
DELETE /orgs/{org}/agents/variables/{name}
Deletes an organization agent variable using the variable name.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
name | path | yes | The name of the variable. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/agents/variables/{name}/repositories
Lists all repositories that can access an organization agent variable
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
name | path | yes | The name of the variable. |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 409 | Response when the visibility of the variable is not set to selected | no |
PUT /orgs/{org}/agents/variables/{name}/repositories
Replaces all repositories for an organization agent variable that is available
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
name | path | yes | The name of the variable. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 409 | Response when the visibility of the variable is not set to selected | no |
PUT /orgs/{org}/agents/variables/{name}/repositories/{repository_id}
Adds a repository to an organization agent variable that is available to selected repositories.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
name | path | yes | The name of the variable. |
repository_id | path | yes |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 409 | Response when the visibility of the variable is not set to selected | no |
DELETE /orgs/{org}/agents/variables/{name}/repositories/{repository_id}
Removes a repository from an organization agent variable that is
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
name | path | yes | The name of the variable. |
repository_id | path | yes |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 409 | Response when the visibility of the variable is not set to selected | no |
GET /repos/{owner}/{repo}/agents/organization-secrets
Lists all organization secrets shared with a repository without revealing their encrypted
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/agents/organization-variables
Lists all organization variables shared with a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 30). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/agents/secrets
Lists all secrets available in a repository without revealing their encrypted
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/agents/secrets/public-key
Gets your public key, which you need to encrypt secrets. You need to
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /repos/{owner}/{repo}/agents/secrets/{secret_name}
Gets a single repository secret without revealing its encrypted value.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /repos/{owner}/{repo}/agents/secrets/{secret_name}
Creates or updates a repository secret with an encrypted value. Encrypt your secret using
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response when creating a secret | yes |
| 204 | Response when updating a secret | no |
DELETE /repos/{owner}/{repo}/agents/secrets/{secret_name}
Deletes a secret in a repository using the secret name.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
secret_name | path | yes | The name of the secret. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /repos/{owner}/{repo}/agents/variables
Lists all repository variables.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 30). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
POST /repos/{owner}/{repo}/agents/variables
Creates a repository variable that you can reference in a GitHub Actions workflow.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
GET /repos/{owner}/{repo}/agents/variables/{name}
Gets a specific variable in a repository.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
name | path | yes | The name of the variable. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PATCH /repos/{owner}/{repo}/agents/variables/{name}
Updates a repository variable that you can reference in a GitHub Actions workflow.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
name | path | yes | The name of the variable. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
DELETE /repos/{owner}/{repo}/agents/variables/{name}
Deletes a repository variable using the variable name.
| Name | In | Required | Description |
|---|---|---|---|
owner | path | yes | The account owner of the repository. The name is not case sensitive. |
repo | path | yes | The name of the repository without the .git extension. The name is not case sensitive. |
name | path | yes | The name of the variable. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |