Retrieve Environment Variables for a given Job
GET {{base_url}}/api/v3/accounts/{{account_id}}/projects/{{project_id}}/environment-variables/job/?job_definition_id={{job_id}}
This request returns:
{
"status": {
"code": 200,
"is_success": true,
"user_message": "Success!",
"developer_message": ""
},
"data": {
"environments": [
"Deployment",
"Development",
"Deployment 1.3"
],
"variables": {
"DBT_SOME_VAR": {
"project": {
"id": 12345,
"value": "foo"
},
"Deployment": {
"id": 12346,
"value": "bar"
},
"Development": {
"id": 12347,
"value": "baz"
}
}
}
}
}
Where environments
is a list of all environments in the project and variables
is a dictionary of environment variables and what they are set to for each environment. Each environment variable key-value pair will have an associated id
({{ environment_variable_value_id }}
) which can be used with the Update Environment Variables
endpoint.
In the example above, there is 1 environment variable DBT_SOME_VAR
in the project.
That environment variable's value is set to foo
on the project level and has an id of 12345
.
That environment variable's value is set to bar
for the environment named Deployment
and has an id of 12346
.
That environment variable's value is set to baz
for the environment named Development
and has an id of 12347
.
That environment variable's value is unset for the environment named Deployment 1.3
.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
job_definition_id | string |
RESPONSES
status: OK
{"status":{"code":200,"is_success":true,"user_message":"Success!","developer_message":""},"data":{"DBT_ENV_TEST34248466":{"project":{"id":30,"value":"project default value"},"environment":{"id":32,"value":"Deploy value"},"job":{"id":94,"value":"job_override value"}}}}