Problem
Most GET and list commands are missing the include_related query parameter that the dbt Cloud API supports. This parameter allows callers to embed related objects directly in the response, reducing the number of API calls needed.
Affected commands and valid values
| Command |
Valid include_related values |
account list (v3) |
— |
account get (v2) |
— |
project list |
repository, connection, group_permissions, docs_job, freshness_job |
project get |
same as list |
environment list |
project, connection, credentials, repository |
environment get |
same as list |
job list |
environment, custom_environment_variables, most_recent_run, most_recent_completed_run |
job get |
same as list (tracked separately in #119) |
run list |
trigger, job, audit, debug_logs |
connection get |
— |
Fix
Add include_related: Optional[str] to each of the above commands and pass it as a query param in execute().
Note: run get already has include_related (as List[str], formatted as a JSON array). The format for other endpoints may differ — confirm against spec before implementing.
Problem
Most GET and list commands are missing the
include_relatedquery parameter that the dbt Cloud API supports. This parameter allows callers to embed related objects directly in the response, reducing the number of API calls needed.Affected commands and valid values
include_relatedvaluesaccount list(v3)account get(v2)project listrepository,connection,group_permissions,docs_job,freshness_jobproject getenvironment listproject,connection,credentials,repositoryenvironment getjob listenvironment,custom_environment_variables,most_recent_run,most_recent_completed_runjob getrun listtrigger,job,audit,debug_logsconnection getFix
Add
include_related: Optional[str]to each of the above commands and pass it as a query param inexecute().Note:
run getalready hasinclude_related(asList[str], formatted as a JSON array). The format for other endpoints may differ — confirm against spec before implementing.