Baserow Database table views API

The Database table views API from Baserow — 14 operation(s) for database table views.

OpenAPI Specification

baserow-database-table-views-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Baserow API spec Admin Database table views 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 views
paths:
  /api/database/view/{view_id}/premium:
    patch:
      operationId: premium_view_attributes_update
      description: Sets view attributes only available for premium users.
      parameters:
      - in: path
        name: view_id
        schema:
          type: integer
        description: Sets show_logo of this view.
        required: true
      tags:
      - Database table views
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedUpdatePremiumViewAttributes'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedUpdatePremiumViewAttributes'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedUpdatePremiumViewAttributes'
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/View'
          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_FEATURE_NOT_AVAILABLE
                    - ERROR_REQUEST_BODY_VALIDATION
                    - ERROR_CANNOT_UPDATE_PREMIUM_ATTRIBUTES_ON_TEMPLATE
                  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/{slug}/link-row-field-lookup/{field_id}/:
    get:
      operationId: database_table_public_view_link_row_field_lookup
      description: If the view is publicly shared or if an authenticated user has access to the related workspace, then this endpoint can be used to do a value lookup of the link row fields that are included in the view. Normally it is not possible for a not authenticated visitor to fetch the rows of a table. This endpoint makes it possible to fetch the id and primary field value of the related table of a link row included in the view.
      parameters:
      - in: path
        name: field_id
        schema:
          type: integer
        description: The field id of the link row field.
        required: true
      - 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: path
        name: slug
        schema:
          type: string
        description: The slug related to the view.
        required: true
      tags:
      - Database table views
      security:
      - UserSource JWT: []
      - JWT: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginationSerializerLinkRowValue'
          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_VIEW_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/{slug}/public/auth/:
    post:
      operationId: public_view_token_auth
      description: Returns a valid never-expiring JWT token for this public shared view if the password provided matches with the one saved by the view's owner.
      parameters:
      - in: path
        name: slug
        schema:
          type: string
        description: The slug of the grid view to get public information about.
        required: true
      tags:
      - Database table views
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicViewAuthRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PublicViewAuthRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PublicViewAuthRequest'
        required: true
      security:
      - UserSource JWT: []
      - JWT: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicViewAuthResponse'
          description: ''
        '401':
          content:
            application/json:
              schema:
                description: The password provided for this view is incorrect
          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/{slug}/public/info/:
    get:
      operationId: get_public_view_info
      description: Returns the required public information to display a single shared view.
      parameters:
      - in: path
        name: slug
        schema:
          type: string
        description: The slug of the view to get public information about.
        required: true
      tags:
      - Database table views
      security:
      - UserSource JWT: []
      - JWT: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicViewInfo'
          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: ''
        '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_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/{slug}/row/{row_id}/:
    get:
      operationId: get_public_view_row
      description: Returns the data for a specific row in a publicly shared view, identified by the view’s slug and the row’s ID.
      parameters:
      - in: path
        name: row_id
        schema:
          type: integer
        description: The ID of the row to retrieve from the public view.
        required: true
      - in: path
        name: slug
        schema:
          type: string
        description: The slug of the view from which to get the row data.
        required: true
      tags:
      - Database table views
      security:
      - UserSource JWT: []
      - JWT: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExamplePublicRowResponseSerializerWithUserFieldNames'
          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: ''
        '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_VIEW_DOES_NOT_EXIST
                    - ERROR_ROW_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}/:
    get:
      operationId: get_database_table_view
      description: Returns the existing view. Depending on the type different properties could be returned.
      parameters:
      - in: query
        name: include
        schema:
          type: string
        description: A comma separated list of extra attributes to include on the returned view. The supported attributes are `filters`, `sortings` and `decorations`. For example `include=filters,sortings` will add the attributes `filters` and `sortings` to every returned view, containing a list of the views filters and sortings respectively.
      - in: path
        name: view_id
        schema:
          type: integer
        description: Returns the view related to the provided value.
        required: true
      tags:
      - Database table views
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewView'
          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: ''
    patch:
      operationId: update_database_table_view
      description: Updates the existing view. The type cannot be changed. It depends on the existing type which properties can be changed.
      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: query
        name: include
        schema:
          type: string
        description: A comma separated list of extra attributes to include on the returned view. The supported attributes are `filters`, `sortings` and `decorations`. For example `include=filters,sortings` will add the attributes `filters` and `sortings` to every returned view, containing a list of the views filters and sortings respectively.
      - in: path
        name: view_id
        schema:
          type: integer
        description: Updates the view related to the provided value.
        required: true
      tags:
      - Database table views
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedViewUpdateView'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedViewUpdateView'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedViewUpdateView'
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewView'
          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
                  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: ''
    delete:
      operationId: delete_database_table_view
      description: Deletes the existing view. Note that all the related settings of the view are going to be deleted also. The data stays intact after deleting the view because this is related to the table and not the view.
      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: Deletes the view related to the provided value.
        required: true
      tags:
      - Database table views
      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_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}/default-values/:
    patch:
      operationId: update_view_default_values
      description: Updates the default row values for the specified view. Accepts a list of default value objects, each specifying the field, whether the default is enabled, an optional raw value, and an optional function name (e.g. 'now') for dynamic defaults.
      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: path
        name: view_id
        schema:
          type: integer
        description: Updates the default row values for the view with the given id.
        required: true
      tags:
      - Database table views
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ViewDefaultValue'
          application/x-www-form-urlencoded:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ViewDefaultValue'
          multipart/form-data:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ViewDefaultValue'
        required: true
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ViewDefaultValue'
          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_VIEW_DOES_NOT_SUPPORT_DEFAULT_VALUES
                    - ERROR_INVALID_DEFAULT_VALUE_FUNCTION
                    - 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_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}/duplicate/:
    post:
      operationId: duplicate_database_table_view
      description: 'Duplicates an existing view if the user has access to it. When a view is duplicated everything is copied except:

        - The name is appended with the copy number. Ex: `ViewName`->`ViewName(2)` and `View(2)`->`View(3)`

        - If the original view is publicly shared, the new view will not be shared anymore'
      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: Duplicates the view related to the provided value.
        required: true
      tags:
      - Database table views
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewView'
          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: ''
  /api/database/views/{view_id}/field-options/:
    get:
      operationId: get_database_table_view_field_options
      description: Responds with the fields options of the provided view if the authenticated user has access to the related workspace.
      parameters:
      - in: path
        name: view_id
        schema:
          type: integer
        description: Responds with field options related to the provided value.
        required: true
      tags:
      - Database table views
      security:
      - UserSource JWT: []
      - JWT: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewFieldOptions'
          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_VIEW_DOES_NOT_SUPPORT_FIELD_OPTIONS
                  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
                  

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