Problem
The server now requires every query to be database-scoped via the X-Database-Id header (400 BAD_REQUEST: "X-Database-Id header is required: every query must be scoped to a database").
QueryApi.query() exposes a typed x_database_id parameter, but SavedQueriesApi.execute_saved_query() does not — even though it also executes SQL and is subject to the same requirement.
Current workaround
Callers must drop down to the _headers override:
saved_queries_api.execute_saved_query(id, _headers={"X-Database-Id": database_id})
(see tests/integration/test_saved_query_versioning.py, added in #92).
Root cause / fix
The execute_saved_query endpoint in the OpenAPI spec (hotdata-dev/www.hotdata.dev:api/openapi.yaml) doesn't declare the X-Database-Id header parameter. Add it to the spec, then regenerate the client so the param is typed like query(). Once that lands, the _headers workaround in the integration test can be replaced with the typed argument.
Problem
The server now requires every query to be database-scoped via the
X-Database-Idheader (400 BAD_REQUEST: "X-Database-Id header is required: every query must be scoped to a database").QueryApi.query()exposes a typedx_database_idparameter, butSavedQueriesApi.execute_saved_query()does not — even though it also executes SQL and is subject to the same requirement.Current workaround
Callers must drop down to the
_headersoverride:(see
tests/integration/test_saved_query_versioning.py, added in #92).Root cause / fix
The
execute_saved_queryendpoint in the OpenAPI spec (hotdata-dev/www.hotdata.dev:api/openapi.yaml) doesn't declare theX-Database-Idheader parameter. Add it to the spec, then regenerate the client so the param is typed likequery(). Once that lands, the_headersworkaround in the integration test can be replaced with the typed argument.