Get a repository variable
GET
/repos/{owner}/{repo}/agents/variables/{name}
Gets a specific variable in a repository.
The authenticated user must have collaborator access to the repository to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” owner
required
string
The account owner of the repository. The name is not case sensitive.
repo
required
string
The name of the repository without the .git extension. The name is not case sensitive.
name
required
string
The name of the variable.
Responses
Section titled “ Responses ”Response
Media type application/json
Actions Variable
object
name
required
The name of the variable.
string
value
required
The value of the variable.
string
created_at
required
The date and time at which the variable was created, in ISO 8601 format’:’ YYYY-MM-DDTHH:MM:SSZ.
string format: date-time
updated_at
required
The date and time at which the variable was last updated, in ISO 8601 format’:’ YYYY-MM-DDTHH:MM:SSZ.
string format: date-time
Examples
Example default
{ "name": "USERNAME", "value": "octocat", "created_at": "2021-08-10T14:59:22Z", "updated_at": "2022-01-10T14:59:22Z"}