Get an environment variable
Gets a specific variable in an environment.
Authenticated users must have collaborator access to a repository to create, update, or read variables.
OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The account owner of the repository. The name is not case sensitive.
The name of the repository without the .git extension. The name is not case sensitive.
The name of the environment. The name must be URL encoded. For example, any slashes in the name must be replaced with %2F.
The name of the variable.
Responses
Section titled “ Responses ”Response
object
The name of the variable.
The value of the variable.
The date and time at which the variable was created, in ISO 8601 format’:’ YYYY-MM-DDTHH:MM:SSZ.
The date and time at which the variable was last updated, in ISO 8601 format’:’ YYYY-MM-DDTHH:MM:SSZ.
Examples
{ "name": "USERNAME", "value": "octocat", "created_at": "2021-08-10T14:59:22Z", "updated_at": "2022-01-10T14:59:22Z"}