Get a variable by ID
variable_id*integerThe ID of the variable.
1 <= valueAccept*stringapplication/json
Content-Type*stringapplication/json
Ok
application/json- response
id*integerThe ID of the given variable
key*stringThe unique key used to identify the variable on the target, or the filesystem path for configuration files and symlinks
type*VariableTypeThe type of the key/value pair
"file""symlink""variable"description*|A text describing the variable, provided by the end user
value*|The value to be assigned to this variable when deployed to its target. For configuration files this is the file content; for symlinks this is the symlink target path
target*VariableTargetThe target defining how the variable key/value pair will be deployed
"my-cnf""newrelic-infra-yml""nginx-http-server""nginx-http""nginx-main""os-env-var""php-cli_php-ini""php-fpm_php-fpm-conf""php-fpm_php-ini""php-fpm_pool-d-www-conf""redis-conf""resource-config-file""resource-symlink""supervisord-conf""sysctl-conf"target_human_readable*stringHuman readable version of target
resource_id*|The ID of the resource this variable is linked to
resource_type*stringThe name of the resource this variable is linked to
hidden*booleanIndicates if the variable value should be visible or not in the deployment logs
created_by_user?|nullcreated_at*stringThe date and time when the record was created
updated_at*stringThe date and time when the record was last updated
curl -X GET 'https://api.devopness.com/variables/123' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <your_api_token>' \ -H 'Content-Type: application/json'{ "id": 93023, "key": "APP_URL", "type": "file", "description": "Sample variable description", "value": "https://staging.devopness.com", "target": "resource-config-file", "target_human_readable": "Resource Configuration File", "resource_id": 3426, "resource_type": "application", "hidden": false, "created_by_user": { "id": 1, "name": "string", "email": "user@example.com", "url_slug": "someone", "language": "en", "active": true, "created_at": "2019-09-25T15:50:48.000000Z", "updated_at": "2019-09-25T13:52:04.000000Z" }, "created_at": "2022-09-26T15:30:31.000000Z", "updated_at": "2022-09-26T15:30:58.000000Z"}