ci_variables
Retrieve a single variable
Retrieves details of a specified variable. If there are multiple variables with the same key, use filter to select the correct environment_scope.
get/api/v4/projects/{id}/variables/{key}
Request
- Base URLhttps://gitlab.com
- Authnone declared
Path parameters
idstring required
The ID of a project or URL-encoded NAMESPACE/PROJECT_NAME of the project owned by the authenticated user
keystring required
The key of a variable
Query parameters
filter[environment_scope]string
The environment scope of a variable
Response
Retrieve a single variable
Example response
{
"variable_type": "env_var",
"key": "TEST_VARIABLE_1",
"value": "TEST_1",
"environment_scope": "*",
"description": "This variable is being used for ..."
}Changes
No recorded changes to this operation across all 5 revisions of this API.