openapi: 3.0.3 info: title: Baserow API spec Admin Database table grid view API version: 2.2.2 description: 'For more information about our REST API, please visit [this page](https://baserow.io/docs/apis%2Frest-api). For more information about our deprecation policy, please visit [this page](https://baserow.io/docs/apis%2Fdeprecations).' contact: url: https://baserow.io/contact license: name: MIT url: https://github.com/baserow/baserow/blob/develop/LICENSE tags: - name: Database table grid view paths: /api/database/views/grid/{slug}/public/aggregations/: get: operationId: get_database_table_public_grid_view_field_aggregations description: Returns all field aggregations values previously defined for this grid view. If filters exist for this view, the aggregations are computed only on filtered rows. parameters: - in: query name: filter__{field}__{filter} schema: type: string description: "The aggregation can optionally be filtered by the same view filters available for the views. Multiple filters can be provided if they follow the same format. The field and filter variable indicate how to filter and the value indicates where to filter on.\n\nFor example if you provide the following GET parameter `filter__field_1__equal=test` then only rows where the value of field_1 is equal to test are going to be returned.\n\nThe following filters are available: equal, not_equal, filename_contains, files_lower_than, has_file_type, contains, contains_not, contains_word, doesnt_contain_word, length_is_lower_than, higher_than, higher_than_or_equal, lower_than, lower_than_or_equal, is_even_and_whole, date_equal, date_before, date_before_or_equal, date_after_days_ago, date_after, date_after_or_equal, date_not_equal, date_equals_today, date_before_today, date_after_today, date_within_days, date_within_weeks, date_within_months, date_equals_days_ago, date_equals_months_ago, date_equals_years_ago, date_equals_week, date_equals_month, date_equals_day_of_month, date_equals_year, date_is, date_is_not, date_is_before, date_is_on_or_before, date_is_after, date_is_on_or_after, date_is_within, single_select_equal, single_select_not_equal, single_select_is_any_of, single_select_is_none_of, link_row_has, link_row_has_not, link_row_contains, link_row_not_contains, boolean, empty, not_empty, multiple_select_has, multiple_select_has_not, multiple_collaborators_has, multiple_collaborators_has_not, user_is, user_is_not, has_value_equal, has_not_value_equal, has_value_contains, has_not_value_contains, has_value_contains_word, has_not_value_contains_word, has_value_length_is_lower_than, has_all_values_equal, has_empty_value, has_not_empty_value, has_any_select_option_equal, has_none_select_option_equal, has_value_lower, has_value_lower_or_equal, has_value_higher, has_value_higher_or_equal, has_not_value_higher_or_equal, has_not_value_higher, has_not_value_lower_or_equal, has_not_value_lower, has_date_equal, has_not_date_equal, has_date_before, has_not_date_before, has_date_on_or_before, has_not_date_on_or_before, has_date_on_or_after, has_not_date_on_or_after, has_date_after, has_not_date_after, has_date_within, has_not_date_within.\n\n**Please note that if the `filters` parameter is provided, this parameter will be ignored.** \n\n" - in: query name: filter_type schema: type: string description: '`AND`: Indicates that the aggregated rows must match all the provided filters. `OR`: Indicates that the aggregated rows only have to match one of the filters. ' - in: query name: filters schema: type: string description: "A JSON serialized string containing the filter tree to apply for the aggregation. The filter tree is a nested structure containing the filters that need to be applied. \n\nAn example of a valid filter tree is the following:`{\"filter_type\": \"AND\", \"filters\": [{\"field\": 1, \"type\": \"equal\", \"value\": \"test\"}]}`. The `field` value must be the ID of the field to filter on, or the name of the field if `user_field_names` is true.\n\nThe following filters are available: equal, not_equal, filename_contains, files_lower_than, has_file_type, contains, contains_not, contains_word, doesnt_contain_word, length_is_lower_than, higher_than, higher_than_or_equal, lower_than, lower_than_or_equal, is_even_and_whole, date_equal, date_before, date_before_or_equal, date_after_days_ago, date_after, date_after_or_equal, date_not_equal, date_equals_today, date_before_today, date_after_today, date_within_days, date_within_weeks, date_within_months, date_equals_days_ago, date_equals_months_ago, date_equals_years_ago, date_equals_week, date_equals_month, date_equals_day_of_month, date_equals_year, date_is, date_is_not, date_is_before, date_is_on_or_before, date_is_after, date_is_on_or_after, date_is_within, single_select_equal, single_select_not_equal, single_select_is_any_of, single_select_is_none_of, link_row_has, link_row_has_not, link_row_contains, link_row_not_contains, boolean, empty, not_empty, multiple_select_has, multiple_select_has_not, multiple_collaborators_has, multiple_collaborators_has_not, user_is, user_is_not, has_value_equal, has_not_value_equal, has_value_contains, has_not_value_contains, has_value_contains_word, has_not_value_contains_word, has_value_length_is_lower_than, has_all_values_equal, has_empty_value, has_not_empty_value, has_any_select_option_equal, has_none_select_option_equal, has_value_lower, has_value_lower_or_equal, has_value_higher, has_value_higher_or_equal, has_not_value_higher_or_equal, has_not_value_higher, has_not_value_lower_or_equal, has_not_value_lower, has_date_equal, has_not_date_equal, has_date_before, has_not_date_before, has_date_on_or_before, has_not_date_on_or_before, has_date_on_or_after, has_not_date_on_or_after, has_date_after, has_not_date_after, has_date_within, has_not_date_within.\n\n**Please note that if this parameter is provided, all other `filter__{field}__{filter}` will be ignored, as well as the `filter_type` parameter.**" - in: query name: include schema: type: string description: if `include` is set to `total`, the total row count will be returned with the result. - in: query name: search schema: type: string description: If provided the aggregations are calculated only for matching rows. - in: query name: search_mode schema: type: string description: If provided, allows API consumers to determine what kind of search experience they wish to have. If the default `SearchMode.FT_WITH_COUNT` is used, then Postgres full-text search is used. If `SearchMode.COMPAT` is provided then the search term will be exactly searched for including whitespace on each cell. This is the Baserow legacy search behaviour. - in: path name: slug schema: type: string description: Select the view you want the aggregations for. required: true tags: - Database table grid view security: - UserSource JWT: [] - JWT: [] - {} responses: '200': content: application/json: schema: type: object properties: field_{id}: anyOf: - type: number description: The aggregation result for the field with id {id}. example: 5 - type: string description: The aggregation result for the field with id {id}. - type: array items: {} description: The aggregation result for the field with id {id}. - type: object description: The aggregation result for the field with id {id}. total: type: integer description: The total value count. Only returned if `include=total` is specified as GET parameter. example: 7 description: '' '400': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_FILTER_FIELD_NOT_FOUND - ERROR_VIEW_FILTER_TYPE_DOES_NOT_EXIST - ERROR_VIEW_FILTER_TYPE_UNSUPPORTED_FIELD - ERROR_FILTERS_PARAM_VALIDATION_ERROR detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' '401': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_NO_AUTHORIZATION_TO_PUBLICLY_SHARED_VIEW detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' '404': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_GRID_DOES_NOT_EXIST detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' /api/database/views/grid/{slug}/public/rows/: get: operationId: public_list_database_table_grid_view_rows description: 'Lists the requested rows of the view''s table related to the provided `slug` if the grid view is public.The response is paginated either by a limit/offset or page/size style. The style depends on the provided GET parameters. The properties of the returned rows depends on which fields the table has. For a complete overview of fields use the **list_database_table_fields** endpoint to list them all. In the example all field types are listed, but normally the number in field_{id} key is going to be the id of the field. The value is what the user has provided and the format of it depends on the fields type. ' parameters: - in: query name: count schema: type: boolean description: If provided only the count will be returned. - in: query name: exclude_count schema: type: boolean description: If provided, the count, previous, and next properties will be excluded from the response. This is useful for large datasets where counting the total number of results is slow. - in: query name: exclude_fields schema: type: string description: 'All the fields are included in the response by default. You can select a subset of fields by providing the exclude_fields query parameter. If you for example provide the following GET parameter `exclude_fields=field_1,field_2` then the fields with id `1` and id `2` are going to be excluded from the selection and response. ' - in: query name: filter__{field}__{filter} schema: type: string description: "The rows can optionally be filtered by the same view filters available for the views. Multiple filters can be provided if they follow the same format. The field and filter variable indicate how to filter and the value indicates where to filter on.\n\nFor example if you provide the following GET parameter `filter__field_1__equal=test` then only rows where the value of field_1 is equal to test are going to be returned.\n\nThe following filters are available: equal, not_equal, filename_contains, files_lower_than, has_file_type, contains, contains_not, contains_word, doesnt_contain_word, length_is_lower_than, higher_than, higher_than_or_equal, lower_than, lower_than_or_equal, is_even_and_whole, date_equal, date_before, date_before_or_equal, date_after_days_ago, date_after, date_after_or_equal, date_not_equal, date_equals_today, date_before_today, date_after_today, date_within_days, date_within_weeks, date_within_months, date_equals_days_ago, date_equals_months_ago, date_equals_years_ago, date_equals_week, date_equals_month, date_equals_day_of_month, date_equals_year, date_is, date_is_not, date_is_before, date_is_on_or_before, date_is_after, date_is_on_or_after, date_is_within, single_select_equal, single_select_not_equal, single_select_is_any_of, single_select_is_none_of, link_row_has, link_row_has_not, link_row_contains, link_row_not_contains, boolean, empty, not_empty, multiple_select_has, multiple_select_has_not, multiple_collaborators_has, multiple_collaborators_has_not, user_is, user_is_not, has_value_equal, has_not_value_equal, has_value_contains, has_not_value_contains, has_value_contains_word, has_not_value_contains_word, has_value_length_is_lower_than, has_all_values_equal, has_empty_value, has_not_empty_value, has_any_select_option_equal, has_none_select_option_equal, has_value_lower, has_value_lower_or_equal, has_value_higher, has_value_higher_or_equal, has_not_value_higher_or_equal, has_not_value_higher, has_not_value_lower_or_equal, has_not_value_lower, has_date_equal, has_not_date_equal, has_date_before, has_not_date_before, has_date_on_or_before, has_not_date_on_or_before, has_date_on_or_after, has_not_date_on_or_after, has_date_after, has_not_date_after, has_date_within, has_not_date_within.\n\n**Please note that if the `filters` parameter is provided, this parameter will be ignored.** \n\n" - in: query name: filter_type schema: type: string description: '`AND`: Indicates that the rows must match all the provided filters. `OR`: Indicates that the rows only have to match one of the filters. This works only if two or more filters are provided. **Please note that if the `filters` parameter is provided, this parameter will be ignored.**' - in: query name: filters schema: type: string description: "A JSON serialized string containing the filter tree to apply to this view. The filter tree is a nested structure containing the filters that need to be applied. \n\nAn example of a valid filter tree is the following:`{\"filter_type\": \"AND\", \"filters\": [{\"field\": 1, \"type\": \"equal\", \"value\": \"test\"}]}`. The `field` value must be the ID of the field to filter on, or the name of the field if `user_field_names` is true.\n\nThe following filters are available: equal, not_equal, filename_contains, files_lower_than, has_file_type, contains, contains_not, contains_word, doesnt_contain_word, length_is_lower_than, higher_than, higher_than_or_equal, lower_than, lower_than_or_equal, is_even_and_whole, date_equal, date_before, date_before_or_equal, date_after_days_ago, date_after, date_after_or_equal, date_not_equal, date_equals_today, date_before_today, date_after_today, date_within_days, date_within_weeks, date_within_months, date_equals_days_ago, date_equals_months_ago, date_equals_years_ago, date_equals_week, date_equals_month, date_equals_day_of_month, date_equals_year, date_is, date_is_not, date_is_before, date_is_on_or_before, date_is_after, date_is_on_or_after, date_is_within, single_select_equal, single_select_not_equal, single_select_is_any_of, single_select_is_none_of, link_row_has, link_row_has_not, link_row_contains, link_row_not_contains, boolean, empty, not_empty, multiple_select_has, multiple_select_has_not, multiple_collaborators_has, multiple_collaborators_has_not, user_is, user_is_not, has_value_equal, has_not_value_equal, has_value_contains, has_not_value_contains, has_value_contains_word, has_not_value_contains_word, has_value_length_is_lower_than, has_all_values_equal, has_empty_value, has_not_empty_value, has_any_select_option_equal, has_none_select_option_equal, has_value_lower, has_value_lower_or_equal, has_value_higher, has_value_higher_or_equal, has_not_value_higher_or_equal, has_not_value_higher, has_not_value_lower_or_equal, has_not_value_lower, has_date_equal, has_not_date_equal, has_date_before, has_not_date_before, has_date_on_or_before, has_not_date_on_or_before, has_date_on_or_after, has_not_date_on_or_after, has_date_after, has_not_date_after, has_date_within, has_not_date_within.\n\n**Please note that if this parameter is provided, all other `filter__{field}__{filter}` will be ignored, as well as the `filter_type` parameter.**" - in: query name: group_by schema: type: string description: Optionally the rows can be grouped by provided field ids separated by comma. By default no groups are applied. This doesn't actually responds with the rows groups, this is just what's needed for the Baserow group by feature. - in: query name: include schema: type: string description: A comma separated list allowing the values of `field_options` which will add the object/objects with the same name to the response if included. The `field_options` object contains user defined view settings for each field. For example the field's width is included in here. - in: query name: include_fields schema: type: string description: All the fields are included in the response by default. You can select a subset of fields by providing the fields query parameter. If you for example provide the following GET parameter `include_fields=field_1,field_2` then only the fields with id `1` and id `2` are going to be selected and included in the response. - in: query name: limit schema: type: integer description: Defines how many rows should be returned. - in: query name: limit_linked_items schema: type: integer description: if provided, the maximum number of relationships per link row field in the response. If not provided, all the relationships will be returned. - in: query name: offset schema: type: integer description: Can only be used in combination with the `limit` parameter and defines from which offset the rows should be returned. - in: query name: order_by schema: type: string description: Optionally the rows can be ordered by provided field ids separated by comma. By default a field is ordered in ascending (A-Z) order, but by prepending the field with a '-' it can be ordered descending (Z-A). - in: query name: page schema: type: integer description: Defines which page of rows should be returned. Either the `page` or `limit` can be provided, not both. - in: query name: search schema: type: string description: If provided only rows with data that matches the search query are going to be returned. - in: query name: search_mode schema: type: string description: If provided, allows API consumers to determine what kind of search experience they wish to have. If the default `SearchMode.FT_WITH_COUNT` is used, then Postgres full-text search is used. If `SearchMode.COMPAT` is provided then the search term will be exactly searched for including whitespace on each cell. This is the Baserow legacy search behaviour. - in: query name: size schema: type: integer description: Can only be used in combination with the `page` parameter and defines how many rows should be returned. - in: path name: slug schema: type: string description: Returns only rows that belong to the related view. required: true tags: - Database table grid view security: - UserSource JWT: [] - JWT: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse' description: '' '400': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_USER_NOT_IN_GROUP - ERROR_ORDER_BY_FIELD_NOT_FOUND - ERROR_ORDER_BY_FIELD_NOT_POSSIBLE - ERROR_FILTER_FIELD_NOT_FOUND - ERROR_VIEW_FILTER_TYPE_DOES_NOT_EXIST - ERROR_VIEW_FILTER_TYPE_UNSUPPORTED_FIELD - ERROR_FILTERS_PARAM_VALIDATION_ERROR detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' '401': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_NO_AUTHORIZATION_TO_PUBLICLY_SHARED_VIEW detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' '404': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_GRID_DOES_NOT_EXIST - ERROR_FIELD_DOES_NOT_EXIST detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' /api/database/views/grid/{view_id}/: get: operationId: list_database_table_grid_view_rows description: 'Lists the requested rows of the view''s table related to the provided `view_id` if the authorized user has access to the database''s workspace. The response is paginated either by a limit/offset or page/size style. The style depends on the provided GET parameters. The properties of the returned rows depends on which fields the table has. For a complete overview of fields use the **list_database_table_fields** endpoint to list them all. In the example all field types are listed, but normally the number in field_{id} key is going to be the id of the field. The value is what the user has provided and the format of it depends on the fields type. The filters and sortings are automatically applied. To get a full overview of the applied filters and sortings you can use the `list_database_table_view_filters` and `list_database_table_view_sortings` endpoints.' parameters: - in: query name: count schema: type: boolean description: If provided only the count will be returned. - in: query name: exclude_count schema: type: boolean description: If provided, the count, previous, and next properties will be excluded from the response. This is useful for large datasets where counting the total number of results is slow. - in: query name: exclude_fields schema: type: string description: 'All the fields are included in the response by default. You can select a subset of fields by providing the exclude_fields query parameter. If you for example provide the following GET parameter `exclude_fields=field_1,field_2` then the fields with id `1` and id `2` are going to be excluded from the selection and response. ' - in: query name: filter__{field}__{filter} schema: type: string description: "The rows can optionally be filtered by the same view filters available for the views. Multiple filters can be provided if they follow the same format. The field and filter variable indicate how to filter and the value indicates where to filter on.\n\nFor example if you provide the following GET parameter `filter__field_1__equal=test` then only rows where the value of field_1 is equal to test are going to be returned.\n\nThe following filters are available: equal, not_equal, filename_contains, files_lower_than, has_file_type, contains, contains_not, contains_word, doesnt_contain_word, length_is_lower_than, higher_than, higher_than_or_equal, lower_than, lower_than_or_equal, is_even_and_whole, date_equal, date_before, date_before_or_equal, date_after_days_ago, date_after, date_after_or_equal, date_not_equal, date_equals_today, date_before_today, date_after_today, date_within_days, date_within_weeks, date_within_months, date_equals_days_ago, date_equals_months_ago, date_equals_years_ago, date_equals_week, date_equals_month, date_equals_day_of_month, date_equals_year, date_is, date_is_not, date_is_before, date_is_on_or_before, date_is_after, date_is_on_or_after, date_is_within, single_select_equal, single_select_not_equal, single_select_is_any_of, single_select_is_none_of, link_row_has, link_row_has_not, link_row_contains, link_row_not_contains, boolean, empty, not_empty, multiple_select_has, multiple_select_has_not, multiple_collaborators_has, multiple_collaborators_has_not, user_is, user_is_not, has_value_equal, has_not_value_equal, has_value_contains, has_not_value_contains, has_value_contains_word, has_not_value_contains_word, has_value_length_is_lower_than, has_all_values_equal, has_empty_value, has_not_empty_value, has_any_select_option_equal, has_none_select_option_equal, has_value_lower, has_value_lower_or_equal, has_value_higher, has_value_higher_or_equal, has_not_value_higher_or_equal, has_not_value_higher, has_not_value_lower_or_equal, has_not_value_lower, has_date_equal, has_not_date_equal, has_date_before, has_not_date_before, has_date_on_or_before, has_not_date_on_or_before, has_date_on_or_after, has_not_date_on_or_after, has_date_after, has_not_date_after, has_date_within, has_not_date_within.\n\n**Please note that if the `filters` parameter is provided, this parameter will be ignored.** \n\n\n\n**Please note that by passing the filter parameters the view filters saved for the view itself will be ignored.**" - in: query name: filter_type schema: type: string description: '`AND`: Indicates that the rows must match all the provided filters. `OR`: Indicates that the rows only have to match one of the filters. This works only if two or more filters are provided. **Please note that if the `filters` parameter is provided, this parameter will be ignored.**' - in: query name: filters schema: type: string description: "A JSON serialized string containing the filter tree to apply to this view. The filter tree is a nested structure containing the filters that need to be applied. \n\nAn example of a valid filter tree is the following:`{\"filter_type\": \"AND\", \"filters\": [{\"field\": 1, \"type\": \"equal\", \"value\": \"test\"}]}`. The `field` value must be the ID of the field to filter on, or the name of the field if `user_field_names` is true.\n\nThe following filters are available: equal, not_equal, filename_contains, files_lower_than, has_file_type, contains, contains_not, contains_word, doesnt_contain_word, length_is_lower_than, higher_than, higher_than_or_equal, lower_than, lower_than_or_equal, is_even_and_whole, date_equal, date_before, date_before_or_equal, date_after_days_ago, date_after, date_after_or_equal, date_not_equal, date_equals_today, date_before_today, date_after_today, date_within_days, date_within_weeks, date_within_months, date_equals_days_ago, date_equals_months_ago, date_equals_years_ago, date_equals_week, date_equals_month, date_equals_day_of_month, date_equals_year, date_is, date_is_not, date_is_before, date_is_on_or_before, date_is_after, date_is_on_or_after, date_is_within, single_select_equal, single_select_not_equal, single_select_is_any_of, single_select_is_none_of, link_row_has, link_row_has_not, link_row_contains, link_row_not_contains, boolean, empty, not_empty, multiple_select_has, multiple_select_has_not, multiple_collaborators_has, multiple_collaborators_has_not, user_is, user_is_not, has_value_equal, has_not_value_equal, has_value_contains, has_not_value_contains, has_value_contains_word, has_not_value_contains_word, has_value_length_is_lower_than, has_all_values_equal, has_empty_value, has_not_empty_value, has_any_select_option_equal, has_none_select_option_equal, has_value_lower, has_value_lower_or_equal, has_value_higher, has_value_higher_or_equal, has_not_value_higher_or_equal, has_not_value_higher, has_not_value_lower_or_equal, has_not_value_lower, has_date_equal, has_not_date_equal, has_date_before, has_not_date_before, has_date_on_or_before, has_not_date_on_or_before, has_date_on_or_after, has_not_date_on_or_after, has_date_after, has_not_date_after, has_date_within, has_not_date_within.\n\n**Please note that if this parameter is provided, all other `filter__{field}__{filter}` will be ignored, as well as the `filter_type` parameter.**\n\n**Please note that by passing the filters parameter the view filters saved for the view itself will be ignored.**" - in: query name: include schema: type: string description: A comma separated list allowing the values of `field_options` and `row_metadata` which will add the object/objects with the same name to the response if included. The `field_options` object contains user defined view settings for each field. For example the field's width is included in here. The `row_metadata` object includes extra row specific data on a per row basis. - in: query name: include_fields schema: type: string description: All the fields are included in the response by default. You can select a subset of fields by providing the fields query parameter. If you for example provide the following GET parameter `include_fields=field_1,field_2` then only the fields with id `1` and id `2` are going to be selected and included in the response. - in: query name: limit schema: type: integer description: Defines how many rows should be returned. - in: query name: limit_linked_items schema: type: integer description: if provided, the maximum number of relationships per link row field in the response. If not provided, all the relationships will be returned. - in: query name: offset schema: type: integer description: Can only be used in combination with the `limit` parameter and defines from which offset the rows should be returned. - in: query name: order_by schema: type: string description: Optionally the rows can be ordered by provided field ids separated by comma. By default a field is ordered in ascending (A-Z) order, but by prepending the field with a '-' it can be ordered descending (Z-A). - in: query name: page schema: type: integer description: Defines which page of rows should be returned. Either the `page` or `limit` can be provided, not both. - in: query name: search schema: type: string description: If provided only rows with data that matches the search query are going to be returned. - in: query name: search_mode schema: type: string description: If provided, allows API consumers to determine what kind of search experience they wish to have. If the default `SearchMode.FT_WITH_COUNT` is used, then Postgres full-text search is used. If `SearchMode.COMPAT` is provided then the search term will be exactly searched for including whitespace on each cell. This is the Baserow legacy search behaviour. - in: query name: size schema: type: integer description: Can only be used in combination with the `page` parameter and defines how many rows should be returned. - in: path name: view_id schema: type: integer description: Returns only rows that belong to the related view's table. required: true tags: - Database table grid view security: - UserSource JWT: [] - JWT: [] - {} responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginationSerializerWithGridViewFieldOptionsExampleRowResponse' description: '' '400': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_USER_NOT_IN_GROUP - ERROR_ORDER_BY_FIELD_NOT_FOUND - ERROR_ORDER_BY_FIELD_NOT_POSSIBLE - ERROR_FILTER_FIELD_NOT_FOUND - ERROR_VIEW_FILTER_TYPE_DOES_NOT_EXIST - ERROR_VIEW_FILTER_TYPE_UNSUPPORTED_FIELD - ERROR_FILTERS_PARAM_VALIDATION_ERROR detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' '404': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_GRID_DOES_NOT_EXIST - ERROR_FIELD_DOES_NOT_EXIST detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' post: operationId: filter_database_table_grid_view_rows description: Lists only the rows and fields that match the request. Only the rows with the ids that are in the `row_ids` list are going to be returned. Same goes for the fields, only the fields with the ids in the `field_ids` are going to be returned. This endpoint could be used to refresh data after changes something. For example in the web frontend after changing a field type, the data of the related cells will be refreshed using this endpoint. In the example all field types are listed, but normally the number in field_{id} key is going to be the id of the field. The value is what the user has provided and the format of it depends on the fields type. parameters: - in: path name: view_id schema: type: integer description: Returns only rows that belong to the related view's table. required: true tags: - Database table grid view requestBody: content: application/json: schema: $ref: '#/components/schemas/GridViewFilter' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/GridViewFilter' multipart/form-data: schema: $ref: '#/components/schemas/GridViewFilter' required: true security: - UserSource JWT: [] - JWT: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/ExampleRowResponse' description: '' '400': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_USER_NOT_IN_GROUP - ERROR_REQUEST_BODY_VALIDATION detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' '404': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_GRID_DOES_NOT_EXIST detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' /api/database/views/grid/{view_id}/aggregation/{field_id}/: get: operationId: get_database_table_grid_view_field_aggregation description: Computes the aggregation of all the values for a specified field from the selected grid view. You must select the aggregation type by setting the `type` GET parameter. If filters are configured for the selected view, the aggregation is calculated only on filtered rows. You need to have read permissions on the view to request an aggregation. parameters: - in: path name: field_id schema: type: integer description: The field id you want to aggregate required: true - in: query name: include schema: type: string description: if `include` is set to `total`, the total row count will be returned with the result. - in: query name: type schema: type: string description: 'The aggregation type you want. Available aggregation types: count, empty_count, not_empty_count, unique_count, min, max, sum, average, median, decile, variance, std_dev, distribution' - in: path name: view_id schema: type: integer description: Select the view you want the aggregation for. required: true tags: - Database table grid view security: - UserSource JWT: [] - JWT: [] - {} responses: '200': content: application/json: schema: type: object properties: value: anyOf: - type: number description: The aggregation result for the specified field. example: 5 - type: string description: The aggregation result for the specified field. - type: array items: {} description: The aggregation result for the specified field. - type: object description: The aggregation result for the specified field. total: type: integer description: The total value count. Only returned if `include=total` is specified as GET parameter. example: 7 required: - value description: '' '400': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_USER_NOT_IN_GROUP - ERROR_AGGREGATION_TYPE_DOES_NOT_EXIST - ERROR_FIELD_NOT_IN_TABLE detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' '404': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_FIELD_DOES_NOT_EXIST - ERROR_GRID_DOES_NOT_EXIST detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' /api/database/views/grid/{view_id}/aggregations/: get: operationId: get_database_table_grid_view_field_aggregations description: Returns all field aggregations values previously defined for this grid view. If filters exist for this view, the aggregations are computed only on filtered rows.You need to have read permissions on the view to request aggregations. parameters: - in: query name: filter__{field}__{filter} schema: type: string description: "The aggregation can optionally be filtered by the same view filters available for the views. Multiple filters can be provided if they follow the same format. The field and filter variable indicate how to filter and the value indicates where to filter on.\n\nFor example if you provide the following GET parameter `filter__field_1__equal=test` then only rows where the value of field_1 is equal to test are going to be returned.\n\nThe following filters are available: equal, not_equal, filename_contains, files_lower_than, has_file_type, contains, contains_not, contains_word, doesnt_contain_word, length_is_lower_than, higher_than, higher_than_or_equal, lower_than, lower_than_or_equal, is_even_and_whole, date_equal, date_before, date_before_or_equal, date_after_days_ago, date_after, date_after_or_equal, date_not_equal, date_equals_today, date_before_today, date_after_today, date_within_days, date_within_weeks, date_within_months, date_equals_days_ago, date_equals_months_ago, date_equals_years_ago, date_equals_week, date_equals_month, date_equals_day_of_month, date_equals_year, date_is, date_is_not, date_is_before, date_is_on_or_before, date_is_after, date_is_on_or_after, date_is_within, single_select_equal, single_select_not_equal, single_select_is_any_of, single_select_is_none_of, link_row_has, link_row_has_not, link_row_contains, link_row_not_contains, boolean, empty, not_empty, multiple_select_has, multiple_select_has_not, multiple_collaborators_has, multiple_collaborators_has_not, user_is, user_is_not, has_value_equal, has_not_value_equal, has_value_contains, has_not_value_contains, has_value_contains_word, has_not_value_contains_word, has_value_length_is_lower_than, has_all_values_equal, has_empty_value, has_not_empty_value, has_any_select_option_equal, has_none_select_option_equal, has_value_lower, has_value_lower_or_equal, has_value_higher, has_value_higher_or_equal, has_not_value_higher_or_equal, has_not_value_higher, has_not_value_lower_or_equal, has_not_value_lower, has_date_equal, has_not_date_equal, has_date_before, has_not_date_before, has_date_on_or_before, has_not_date_on_or_before, has_date_on_or_after, has_not_date_on_or_after, has_date_after, has_not_date_after, has_date_within, has_not_date_within.\n\n**Please note that if the `filters` parameter is provided, this parameter will be ignored.** \n\n\n\n**Please note that by passing the filter parameters the view filters saved for the view itself will be ignored.**" - in: query name: filter_type schema: type: string description: '`AND`: Indicates that the aggregated rows must match all the provided filters. `OR`: Indicates that the aggregated rows only have to match one of the filters. ' - in: query name: filters schema: type: string description: "A JSON serialized string containing the filter tree to apply for the aggregation. The filter tree is a nested structure containing the filters that need to be applied. \n\nAn example of a valid filter tree is the following:`{\"filter_type\": \"AND\", \"filters\": [{\"field\": 1, \"type\": \"equal\", \"value\": \"test\"}]}`. The `field` value must be the ID of the field to filter on, or the name of the field if `user_field_names` is true.\n\nThe following filters are available: equal, not_equal, filename_contains, files_lower_than, has_file_type, contains, contains_not, contains_word, doesnt_contain_word, length_is_lower_than, higher_than, higher_than_or_equal, lower_than, lower_than_or_equal, is_even_and_whole, date_equal, date_before, date_before_or_equal, date_after_days_ago, date_after, date_after_or_equal, date_not_equal, date_equals_today, date_before_today, date_after_today, date_within_days, date_within_weeks, date_within_months, date_equals_days_ago, date_equals_months_ago, date_equals_years_ago, date_equals_week, date_equals_month, date_equals_day_of_month, date_equals_year, date_is, date_is_not, date_is_before, date_is_on_or_before, date_is_after, date_is_on_or_after, date_is_within, single_select_equal, single_select_not_equal, single_select_is_any_of, single_select_is_none_of, link_row_has, link_row_has_not, link_row_contains, link_row_not_contains, boolean, empty, not_empty, multiple_select_has, multiple_select_has_not, multiple_collaborators_has, multiple_collaborators_has_not, user_is, user_is_not, has_value_equal, has_not_value_equal, has_value_contains, has_not_value_contains, has_value_contains_word, has_not_value_contains_word, has_value_length_is_lower_than, has_all_values_equal, has_empty_value, has_not_empty_value, has_any_select_option_equal, has_none_select_option_equal, has_value_lower, has_value_lower_or_equal, has_value_higher, has_value_higher_or_equal, has_not_value_higher_or_equal, has_not_value_higher, has_not_value_lower_or_equal, has_not_value_lower, has_date_equal, has_not_date_equal, has_date_before, has_not_date_before, has_date_on_or_before, has_not_date_on_or_before, has_date_on_or_after, has_not_date_on_or_after, has_date_after, has_not_date_after, has_date_within, has_not_date_within.\n\n**Please note that if this parameter is provided, all other `filter__{field}__{filter}` will be ignored, as well as the `filter_type` parameter.**\n\n**Please note that by passing the filters parameter the view filters saved for the view itself will be ignored.**" - in: query name: include schema: type: string description: if `include` is set to `total`, the total row count will be returned with the result. - in: query name: search schema: type: string description: If provided the aggregations are calculated only for matching rows. - in: query name: search_mode schema: type: string description: If provided, allows API consumers to determine what kind of search experience they wish to have. If the default `SearchMode.FT_WITH_COUNT` is used, then Postgres full-text search is used. If `SearchMode.COMPAT` is provided then the search term will be exactly searched for including whitespace on each cell. This is the Baserow legacy search behaviour. - in: path name: view_id schema: type: integer description: Select the view you want the aggregations for. required: true tags: - Database table grid view security: - UserSource JWT: [] - JWT: [] - {} responses: '200': content: application/json: schema: type: object properties: field_{id}: anyOf: - type: number description: The aggregation result for the field with id {id}. example: 5 - type: string description: The aggregation result for the field with id {id}. - type: array items: {} description: The aggregation result for the field with id {id}. - type: object description: The aggregation result for the field with id {id}. total: type: integer description: The total value count. Only returned if `include=total` is specified as GET parameter. example: 7 description: '' '400': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_USER_NOT_IN_GROUP - ERROR_FILTER_FIELD_NOT_FOUND - ERROR_VIEW_FILTER_TYPE_DOES_NOT_EXIST - ERROR_VIEW_FILTER_TYPE_UNSUPPORTED_FIELD - ERROR_FILTERS_PARAM_VALIDATION_ERROR detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' '404': content: application/json: schema: type: object properties: error: type: string description: Machine readable error indicating what went wrong. enum: - ERROR_GRID_DOES_NOT_EXIST detail: oneOf: - type: string format: string description: Human readable details about what went wrong. - type: object format: object description: Machine readable object about what went wrong. description: '' components: schemas: FileFieldResponse: type: object properties: url: type: string format: uri readOnly: true thumbnails: type: object additionalProperties: {} readOnly: true visible_name: type: string name: type: string size: type: integer mime_type: type: string is_image: type: boolean image_width: type: integer image_height: type: integer uploaded_at: type: string format: date-time required: - image_height - image_width - is_image - mime_type - name - size - thumbnails - uploaded_at - url - visible_name AggregationRawTypeEnum: enum: - empty_count - not_empty_count - unique_count - min - max - sum - average - median - decile - variance - std_dev - distribution type: string description: '* `empty_count` - empty_count * `not_empty_count` - not_empty_count * `unique_count` - unique_count * `min` - min * `max` - max * `sum` - sum * `average` - average * `median` - median * `decile` - decile * `variance` - variance * `std_dev` - std_dev * `distribution` - distribution' BlankEnum: enum: - '' RowCommentsNotificationModeEnum: enum: - all - mentions type: string description: '* `all` - all * `mentions` - mentions' LinkRowValue: type: object properties: id: type: integer readOnly: true description: The unique identifier of the row in the related table. value: type: string description: The primary field's value as a string of the row in the related table. order: type: string format: decimal pattern: ^-?\d{0,20}(?:\.\d{0,20})?$ required: - id PublicPaginationSerializerWithGridViewFieldOptionsExampleRowResponse: type: object properties: field_options: type: object additionalProperties: $ref: '#/components/schemas/GridViewFieldOptions' description: An object containing the field id as key and the properties related to view as value. count: type: integer description: The total amount of results. next: type: string format: uri nullable: true description: URL to the next page. previous: type: string format: uri nullable: true description: URL to the previous page. results: type: array items: $ref: '#/components/schemas/ExampleRowResponse' required: - count - next - previous - results RowMetadata: type: object properties: row_comment_count: type: integer minimum: 0 description: How many row comments exist for this row. row_comments_notification_mode: $ref: '#/components/schemas/RowCommentsNotificationModeEnum' Collaborator: type: object properties: id: type: integer name: type: string readOnly: true required: - id - name ExampleRowResponse: type: object properties: id: type: integer description: The unique identifier of the row in the table. order: type: string format: decimal pattern: ^-?\d{0,20}(?:\.\d{0,20})?$ description: Indicates the position of the row, lowest first and highest last. metadata: allOf: - $ref: '#/components/schemas/RowMetadata' description: Additional metadata for the row, if `include=metadata' is provided as query parameter. field_1: type: string nullable: true description: 'This field represents the `text` field. The number in field_1 is in a normal request or response the id of the field. ' field_2: type: string nullable: true description: 'This field represents the `long_text` field. The number in field_2 is in a normal request or response the id of the field. ' field_3: type: string nullable: true description: 'This field represents the `url` field. The number in field_3 is in a normal request or response the id of the field. ' field_4: type: string nullable: true description: 'This field represents the `email` field. The number in field_4 is in a normal request or response the id of the field. ' maxLength: 254 field_5: type: string format: decimal pattern: ^-?\d{0,50}(?:\.\d{0,0})?$ nullable: true description: 'This field represents the `number` field. The number in field_5 is in a normal request or response the id of the field. ' field_6: type: integer maximum: 5 minimum: 0 default: 0 description: 'This field represents the `rating` field. The number in field_6 is in a normal request or response the id of the field. ' field_7: type: boolean default: false description: 'This field represents the `boolean` field. The number in field_7 is in a normal request or response the id of the field. ' field_8: type: string format: date nullable: true description: 'This field represents the `date` field. The number in field_8 is in a normal request or response the id of the field. ' field_9: type: string format: date-time description: 'This field represents the `last_modified` field. The number in field_9 is in a normal request or response the id of the field. ' field_10: allOf: - $ref: '#/components/schemas/Collaborator' description: 'This field represents the `last_modified_by` field. The number in field_10 is in a normal request or response the id of the field. ' field_11: type: string format: date-time description: 'This field represents the `created_on` field. The number in field_11 is in a normal request or response the id of the field. ' field_12: allOf: - $ref: '#/components/schemas/Collaborator' description: 'This field represents the `created_by` field. The number in field_12 is in a normal request or response the id of the field. ' field_13: type: number format: float nullable: true description: This field represents the `duration` field. The number in field_13 is in a normal request or response the id of the field. The provided value can be a string in one of the available formats or a number representing the duration in seconds. In any case, the value will be rounded to match the field's duration format. field_14: type: array items: $ref: '#/components/schemas/LinkRowValue' description: This field represents the `link_row` field. The number in field_14 is in a normal request or response the id of the field. This field accepts an `array` containing the ids or the names of the related rows. A name is the value of the primary key of the related row. This field also accepts a string with names separated by a comma or an array of row names. You can also provide a unique row Id.The response contains a list of objects containing the `id` and the primary field's `value` as a string for display purposes. field_15: type: array items: $ref: '#/components/schemas/FileFieldResponse' description: This field represents the `file` field. The number in field_15 is in a normal request or response the id of the field. This field accepts an `array` containing objects with the name of the file. The response contains an `array` of more detailed objects related to the files. field_16: allOf: - $ref: '#/components/schemas/SelectOption' nullable: true description: This field represents the `single_select` field. The number in field_16 is in a normal request or response the id of the field. This field accepts an `integer` representing the chosen select option id related to the field. Available ids can be found when getting or listing the field. The response represents chosen field, but also the value and color is exposed. field_17: type: array items: $ref: '#/components/schemas/SelectOption' nullable: true description: This field represents the `multiple_select` field. The number in field_17 is in a normal request or response the id of the field. This field accepts a list of `integer` each of which representing the chosen select option id related to the field. Available ids can be foundwhen getting or listing the field. You can also send a list of option names in which case the option are searched by name. The first one that matches is used. This field also accepts a string with names separated by a comma or an array of file names. The response represents chosen field, but also the value and color is exposed. field_18: type: string nullable: true description: 'This field represents the `phone_number` field. The number in field_18 is in a normal request or response the id of the field. ' maxLength: 100 field_19: type: string nullable: true description: 'This field represents the `formula` field. The number in field_19 is in a normal request or response the id of the field. ' field_20: type: string nullable: true description: 'This field represents the `count` field. The number in field_20 is in a normal request or response the id of the field. ' field_21: type: string nullable: true description: 'This field represents the `rollup` field. The number in field_21 is in a normal request or response the id of the field. ' field_22: type: string nullable: true description: 'This field represents the `lookup` field. The number in field_22 is in a normal request or response the id of the field. ' field_23: type: array items: $ref: '#/components/schemas/Collaborator' description: This field represents the `multiple_collaborators` field. The number in field_23 is in a normal request or response the id of the field. This field accepts a list of objects representing the chosen collaborators through the object's `id` property. The id is Baserow user id. The response objects also contains the collaborator name directly along with its id. field_24: type: string format: uuid description: This field represents the `uuid` field. The number in field_24 is in a normal request or response the id of the field. Contains a unique and persistent UUID for every row. field_25: type: integer description: This field represents the `autonumber` field. The number in field_25 is in a normal request or response the id of the field. Contains a unique and persistent incremental integer number for every row. field_26: type: boolean description: This field represents the `password` field. The number in field_26 is in a normal request or response the id of the field. Allows setting a write only password value. Providing a string will set the password, `null` will unset it, `true` will be ignored. The response will respond with `true` is a password is set, but will never expose the password itself. field_27: type: string readOnly: true description: 'This field represents the `form_view_edit_row` field. The number in field_27 is in a normal request or response the id of the field. ' field_28: type: string nullable: true description: This field represents the `ai` field. The number in field_28 is in a normal request or response the id of the field. Holds a value that is generated by a generative AI model using a dynamic prompt. required: - field_27 - id GridViewFilter: type: object properties: field_ids: type: array items: type: integer description: Only the fields related to the provided ids are added to the response. If None are provided all fields will be returned. row_ids: type: array items: type: integer description: Only rows related to the provided ids are added to the response. required: - row_ids GridViewFieldOptions: type: object properties: width: type: integer maximum: 2147483647 minimum: 0 description: The width of the table field in the related view. hidden: type: boolean description: Whether or not the field should be hidden in the current view. order: type: integer maximum: 32767 minimum: -32768 description: The position that the field has within the view, lowest first. If there is another field with the same order value then the field with the lowest id must be shown first. aggregation_type: type: string description: 'Indicates how the field value is aggregated. This value is different from the `aggregation_raw_type`. The `aggregation_raw_type` is the value extracted from the database, while the `aggregation_type` can implies further calculations. For example: if you want to compute an average, `sum` is going to be the `aggregation_raw_type`, the value extracted from database, and `sum / row_count` will be the aggregation result displayed to the user. This aggregation_type should be used by the client to compute the final value.' maxLength: 48 aggregation_raw_type: description: 'Indicates how to compute the raw aggregation value from database. This type must be registered in the backend prior to use it. * `empty_count` - empty_count * `not_empty_count` - not_empty_count * `unique_count` - unique_count * `min` - min * `max` - max * `sum` - sum * `average` - average * `median` - median * `decile` - decile * `variance` - variance * `std_dev` - std_dev * `distribution` - distribution' oneOf: - $ref: '#/components/schemas/AggregationRawTypeEnum' - $ref: '#/components/schemas/BlankEnum' SelectOption: type: object properties: id: type: integer value: type: string maxLength: 255 color: type: string maxLength: 255 required: - color - value PaginationSerializerWithGridViewFieldOptionsExampleRowResponse: type: object properties: field_options: type: object additionalProperties: $ref: '#/components/schemas/GridViewFieldOptions' description: An object containing the field id as key and the properties related to view as value. row_metadata: type: object additionalProperties: $ref: '#/components/schemas/RowMetadata' description: An object keyed by row id with a value being an object containing additional metadata about that row. A row might not have metadata and will not be present as a key if so. count: type: integer description: The total amount of results. next: type: string format: uri nullable: true description: URL to the next page. previous: type: string format: uri nullable: true description: URL to the previous page. results: type: array items: $ref: '#/components/schemas/ExampleRowResponse' required: - count - next - previous - results securitySchemes: Database token: type: http scheme: bearer bearerFormat: Token your_token JWT: type: http scheme: bearer bearerFormat: JWT your_token UserSource JWT: type: http scheme: bearer bearerFormat: JWT your_token