# Gets the definition for a specific type of query including the available fields Gets the definition for a specific type of query including the available fields Endpoint: GET /queries/{tenantId}/public/description/{queryType} Version: v1-2025-04-18 ## Path parameters: - `tenantId` (string, required) Parameters to the query - `queryType` (string, required) The type of query ## Query parameters: - `contextId` (string) Optional query type ## Response 200 fields (application/json): - `common_table_expressions` (array) - `common_table_expressions.alias` (string, required) - `common_table_expressions.materialized` (boolean) - `common_table_expressions.sql` (string, required) - `context` (object) - `context.display_name` (string) - `context.field` (string, required) - `context.help_text` (string) - `context.required` (boolean) - `context.service` (string, required) - `default_output_fields` (array, required) - `default_output_fields.applies_when_context` (string) Enum: "both", "is given", "is not given" - `default_output_fields.label` (string) - `default_output_fields.name` (string, required) - `default_sort_fields` (array, required) - `default_sort_fields.descending` (boolean) - `description` (string) - `fields` (array) - `fields.acceptable_values` (array) - `fields.acceptable_values.hide_from_portal` (boolean) - `fields.acceptable_values.value` (string, required) - `fields.custom_sql` (string) - `fields.database_column` (string) - `fields.group_name` (string, required) - `fields.path` (string) - `fields.reference_service` (string) - `fields.service` (string) When set, values can be pulled from this service - `fields.table_alias` (string, required) - `fields.type` (string, required) - `id` (string) - `perform_custom_resolution_logic` (boolean) If set, the microservice must post process the query before it is completely resolves - `primary_table` (string, required) - `services` (array) - `services.hints` (object) - `services.id_column` (string) - `services.join_fragment` (string) The fragment of sql to create on join - `services.table` (string) The table in the service; if omitted, the assumption is that its the service with dashes converted to underscores ## Response 400 fields ## Response 401 fields ## Response 403 fields ## Response 404 fields ## Response 409 fields ## Response 429 fields ## Response 500 fields