Logik.io Managed Tables > Tables API

Listing all Tables and working with indiviudal Tables

OpenAPI Specification

logikio-managed-tables-tables-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Logik.io Admin API - Blueprint Import/Export Blueprint > Export Managed Tables > Tables API
  description: APIs with which to import and export Logik.io Blueprints. Useful for taking backups and executing migrations among environments.
  version: 1.0.0
  contact:
    email: support@logik.io
servers:
- url: https://{tenant}.{sector}.logik.io
  description: Logik Environment
  variables:
    tenant:
      default: example
      description: Logik.io tenant
    sector:
      default: test
      description: Logik.io sector
security:
- bearerAuth: []
tags:
- name: Managed Tables > Tables
  description: Listing all Tables and working with indiviudal Tables
paths:
  /api/managedTables/v1/managedTables:
    get:
      tags:
      - Managed Tables > Tables
      summary: List All Tables
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedTableResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/NotAuthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        5XX:
          $ref: '#/components/responses/ServerError'
    post:
      tags:
      - Managed Tables > Tables
      summary: Create a new Table
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManagedTableCreatePayload'
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedTableCreateResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/NotAuthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        5XX:
          $ref: '#/components/responses/ServerError'
  /api/managedTables/v2/managedTables/{tableName}:
    get:
      tags:
      - Managed Tables > Tables
      summary: Get Table Data and Metadata
      parameters:
      - name: tableName
        in: path
        schema:
          type: string
        required: true
        description: Name of the Managed Table
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/NotAuthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        5XX:
          $ref: '#/components/responses/ServerError'
    delete:
      tags:
      - Managed Tables > Tables
      summary: Delete Table
      parameters:
      - name: tableName
        in: path
        schema:
          type: string
        required: true
        description: Name of the Managed Table
      responses:
        '204':
          description: Successful response
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/NotAuthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        5XX:
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    Sort:
      type: object
      properties:
        empty:
          type: boolean
        unsorted:
          type: boolean
        sorted:
          type: boolean
    ColumnMetadata:
      type: object
      required:
      - name
      - description
      - type
      properties:
        name:
          type: string
        type:
          type: string
          enum:
          - text
          - number
        description:
          type: string
    TableResponse:
      properties:
        content:
          type: array
          items:
            $ref: '#/components/schemas/ColumnResponse'
        pageable:
          $ref: '#/components/schemas/Pageable'
        totalPages:
          type: number
        totalElements:
          type: number
        last:
          type: boolean
        size:
          type: number
        number:
          type: number
        sort:
          $ref: '#/components/schemas/Sort'
        first:
          type: boolean
        numberOfElements:
          type: number
        empty:
          type: boolean
    ColumnWithId:
      type: object
      properties:
        ID:
          type: number
        additionalProperties:
          type: string
    ColumnResponse:
      type: object
      allOf:
      - properties:
          DATE_MODIFIED:
            type: string
          DATE_CREATED:
            type: string
      - $ref: '#/components/schemas/ColumnWithId'
    ManagedTableCreateResponse:
      properties:
        dateCreated:
          type: string
        dateModified:
          type: string
        lastModifiedBy:
          type: string
        name:
          type: string
        columns:
          type: array
          items:
            $ref: '#/components/schemas/Column'
        description:
          type: string
    ErrorResponse:
      properties:
        errorCode:
          type: string
        errorMessage:
          type: string
        timestamp:
          type: string
          format: date-time
    ManagedTableCreatePayload:
      required:
      - name
      - description
      - columns
      properties:
        name:
          type: string
        description:
          type: string
        columns:
          type: array
          items:
            $ref: '#/components/schemas/ColumnMetadata'
    Column:
      type: object
      allOf:
      - $ref: '#/components/schemas/ColumnMetadata'
      - properties:
          orderNumber:
            type: integer
    Pageable:
      type: object
      properties:
        sort:
          $ref: '#/components/schemas/Sort'
        offset:
          type: number
        pageNumber:
          type: number
        pageSize:
          type: number
        paged:
          type: boolean
        unpaged:
          type: boolean
    ManagedTableResponse:
      type: object
      properties:
        content:
          type: array
          items:
            $ref: '#/components/schemas/ManagedTableCreateResponse'
        pageable:
          $ref: '#/components/schemas/Pageable'
        totalPages:
          type: number
        totalElements:
          type: number
        last:
          type: boolean
        size:
          type: number
        number:
          type: number
        sort:
          $ref: '#/components/schemas/Sort'
        first:
          type: boolean
        numberOfElements:
          type: number
        empty:
          type: boolean
      example:
        content:
        - dateCreated: 2023-05-30 21:19:32.650000+00:00
          dateModified: 2023-05-30 21:19:55.210000+00:00
          lastModifiedBy: NO_USER_ID
          name: packersTable
          columns:
          - name: a
            type: text
            description: ''
            orderNumber: 1
          - name: b
            type: text
            description: ''
            orderNumber: 2
          description: ''
        - dateCreated: 2023-05-31 02:34:32.749000+00:00
          dateModified: 2023-05-31 02:34:32.749000+00:00
          lastModifiedBy: NO_USER_ID
          name: shapes
          columns:
          - name: sides
            type: number
            description: ''
            orderNumber: 1
          - name: shape
            type: text
            description: ''
            orderNumber: 2
          description: ''
        pageable:
          sort:
            empty: false
            unsorted: false
            sorted: true
          offset: 0
          pageNumber: 0
          pageSize: 100
          paged: true
          unpaged: false
        totalPages: 1
        totalElements: 2
        last: true
        size: 100
        number: 0
        sort:
          empty: false
          unsorted: false
          sorted: true
        first: true
        numberOfElements: 2
        empty: false
  responses:
    ServerError:
      description: Unexpected Server Error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            errorCode: LGK-82DB4CF583054DF0930EDE9BE
            errorMessage: An unexpected error occurred.
            timestamp: '2023-05-31T02:42:40.087287033Z'
    NotAuthorized:
      description: Authorization information is missing or invalid.
    BadRequest:
      description: Bad request. See `errorMessage` for additional details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            errorCode: LGK-7A407E7202264005AD03A14D9
            errorMessage: Rows must not be empty.
            timestamp: '2023-05-31T02:08:58.235882682Z'
    NotFound:
      description: Resource was not found. See `errorMessage` for additional details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            errorCode: LGK-C2BD5E131995442CABF255BCD
            errorMessage: LOGIK_OBJECT 'OBJECT_VARIABLE_NAME' was not found.
            timestamp: '2023-05-31T02:07:58.447433023Z'
    Forbidden:
      description: Credentials are valid but insufficient privileges to perform the action on the resource.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Admin API Bearer Token