Budibase Tables API

Manage data tables inside an application.

OpenAPI Specification

budibase-tables-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Budibase Public Applications Tables API
  description: 'The Budibase Public API provides programmatic access to Budibase applications, tables,

    rows, users, and queries. Authentication is via an API key in the `x-budibase-api-key`

    header generated from the Budibase portal user dropdown menu.


    Data endpoints (tables and rows) additionally require the `x-budibase-app-id` header

    identifying the target application.

    '
  version: '1.0'
  contact:
    name: Budibase
    url: https://docs.budibase.com/docs/public-api
  license:
    name: GPL-3.0
    url: https://github.com/Budibase/budibase/blob/master/LICENSE
servers:
- url: https://budibase.app/api/public/v1
  description: Budibase Cloud Public API
- url: https://{selfhosted}/api/public/v1
  description: Self-hosted Budibase
  variables:
    selfhosted:
      default: budibase.example.com
      description: Hostname of the self-hosted Budibase instance
security:
- apiKeyAuth: []
tags:
- name: Tables
  description: Manage data tables inside an application.
paths:
  /tables:
    get:
      tags:
      - Tables
      summary: Search for tables
      operationId: searchTables
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NameSearch'
      responses:
        '200':
          description: Search results
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/TableOutput'
    post:
      tags:
      - Tables
      summary: Create a table
      operationId: createTable
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TableInput'
      responses:
        '200':
          description: Created table
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableOutput'
  /tables/{id}:
    parameters:
    - $ref: '#/components/parameters/IdPath'
    get:
      tags:
      - Tables
      summary: Retrieve a table
      operationId: getTable
      responses:
        '200':
          description: Table
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableOutput'
    put:
      tags:
      - Tables
      summary: Update a table
      operationId: updateTable
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TableInput'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableOutput'
    delete:
      tags:
      - Tables
      summary: Delete a table
      operationId: deleteTable
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableOutput'
components:
  schemas:
    Column:
      type: object
      properties:
        name:
          type: string
        type:
          type: string
          enum:
          - string
          - longform
          - options
          - number
          - boolean
          - datetime
          - attachment
          - link
          - formula
          - array
        constraints:
          type: object
    TableOutput:
      allOf:
      - type: object
        properties:
          _id:
            type: string
          createdAt:
            type: string
            format: date-time
          updatedAt:
            type: string
            format: date-time
      - $ref: '#/components/schemas/TableInput'
    NameSearch:
      type: object
      properties:
        name:
          type: string
        paginate:
          type: boolean
        bookmark:
          type: string
        sort:
          type: object
          properties:
            order:
              type: string
              enum:
              - ascending
              - descending
            type:
              type: string
              enum:
              - string
              - number
    TableInput:
      type: object
      required:
      - name
      - schema
      properties:
        name:
          type: string
        primaryDisplay:
          type: string
        schema:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Column'
  parameters:
    IdPath:
      name: id
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-budibase-api-key
      description: API key generated from the Budibase portal user dropdown menu.