Missing `environment` in DBT Cloud API responses

When calling certain API endpoints, such as /jobs/{job_id}/run/ or /runs/{run_id}, the environment key in the response always seems null.

This then requires us to send a separate request to /environments/{environment_id} to retrieve the environment name in every run of all our workflows.

If the environment were present in the API responses, an another API call wouldn’t be necessary.

image

Is this intentional, or something that could be fixed?

Found the answer to this in the legacy API documentation: we have to use the include_related parameter, like this: include_related=["job","environment","run_steps","trigger",...]. Unfortunately, this parameter is not documented in the new API documentation. :frowning:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.