Baserow Builder elements API

The Builder elements API from Baserow — 5 operation(s) for builder elements.

OpenAPI Specification

baserow-builder-elements-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Baserow API spec Admin Builder elements 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: Builder elements
paths:
  /api/builder/domains/published/page/{page_id}/elements/:
    get:
      operationId: list_public_builder_page_elements
      description: Lists all the elements of the page related to the provided parameter. If the user is Anonymous, the page must belong to a published builder instance to being accessible.
      parameters:
      - in: path
        name: page_id
        schema:
          type: integer
        description: Returns the elements of the page related to the provided Id.
        required: true
      tags:
      - Builder elements
      security:
      - UserSource JWT: []
      - JWT: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Element_TypePublicElement'
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_PAGE_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/builder/element/{element_id}/:
    patch:
      operationId: update_builder_page_element
      description: Updates an existing builder element.
      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: element_id
        schema:
          type: integer
        description: The id of the element
        required: true
      tags:
      - Builder elements
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedElement_TypeUpdateElement'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedElement_TypeUpdateElement'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedElement_TypeUpdateElement'
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Element_TypeElement'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_ELEMENT_INVALID_FORMULA
                    - 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_ELEMENT_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_builder_page_element
      description: Deletes the element related by the given 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: path
        name: element_id
        schema:
          type: integer
        description: The id of the element
        required: true
      tags:
      - Builder elements
      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_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_ELEMENT_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/builder/element/{element_id}/duplicate/:
    post:
      operationId: duplicate_builder_page_element
      description: Duplicates an element and all of the elements children and the associated workflow actions as well.
      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: element_id
        schema:
          type: integer
        description: The id of the element to duplicate
        required: true
      tags:
      - Builder elements
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DuplicateElement'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - 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_ELEMENT_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/builder/element/{element_id}/move/:
    patch:
      operationId: move_builder_page_element
      description: Moves the element in the page before another element or at the end of the page if no before element is given. The elements must belong to the same page.
      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: element_id
        schema:
          type: integer
        description: The id of the element to move
        required: true
      tags:
      - Builder elements
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedMoveElement'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedMoveElement'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedMoveElement'
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Element_TypeElement'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_REQUEST_BODY_VALIDATION
                    - ERROR_ELEMENT_NOT_IN_SAME_PAGE
                  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_ELEMENT_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/builder/page/{page_id}/elements/:
    get:
      operationId: list_builder_page_elements
      description: Lists all the elements of the page related to the provided parameter if the user has access to the related builder's workspace. If the workspace is related to a template, then this endpoint will be publicly accessible.
      parameters:
      - in: path
        name: page_id
        schema:
          type: integer
        description: Returns only the elements of the page related to the provided Id.
        required: true
      tags:
      - Builder elements
      security:
      - UserSource JWT: []
      - JWT: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Element_TypeElement'
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_PAGE_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_builder_page_element
      description: Creates a new builder element
      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: page_id
        schema:
          type: integer
        description: Creates an element for the builder page related to the provided value.
        required: true
      tags:
      - Builder elements
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Element_TypeCreateElement'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Element_TypeCreateElement'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Element_TypeCreateElement'
      security:
      - UserSource JWT: []
      - JWT: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Element_TypeElement'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Machine readable error indicating what went wrong.
                    enum:
                    - ERROR_ELEMENT_INVALID_FORMULA
                    - 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_PAGE_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:
    CheckboxElementCreateElement:
      type: object
      description: 'This serializer allow to set the type of an element and the element id before which

        we want to insert the new element.'
      properties:
        order:
          type: string
          format: decimal
          pattern: ^-?\d{0,20}(?:\.\d{0,20})?$
          readOnly: true
          description: Lowest first.
        before_id:
          type: integer
          description: If provided, creates the element before the element with the given id.
        type:
          allOf:
          - $ref: '#/components/schemas/TypeA5fEnum'
          description: 'The type of the element.


            * `heading` - heading

            * `text` - text

            * `rating` - rating

            * `rating_input` - rating_input

            * `link` - link

            * `image` - image

            * `input_text` - input_text

            * `column` - column

            * `button` - button

            * `table` - table

            * `repeat` - repeat

            * `record_selector` - record_selector

            * `form_container` - form_container

            * `choice` - choice

            * `checkbox` - checkbox

            * `iframe` - iframe

            * `datetime_picker` - datetime_picker

            * `header` - header

            * `footer` - footer

            * `menu` - menu

            * `simple_container` - simple_container

            * `auth_form` - auth_form

            * `input_file` - input_file'
        parent_element_id:
          type: integer
          nullable: true
          description: If provided, creates the element as a child of the element with the given id.
        place_in_container:
          type: string
          nullable: true
          description: The place in the container.
          maxLength: 255
        css_classes:
          type: string
          description: The additional CSS classes for this element.
          maxLength: 255
        visibility:
          allOf:
          - $ref: '#/components/schemas/Visibility789Enum'
          default: all
        visibility_condition:
          type: object
          additionalProperties: {}
          default:
            formula: ''
            version: '0.1'
            mode: simple
          description: Change element visibility depending on a formula value
        styles:
          $ref: '#/components/schemas/InputConfigBlock'
        style_border_top_color:
          type: string
          description: Top border color.
          maxLength: 255
        style_border_top_size:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Pixel height of the top border.
        style_padding_top:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Padding size of the top border.
        style_margin_top:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Margin size of the top border.
        style_border_bottom_color:
          type: string
          description: Bottom border color
          maxLength: 255
        style_border_bottom_size:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Pixel height of the bottom border.
        style_padding_bottom:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Padding size of the bottom border.
        style_margin_bottom:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Margin size of the bottom border.
        style_border_left_color:
          type: string
          description: Left border color
          maxLength: 255
        style_border_left_size:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Pixel height of the left border.
        style_padding_left:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Padding size of the left border.
        style_margin_left:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Margin size of the left border.
        style_background_radius:
          type: integer
          maximum: 32767
          minimum: -32768
          description: Background radius.
        style_border_radius:
          type: integer
          maximum: 32767
          minimum: -32768
          description: Border radius.
        style_border_right_color:
          type: string
          description: Right border color
          maxLength: 255
        style_border_right_size:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Pixel height of the right border.
        style_padding_right:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Padding size of the right border.
        style_margin_right:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Margin size of the right border.
        style_background:
          allOf:
          - $ref: '#/components/schemas/StyleBackgroundEnum'
          description: 'What type of background the element should have.


            * `none` - None

            * `color` - Color

            * `image` - Image'
        style_background_color:
          type: string
          description: The background color if `style_background` is color.
          maxLength: 255
        style_background_file:
          allOf:
          - $ref: '#/components/schemas/UserFile'
          nullable: true
          description: The background image file
        style_background_mode:
          allOf:
          - $ref: '#/components/schemas/StyleBackgroundModeEnum'
          description: 'The mode of the background image


            * `tile` - Tile

            * `fill` - Fill

            * `fit` - Fit'
        style_width:
          allOf:
          - $ref: '#/components/schemas/StyleWidthEnum'
          description: 'Indicates the width of the root element.


            * `full` - Full

            * `full-width` - Full Width

            * `normal` - Normal

            * `medium` - Medium

            * `small` - Small'
        style_width_child:
          allOf:
          - $ref: '#/components/schemas/StyleWidthChildEnum'
          description: 'Indicates the width of the child element.


            * `normal` - Normal

            * `medium` - Medium

            * `small` - Small'
        label:
          type: object
          additionalProperties: {}
          default:
            formula: ''
            version: '0.1'
            mode: simple
          description: The text label for this input
        default_value:
          type: object
          additionalProperties: {}
          default:
            formula: ''
            version: '0.1'
            mode: simple
          description: The input's default value.
        required:
          type: boolean
          default: false
          description: Whether this form element is a required field.
      required:
      - order
      - type
    HeaderElementCreateElement:
      type: object
      description: 'This serializer allow to set the type of an element and the element id before which

        we want to insert the new element.'
      properties:
        order:
          type: string
          format: decimal
          pattern: ^-?\d{0,20}(?:\.\d{0,20})?$
          readOnly: true
          description: Lowest first.
        before_id:
          type: integer
          description: If provided, creates the element before the element with the given id.
        type:
          allOf:
          - $ref: '#/components/schemas/TypeA5fEnum'
          description: 'The type of the element.


            * `heading` - heading

            * `text` - text

            * `rating` - rating

            * `rating_input` - rating_input

            * `link` - link

            * `image` - image

            * `input_text` - input_text

            * `column` - column

            * `button` - button

            * `table` - table

            * `repeat` - repeat

            * `record_selector` - record_selector

            * `form_container` - form_container

            * `choice` - choice

            * `checkbox` - checkbox

            * `iframe` - iframe

            * `datetime_picker` - datetime_picker

            * `header` - header

            * `footer` - footer

            * `menu` - menu

            * `simple_container` - simple_container

            * `auth_form` - auth_form

            * `input_file` - input_file'
        parent_element_id:
          type: integer
          nullable: true
          description: If provided, creates the element as a child of the element with the given id.
        place_in_container:
          type: string
          nullable: true
          description: The place in the container.
          maxLength: 255
        css_classes:
          type: string
          description: The additional CSS classes for this element.
          maxLength: 255
        visibility:
          allOf:
          - $ref: '#/components/schemas/Visibility789Enum'
          default: all
        visibility_condition:
          type: object
          additionalProperties: {}
          default:
            formula: ''
            version: '0.1'
            mode: simple
          description: Change element visibility depending on a formula value
        styles:
          description: The theme overrides for this element
        style_border_top_color:
          type: string
          description: Top border color.
          maxLength: 255
        style_border_top_size:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Pixel height of the top border.
        style_padding_top:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Padding size of the top border.
        style_margin_top:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Margin size of the top border.
        style_border_bottom_color:
          type: string
          description: Bottom border color
          maxLength: 255
        style_border_bottom_size:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Pixel height of the bottom border.
        style_padding_bottom:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Padding size of the bottom border.
        style_margin_bottom:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Margin size of the bottom border.
        style_border_left_color:
          type: string
          description: Left border color
          maxLength: 255
        style_border_left_size:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Pixel height of the left border.
        style_padding_left:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Padding size of the left border.
        style_margin_left:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Margin size of the left border.
        style_background_radius:
          type: integer
          maximum: 32767
          minimum: -32768
          description: Background radius.
        style_border_radius:
          type: integer
          maximum: 32767
          minimum: -32768
          description: Border radius.
        style_border_right_color:
          type: string
          description: Right border color
          maxLength: 255
        style_border_right_size:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Pixel height of the right border.
        style_padding_right:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Padding size of the right border.
        style_margin_right:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Margin size of the right border.
        style_background:
          allOf:
          - $ref: '#/components/schemas/StyleBackgroundEnum'
          description: 'What type of background the element should have.


            * `none` - None

            * `color` - Color

            * `image` - Image'
        style_background_color:
          type: string
          description: The background color if `style_background` is color.
          maxLength: 255
        style_background_file:
          allOf:
          - $ref: '#/components/schemas/UserFile'
          nullable: true
          description: The background image file
        style_background_mode:
          allOf:
          - $ref: '#/components/schemas/StyleBackgroundModeEnum'
          description: 'The mode of the background image


            * `tile` - Tile

            * `fill` - Fill

            * `fit` - Fit'
        style_width:
          allOf:
          - $ref: '#/components/schemas/StyleWidthEnum'
          description: 'Indicates the width of the root element.


            * `full` - Full

            * `full-width` - Full Width

            * `normal` - Normal

            * `medium` - Medium

            * `small` - Small'
        style_width_child:
          allOf:
          - $ref: '#/components/schemas/StyleWidthChildEnum'
          description: 'Indicates the width of the child element.


            * `normal` - Normal

            * `medium` - Medium

            * `small` - Small'
        share_type:
          $ref: '#/components/schemas/ShareTypeEnum'
        pages:
          type: array
          items:
            type: integer
      required:
      - order
      - type
    ButtonTextAlignmentEnum:
      enum:
      - left
      - center
      - right
      type: string
      description: '* `left` - Left

        * `center` - Center

        * `right` - Right'
    RatingElementUpdateElement:
      type: object
      properties:
        css_classes:
          type: string
          description: The additional CSS classes for this element.
          maxLength: 255
        visibility:
          $ref: '#/components/schemas/Visibility789Enum'
        visibility_condition:
          type: object
          additionalProperties: {}
          default:
            formula: ''
            version: '0.1'
            mode: simple
          description: Change element visibility depending on a formula value
        styles:
          description: The theme overrides for this element
        style_border_top_color:
          type: string
          description: Top border color.
          maxLength: 255
        style_border_top_size:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Pixel height of the top border.
        style_padding_top:
          type: integer
          maximum: 2147483647
          minimum

# --- truncated at 32 KB (681 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/baserow/refs/heads/main/openapi/baserow-builder-elements-api-openapi.yml