# Gets all of the custom query definitions in the system. This method will scan all custom query definitions and and return them to the caller. Endpoint: GET /customQueryDefinitions/{tenantId} Version: v1-2025-04-18 Security: knox-authorizer ## Path parameters: - `tenantId` (string, required) The id of the tenant being accessed. ## Query parameters: - `fields` (string) The fields that you want to retrieve; if omitted, the entire object is returned. - `exclusiveStartKey` (string) The start key, if you're making a subsequent request ## Response 200 fields (application/json): - `application` (string, required) - `custom_field_values` (array) - `custom_field_values.boolean_value` (boolean) The boolean value - `custom_field_values.custom_field_id` (string) The unique identifier of the custom field - `custom_field_values.file_url_value` (string) The pointer to a file value - `custom_field_values.list_value` (array) The list value - `custom_field_values.numeric_value` (number) The numeric value - `custom_field_values.string_value` (string) The string value of the custom field - `custom_field_values.table_value` (array) A list of objects (a table) - `definition` (object, required) The query definition - `definition.common_table_expressions` (array) - `definition.common_table_expressions.alias` (string, required) - `definition.common_table_expressions.sql` (string, required) - `definition.context` (object) - `definition.context.display_name` (string) - `definition.context.field` (string, required) - `definition.context.help_text` (string) - `definition.context.required` (boolean) - `definition.context.service` (string, required) - `definition.default_output_fields` (array, required) - `definition.default_output_fields.applies_when_context` (string) Enum: "both", "is given", "is not given" - `definition.default_output_fields.label` (string) - `definition.default_output_fields.name` (string, required) - `definition.default_sort_fields` (array, required) - `definition.default_sort_fields.descending` (boolean) - `definition.description` (string) - `definition.fields` (array) - `definition.fields.acceptable_values` (array) - `definition.fields.acceptable_values.hide_from_portal` (boolean) - `definition.fields.acceptable_values.value` (string, required) - `definition.fields.custom_sql` (string) - `definition.fields.database_column` (string) - `definition.fields.group_name` (string, required) - `definition.fields.reference_service` (string) - `definition.fields.service` (string) When set, values can be pulled from this service - `definition.fields.table_alias` (string, required) - `definition.fields.type` (string, required) - `definition.id` (string) - `definition.perform_custom_resolution_logic` (boolean) If set, the microservice must post process the query before it is completely resolves - `definition.primary_table` (string, required) - `definition.services` (array) - `definition.services.hints` (object) - `definition.services.id_column` (string) - `definition.services.join_fragment` (string) The fragment of sql to create on join - `definition.services.table` (string) The table in the service; if omitted, the assumption is that its the service with dashes converted to underscores - `id` (string, required) The unique, string identifier of this custom query definition - `is_active` (boolean) Whether or not this custom query definition is active - `name` (string, required) The name of the custom query definition - `sys_bulk_load_at` (string) If this record was loaded via bulk, the timestamp when the record was processed - `sys_bulk_load_id` (string) If this record was loaded via bulk, the ID of the bulk load process - `sys_bulk_load_pk` (string) If this record was loaded via bulk, the tenant and key of the bulk load process used as a partition key - `sys_bulk_load_record_no` (number) If this record was loaded via bulk, the record number in the source file - `sys_bulk_load_source_file` (string) If this record was loaded via bulk, the source file - `sys_calculated_field_error` (string) The error associated with the calculated field - `sys_calculated_field_errors` (array) - `sys_calculated_field_errors.error` (string) - `sys_configuration_snapshot_id` (string) If a snapshot was restored/applies to this record, the ID of the snapshot - `sys_created_at` (string, required) The date/time that this record was created, expressed in ISO-8601 date format - `sys_created_by_id` (string, required) The ID of the user that created this record - `sys_deleted_by_id` (string) The ID of the user that deleted (or last tried to delete) this object - `sys_directive` (string) Means for passing directive information into an object processing logic - `sys_external_id` (string) The ID that a record has from an external system or data import - `sys_has_files_in_s3` (boolean) If true, this record has files in S3. If false, it doesnt, so no need to hit S3 upon deletion - `sys_last_bulk_data_operation_id` (string) If this record was last touched by a bulk data operation, the ID of that operation - `sys_last_bulk_data_operation_sys_version` (string) If this record was last touched by a bulk data operation, the sys_version at the time of that operation - `sys_last_modified_at` (string, required) The date/time that this record record was last modified, expressed in ISO-8601 date format - `sys_last_modified_by_id` (string, required) The ID of the user that last modified this record - `sys_last_security_context` (object) The security context of the last insert, modify, or delete performed on this item - `sys_locked` (boolean) If set, this record is locked and cannot be changed via the API - `sys_snapshot_base_version` (number) The version to use as a base when creating a configuration snapshot; if not set, 1 is used. Helpful when creating a sandbox - `sys_version` (number) A number representing the version of this record in the database ## Response 400 fields ## Response 401 fields ## Response 403 fields ## Response 404 fields ## Response 429 fields ## Response 500 fields