Symmetry between executing a query by ID or by ad hoc definition

Just an observation on consistency/symmetry between the endpoints for executing pre-defined queries by ID vs ad hoc queries.


Executing a query (whether ad hoc or by ID) involves providing a few parameters in the request body. Currently, it seems asymmetrical in that sql_generation_mode is provided as part of the outer request when executing pre-defined queries by ID, but part of the query definition when executing an ad hoc query.

ExecuteQueryByIdRequest has the following properties:

  • query ID (required), ux_mode, formatting_mode, sql_generation_mode

ExecuteQueryRequest has similar properties, but sql_generation_mode is nested in the query definition:

  • query definition (required), ux_mode, formatting_mode


Might be worth thinking about whether that property is really part of the request to execute the ad hoc query (and could vary for request to request), or whether it's more about the actual query definition itself.


So you might hoist sql_generation_mode to the outer request body, so that from an API caller's perspective, the only difference between the two endpoints is you're either supplying a query ID or a query definition.

  • Ben Lambert
  • Mar 24 2024
  • Attach files