Baserow Database table view filters API

The Database table view filters API from Baserow — 4 operation(s) for database table view filters.

OpenAPI Specification

baserow-database-table-view-filters-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Baserow API spec Admin Database table view filters 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 view filters
paths:
  /api/database/views/{view_id}/filter-groups/:
    post:
      operationId: create_database_table_view_filter_group
      description: Creates a new filter group for the view related to the provided `view_id` parameter.
      parameters:
      - in: header
        name: ClientSessionId
        schema:
          type: string
          format: uuid
        description: An optional header that marks the action performed by this request as having occurred in a particular client session. Then using the undo/redo endpoints with the same ClientSessionId header this action can be undone/redone.
      - in: header
        name: ClientUndoRedoActionGroupId
        schema:
          type: string
          format: uuid
        description: An optional header that marks the action performed by this request as having occurred in a particular action group.Then calling the undo/redo endpoint with the same ClientSessionId header, all the actions belonging to the same action group can be undone/redone together in a single API call.
      - in: path
        name: view_id
        schema:
          type: integer
        description: The ID of the view where create the new filter group.
        required: true
      tags:
      - Database table view filters
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateViewFilterGroup'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CreateViewFilterGroup'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateViewFilterGroup'
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewFilterGroup'
          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_VIEW_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/{view_id}/filters/:
    get:
      operationId: list_database_table_view_filters
      description: Lists all filters of the view related to the provided `view_id`. A view can have multiple filters. When all the rows are requested for the view only those that apply to the filters are returned.
      parameters:
      - in: path
        name: view_id
        schema:
          type: integer
        description: Returns only filters of the view related to the provided value.
        required: true
      tags:
      - Database table view filters
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ViewFilter'
          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
                  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_VIEW_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: create_database_table_view_filter
      description: Creates a new filter for the view related to the provided `view_id` parameter. When the rows of a view are requested, for example via the `list_database_table_grid_view_rows` endpoint, then only the rows that apply to all the filters are going to be returned. A filter compares the value of a field to the value of a filter. It depends on the type how values are going to be compared.
      parameters:
      - in: header
        name: ClientSessionId
        schema:
          type: string
          format: uuid
        description: An optional header that marks the action performed by this request as having occurred in a particular client session. Then using the undo/redo endpoints with the same ClientSessionId header this action can be undone/redone.
      - in: header
        name: ClientUndoRedoActionGroupId
        schema:
          type: string
          format: uuid
        description: An optional header that marks the action performed by this request as having occurred in a particular action group.Then calling the undo/redo endpoint with the same ClientSessionId header, all the actions belonging to the same action group can be undone/redone together in a single API call.
      - in: path
        name: view_id
        schema:
          type: integer
        description: Creates a filter for the view related to the provided value.
        required: true
      tags:
      - Database table view filters
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateViewFilter'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CreateViewFilter'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateViewFilter'
        required: true
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewFilter'
          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
                    - ERROR_FIELD_NOT_IN_TABLE
                    - ERROR_VIEW_FILTER_NOT_SUPPORTED
                    - ERROR_VIEW_FILTER_TYPE_UNSUPPORTED_FIELD
                  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_VIEW_DOES_NOT_EXIST
                    - ERROR_VIEW_FILTER_GROUP_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/filter-group/{view_filter_group_id}/:
    get:
      operationId: get_database_table_view_filter_group
      description: Returns the existing view filter group with the given `view_filter_group_id`.
      parameters:
      - in: path
        name: view_filter_group_id
        schema:
          type: integer
        description: The ID of the view filter group to return.
        required: true
      tags:
      - Database table view filters
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewFilterGroup'
          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
                  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_VIEW_FILTER_GROUP_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: ''
    patch:
      operationId: update_database_table_view_filter_group
      description: Updates the existing filter group with the given `view_filter_group_id`.
      parameters:
      - in: header
        name: ClientSessionId
        schema:
          type: string
          format: uuid
        description: An optional header that marks the action performed by this request as having occurred in a particular client session. Then using the undo/redo endpoints with the same ClientSessionId header this action can be undone/redone.
      - in: header
        name: ClientUndoRedoActionGroupId
        schema:
          type: string
          format: uuid
        description: An optional header that marks the action performed by this request as having occurred in a particular action group.Then calling the undo/redo endpoint with the same ClientSessionId header, all the actions belonging to the same action group can be undone/redone together in a single API call.
      - in: path
        name: view_filter_group_id
        schema:
          type: integer
        description: The ID of the view filter group to update.
        required: true
      tags:
      - Database table view filters
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedUpdateViewFilterGroup'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedUpdateViewFilterGroup'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedUpdateViewFilterGroup'
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewFilterGroup'
          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_VIEW_FILTER_GROUP_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: ''
    delete:
      operationId: delete_database_table_view_filter_group
      description: Deletes the existing filter group with the given `view_filter_group_id`.
      parameters:
      - in: header
        name: ClientSessionId
        schema:
          type: string
          format: uuid
        description: An optional header that marks the action performed by this request as having occurred in a particular client session. Then using the undo/redo endpoints with the same ClientSessionId header this action can be undone/redone.
      - in: header
        name: ClientUndoRedoActionGroupId
        schema:
          type: string
          format: uuid
        description: An optional header that marks the action performed by this request as having occurred in a particular action group.Then calling the undo/redo endpoint with the same ClientSessionId header, all the actions belonging to the same action group can be undone/redone together in a single API call.
      - in: path
        name: view_filter_group_id
        schema:
          type: integer
        description: The ID of the view filter group to delete.
        required: true
      tags:
      - Database table view filters
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '204':
          description: No response body
        '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
                  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_VIEW_FILTER_GROUP_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/filter/{view_filter_id}/:
    get:
      operationId: get_database_table_view_filter
      description: Returns the existing view filter.
      parameters:
      - in: path
        name: view_filter_id
        schema:
          type: integer
        description: The ID of the view filter to return.
        required: true
      tags:
      - Database table view filters
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewFilter'
          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
                  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_VIEW_FILTER_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: ''
    patch:
      operationId: update_database_table_view_filter
      description: Updates the existing filter.
      parameters:
      - in: header
        name: ClientSessionId
        schema:
          type: string
          format: uuid
        description: An optional header that marks the action performed by this request as having occurred in a particular client session. Then using the undo/redo endpoints with the same ClientSessionId header this action can be undone/redone.
      - in: header
        name: ClientUndoRedoActionGroupId
        schema:
          type: string
          format: uuid
        description: An optional header that marks the action performed by this request as having occurred in a particular action group.Then calling the undo/redo endpoint with the same ClientSessionId header, all the actions belonging to the same action group can be undone/redone together in a single API call.
      - in: path
        name: view_filter_id
        schema:
          type: integer
        description: The ID of the view filter to update.
        required: true
      tags:
      - Database table view filters
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedUpdateViewFilter'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedUpdateViewFilter'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedUpdateViewFilter'
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewFilter'
          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
                    - ERROR_FIELD_NOT_IN_TABLE
                    - ERROR_VIEW_FILTER_NOT_SUPPORTED
                    - ERROR_VIEW_FILTER_TYPE_UNSUPPORTED_FIELD
                  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_VIEW_FILTER_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: ''
    delete:
      operationId: delete_database_table_view_filter
      description: Deletes the existing filter if the authorized user has access to the related database's workspace.
      parameters:
      - in: header
        name: ClientSessionId
        schema:
          type: string
          format: uuid
        description: An optional header that marks the action performed by this request as having occurred in a particular client session. Then using the undo/redo endpoints with the same ClientSessionId header this action can be undone/redone.
      - in: header
        name: ClientUndoRedoActionGroupId
        schema:
          type: string
          format: uuid
        description: An optional header that marks the action performed by this request as having occurred in a particular action group.Then calling the undo/redo endpoint with the same ClientSessionId header, all the actions belonging to the same action group can be undone/redone together in a single API call.
      - in: path
        name: view_filter_id
        schema:
          type: integer
        description: The ID of the view filter to delete.
        required: true
      tags:
      - Database table view filters
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '204':
          description: No response body
        '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
                  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_VIEW_FILTER_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:
    ViewFilterGroup:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        filter_type:
          allOf:
          - $ref: '#/components/schemas/ConditionTypeEnum'
          description: 'Indicates whether all the rows should apply to all filters (AND) or to any filter (OR) in the group to be shown.


            * `AND` - And

            * `OR` - Or'
        view:
          type: integer
          description: The view to which the filter group applies to. Each view can have its own filter groups.
        parent_group:
          type: integer
          nullable: true
      required:
      - id
      - view
    PatchedUpdateViewFilterGroup:
      type: object
      properties:
        filter_type:
          allOf:
          - $ref: '#/components/schemas/ConditionTypeEnum'
          description: 'Indicates whether all the rows should apply to all filters (AND) or to any filter (OR) in the group to be shown.


            * `AND` - And

            * `OR` - Or'
    Type4e1Enum:
      enum:
      - 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
      type: string
      description: '* `equal` - equal

        * `not_equal` - not_equal

        * `filename_contains` - filename_contains

        * `files_lower_than` - files_lower_than

        * `has_file_type` - has_file_type

        * `contains` - contains

        * `contains_not` - contains_not

        * `contains_word` - contains_word

        * `doesnt_contain_word` - doesnt_contain_word

        * `length_is_lower_than` - length_is_lower_than

        * `higher_than` - higher_than

        * `higher_than_or_equal` - higher_than_or_equal

        * `lower_than` - lower_than

        * `lower_than_or_equal` - lower_than_or_equal

        * `is_even_and_whole` - is_even_and_whole

        * `date_equal` - date_equal

        * `date_before` - date_before

        * `date_before_or_equal` - date_before_or_equal

        * `date_after_days_ago` - date_after_days_ago

        * `date_after` - date_after

        * `date_after_or_equal` - date_after_or_equal

        * `date_not_equal` - date_not_equal

        * `date_equals_today` - date_equals_today

        * `date_before_today` - date_before_today

        * `date_after_today` - date_after_today

        * `date_within_days` - date_within_days

        * `date_within_weeks` - date_within_weeks

        * `date_within_months` - date_within_months

        * `date_equals_days_ago` - date_equals_days_ago

        * `date_equals_months_ago` - date_equals_months_ago

        * `date_equals_years_ago` - date_equals_years_ago

        * `date_equals_week` - date_equals_week

        * `date_equals_month` - date_equals_month

        * `date_equals_day_of_month` - date_equals_day_of_month

        * `date_equals_year` - date_equals_year

        * `date_is` - date_is

        * `date_is_not` - date_is_not

        * `date_is_before` - date_is_before

        * `date_is_on_or_before` - date_is_on_or_before

        * `date_is_after` - date_is_after

        * `date_is_on_or_after` - date_is_on_or_after

        * `date_is_within` - date_is_within

        * `single_select_equal` - single_select_e

# --- truncated at 32 KB (48 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/baserow/refs/heads/main/openapi/baserow-database-table-view-filters-api-openapi.yml