Baserow Database table form view API

The Database table form view API from Baserow — 3 operation(s) for database table form view.

OpenAPI Specification

baserow-database-table-form-view-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Baserow API spec Admin Database table form 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 form view
paths:
  /api/database/views/form/{slug}/edit-row/{row_token}/:
    get:
      operationId: get_edit_row_database_table_form_view
      description: Returns the current field values of the row identified by the edit token. Only fields visible in the form view are returned. The token must be a valid signed token generated by a form_view_edit_row field.
      parameters:
      - in: path
        name: row_token
        schema:
          type: string
        description: The signed edit token that identifies the row to edit.
        required: true
      - in: path
        name: slug
        schema:
          type: string
        description: The slug of the form view.
        required: true
      tags:
      - Database table form view
      security:
      - UserSource JWT: []
      - JWT: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExampleRowResponse'
          description: ''
        '401':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_NO_PERMISSION_TO_PUBLICLY_SHARED_FORM
                  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_FORM_DOES_NOT_EXIST
                    - ERROR_ROW_DOES_NOT_EXIST
                    - ERROR_INVALID_EDIT_ROW_TOKEN
                  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_edit_row_database_table_form_view
      description: Updates the row identified by the edit token using the submitted field values. Only fields that are visible in the form view can be changed. The `row_token` must be a valid signed token generated by a form_view_edit_row field.
      parameters:
      - in: path
        name: row_token
        schema:
          type: string
        description: The signed edit token that identifies the row to edit.
        required: true
      - in: path
        name: slug
        schema:
          type: string
        description: The slug of the form view.
        required: true
      tags:
      - Database table form view
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedExampleUpdateRowRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedExampleUpdateRowRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedExampleUpdateRowRequest'
      security:
      - UserSource JWT: []
      - JWT: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FormViewSubmitted'
          description: ''
        '401':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_NO_PERMISSION_TO_PUBLICLY_SHARED_FORM
                  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: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_FIELD_DATA_CONSTRAINT
                  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_FORM_DOES_NOT_EXIST
                    - ERROR_ROW_DOES_NOT_EXIST
                    - ERROR_INVALID_EDIT_ROW_TOKEN
                  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/form/{slug}/submit/:
    get:
      operationId: get_meta_database_table_form_view
      description: Returns the metadata related to the form view if the form is publicly shared or if the user has access to the related workspace. This data can be used to construct a form with the right fields.
      parameters:
      - in: path
        name: slug
        schema:
          type: string
        description: The slug related to the form form.
        required: true
      tags:
      - Database table form view
      security:
      - UserSource JWT: []
      - JWT: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicFormView'
          description: ''
        '401':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_NO_PERMISSION_TO_PUBLICLY_SHARED_FORM
                  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_FORM_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: submit_database_table_form_view
      description: Submits the form if the form is publicly shared or if the user has access to the related workspace. The provided data will be validated based on the fields that are in the form and the rules per field. If valid, a new row will be created in the table.
      parameters:
      - in: path
        name: slug
        schema:
          type: string
        description: The slug related to the form.
        required: true
      tags:
      - Database table form view
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExampleRowRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ExampleRowRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ExampleRowRequest'
      security:
      - UserSource JWT: []
      - JWT: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FormViewSubmitted'
          description: ''
        '401':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_NO_PERMISSION_TO_PUBLICLY_SHARED_FORM
                  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_FORM_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/form/{slug}/upload-file/:
    post:
      operationId: upload_file_form_view
      description: Uploads a file anonymously to Baserow by uploading the file contents directly. A `file` multipart is expected containing the file contents.
      parameters:
      - in: path
        name: slug
        schema:
          type: string
        description: Submits files only if the view with the provided slughas a public file field.
        required: true
      tags:
      - Database table form view
      security:
      - UserSource JWT: []
      - JWT: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserFile'
          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: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_INVALID_FILE
                    - ERROR_FILE_SIZE_TOO_LARGE
                    - ERROR_VIEW_HAS_NO_PUBLIC_FILE_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
                  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:
    PublicFormView:
      type: object
      properties:
        title:
          type: string
          description: The title that is displayed at the beginning of the form.
        description:
          type: string
          description: The description that is displayed at the beginning of the form.
        mode:
          allOf:
          - $ref: '#/components/schemas/Mode51eEnum'
          description: 'Configurable mode of the form.


            * `form` - form

            * `survey` - survey'
        cover_image:
          allOf:
          - $ref: '#/components/schemas/UserFile'
          nullable: true
          description: The user file cover image that is displayed at the top of the form.
        logo_image:
          allOf:
          - $ref: '#/components/schemas/UserFile'
          nullable: true
          description: The user file logo image that is displayed at the top of the form.
        submit_text:
          type: string
          description: The text displayed on the submit button.
        fields:
          type: array
          items:
            $ref: '#/components/schemas/PublicFormViewFieldOptions'
        show_logo:
          type: boolean
        allow_public_export:
          type: boolean
          description: Indicates whether it's allowed to export a publicly shared view.
      required:
      - fields
    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'
    Mode51eEnum:
      enum:
      - form
      - survey
      type: string
      description: '* `form` - form

        * `survey` - survey'
    RowCommentsNotificationModeEnum:
      enum:
      - all
      - mentions
      type: string
      description: '* `all` - all

        * `mentions` - mentions'
    PublicFormViewField:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 255
        type:
          type: string
          readOnly: true
          description: The type of the related field.
      required:
      - id
      - name
      - type
    FormViewFieldOptionsCondition:
      type: object
      properties:
        id:
          type: integer
        field:
          type: integer
        type:
          type: string
          description: 'Indicates how the field''s value must be compared to the filter''s value. The filter is always in this order `field` `type` `value` (example: `field_1` `contains` `Test`).'
          maxLength: 48
        value:
          type: string
          description: The filter value that must be compared to the field's value.
        group:
          type: integer
          nullable: true
      required:
      - field
      - id
      - type
    PublicFormViewFieldOptions:
      type: object
      properties:
        name:
          type: string
          readOnly: true
          description: If provided, then this value will be visible above the field input.
        description:
          type: string
          description: If provided, then this value be will be shown under the field name.
        required:
          type: boolean
          description: Indicates whether the field is required for the visitor to fill out.
        order:
          type: integer
          maximum: 32767
          minimum: -32768
          description: The order that the field has in the form. Lower value is first.
        field:
          allOf:
          - $ref: '#/components/schemas/PublicFormViewField'
          readOnly: true
          description: The properties of the related field. These can be used to construct the correct input. Additional properties could be added depending on the field type.
        show_when_matching_conditions:
          type: boolean
          description: Indicates whether this field is visible when the conditions are met.
        condition_type:
          allOf:
          - $ref: '#/components/schemas/ConditionTypeEnum'
          description: 'Indicates whether all (AND) or any (OR) of the conditions should match before shown.


            * `AND` - And

            * `OR` - Or'
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/FormViewFieldOptionsCondition'
        condition_groups:
          type: array
          items:
            $ref: '#/components/schemas/FormViewFieldOptionsConditionGroup'
        groups:
          type: array
          items:
            $ref: '#/components/schemas/FormViewFieldOptionsConditionGroup'
        field_component:
          type: string
          description: Indicates which field input component is used in the form. The value is only used in the frontend, and can differ per field.
          maxLength: 32
      required:
      - field
      - name
    FormViewSubmitted:
      type: object
      properties:
        submit_action:
          allOf:
          - $ref: '#/components/schemas/SubmitActionEnum'
          description: 'The action that must be performed after the visitor has filled out the form.


            * `MESSAGE` - Message

            * `REDIRECT` - Redirect'
        submit_action_message:
          type: string
          description: If the `submit_action` is MESSAGE, then this message will be shown to the visitor after submitting the form.
        submit_action_redirect_url:
          type: string
          format: uri
          description: If the `submit_action` is REDIRECT,then the visitors will be redirected to the this URL after submitting the form.
          maxLength: 2000
        row_id:
          type: integer
      required:
      - row_id
    PatchedExampleUpdateRowRequest:
      type: object
      properties:
        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_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:
            type: integer
            nullable: true
          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: {}
          nullable: true
          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:
          type: integer
          nullable: true
          description: Accepts one of the following option ids as integer value 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:
            type: integer
            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.
          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_23:
          type: array
          items:
            type: integer
          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_26:
          type: string
          nullable: true
          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_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.
    UserFile:
      type: object
      properties:
        size:
          type: integer
          maximum: 9223372036854775807
          minimum: 0
          format: int64
        mime_type:
          type: string
          maxLength: 127
        is_image:
          type: boolean
        image_width:
          type: integer
          maximum: 2147483647
          minimum: 0
          nullable: true
        image_height:
          type: integer
          maximum: 2147483647
          minimum: 0
          nullable: true
        uploaded_at:
          type: string
          format: date-time
          readOnly: true
        url:
          type: string
          format: uri
          readOnly: true
        thumbnails:
          type: object
          additionalProperties: {}
          readOnly: true
        name:
          type: string
          readOnly: true
        original_name:
          type: string
          maxLength: 255
      required:
      - name
      - original_name
      - size
      - thumbnails
      - uploaded_at
      - url
    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 

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