Get the details of a specific instance-level variable

GET /admin/ci/variables/{key}

Get the details of a specific instance-level variable

Path parameters

  • key string Required

    The key of a variable

Responses

  • 200 application/json

    Get the details of a specific instance-level variable

    Hide response attributes Show response attributes object
    • variable_type string
    • key string
    • value string
    • protected boolean
    • masked boolean
    • raw boolean
    • environment_scope string
  • 404

    Instance Variable Not Found

GET /admin/ci/variables/{key}
curl \
 --request GET 'https://www.gitlab.com/api/v4/admin/ci/variables/{key}' \
 --header "Private-Token: $API_KEY"
Response examples (200)
{
  "variable_type": "env_var",
  "key": "TEST_VARIABLE_1",
  "value": "TEST_1",
  "protected": true,
  "masked": true,
  "raw": true,
  "environment_scope": "*"
}