> ## Documentation Index
> Fetch the complete documentation index at: https://docs.outerproduct.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Workspace Table



## OpenAPI

````yaml https://api.outerproduct.com/openapi.json post /v1/workspaces/{workspace_id}:createTable
openapi: 3.1.0
info:
  title: OuterProduct API
  description: >-
    Public-facing REST API for OuterProduct model distillation, prediction, and
    explanation.
  version: 0.1.8
servers: []
security: []
paths:
  /v1/workspaces/{workspace_id}:createTable:
    post:
      tags:
        - workspace
      summary: Create Workspace Table
      operationId: create_workspace_table_v1_workspaces__workspace_id__createTable_post
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-z0-9](?:[a-z0-9._~-]*[a-z0-9])?$
            title: Workspace Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_create_workspace_table_v1_workspaces__workspace_id__createTable_post
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Table-Output'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    Body_create_workspace_table_v1_workspaces__workspace_id__createTable_post:
      properties:
        catalogId:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,62}$
          title: Catalogid
        schemaId:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,62}$
          title: Schemaid
        tableId:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,62}$
          title: Tableid
        table:
          $ref: '#/components/schemas/Table-Input'
      type: object
      required:
        - catalogId
        - schemaId
        - tableId
        - table
      title: >-
        Body_create_workspace_table_v1_workspaces__workspace_id__createTable_post
    Table-Output:
      properties:
        name:
          type: string
          pattern: >-
            ^workspaces/[a-z0-9](?:[a-z0-9._~-]*[a-z0-9])?/catalogs/[a-z][a-z0-9_]{0,62}/schemas/[a-z][a-z0-9_]{0,62}/tables/[a-z][a-z0-9_]{0,62}$
          title: Name
          description: >-
            Resource name in the form

            `workspaces/{workspace}/catalogs/{catalog}/schemas/{schema}/tables/{table}`.


            The terminal resource ID is the SQL-visible table name.
        spec:
          $ref: '#/components/schemas/TableSpec-Output'
          description: Definition used to construct this table.
        createTime:
          anyOf:
            - type: string
            - type: 'null'
          title: Createtime
          description: Time at which the table was created.
        updateTime:
          anyOf:
            - type: string
            - type: 'null'
          title: Updatetime
          description: Time at which the table was most recently updated.
        revision:
          type: string
          title: Revision
          description: Monotonically increasing revision of this table definition.
          default: '0'
        revisionHash:
          type: string
          title: Revisionhash
          description: Lowercase SHA-256 hash of the canonical stored table definition.
          default: ''
      type: object
      required:
        - spec
        - name
      title: Table
      description: A SQL-visible table owned by its parent schema.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Table-Input:
      properties:
        name:
          type: string
          pattern: >-
            ^workspaces/[a-z0-9](?:[a-z0-9._~-]*[a-z0-9])?/catalogs/[a-z][a-z0-9_]{0,62}/schemas/[a-z][a-z0-9_]{0,62}/tables/[a-z][a-z0-9_]{0,62}$
          title: Name
          description: >-
            Resource name in the form

            `workspaces/{workspace}/catalogs/{catalog}/schemas/{schema}/tables/{table}`.


            The terminal resource ID is the SQL-visible table name.
          default: ''
        spec:
          $ref: '#/components/schemas/TableSpec-Input'
          description: Definition used to construct this table.
        createTime:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createtime
          description: Time at which the table was created.
        updateTime:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updatetime
          description: Time at which the table was most recently updated.
        revision:
          type: integer
          title: Revision
          description: Monotonically increasing revision of this table definition.
          default: 0
        revisionHash:
          type: string
          title: Revisionhash
          description: Lowercase SHA-256 hash of the canonical stored table definition.
          default: ''
      type: object
      required:
        - spec
      title: Table
      description: A SQL-visible table owned by its parent schema.
    TableSpec-Output:
      properties:
        relational:
          anyOf:
            - $ref: '#/components/schemas/RelationalTableSpec'
            - type: 'null'
          description: >-
            A table backed by one relational source table.

            Only one of the fields can be specified with: ["relational",
            "listing"] (oneof spec)
        listing:
          anyOf:
            - $ref: '#/components/schemas/ListingTableSpec-Output'
            - type: 'null'
          description: >-
            A table backed by files in an object store.

            Only one of the fields can be specified with: ["relational",
            "listing"] (oneof spec)
      type: object
      title: TableSpec
      description: A strongly typed table definition.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TableSpec-Input:
      properties:
        relational:
          anyOf:
            - $ref: '#/components/schemas/RelationalTableSpec'
            - type: 'null'
          description: >-
            A table backed by one relational source table.

            Only one of the fields can be specified with: ["relational",
            "listing"] (oneof spec)
        listing:
          anyOf:
            - $ref: '#/components/schemas/ListingTableSpec-Input'
            - type: 'null'
          description: >-
            A table backed by files in an object store.

            Only one of the fields can be specified with: ["relational",
            "listing"] (oneof spec)
      type: object
      title: TableSpec
      description: A strongly typed table definition.
    RelationalTableSpec:
      properties:
        connector:
          type: string
          pattern: >-
            ^workspaces/[a-z0-9](?:[a-z0-9._~-]*[a-z0-9])?/connectors/[a-z0-9](?:[a-z0-9._~-]*[a-z0-9])?$
          title: Connector
          description: Connector used to query the source table.
        sourceCatalog:
          type: string
          minLength: 1
          title: Sourcecatalog
          description: Source catalog containing the table.
        sourceSchema:
          type: string
          minLength: 1
          title: Sourceschema
          description: Source schema containing the table.
        sourceTable:
          type: string
          minLength: 1
          title: Sourcetable
          description: Source table selected through the connector.
        snapshot:
          anyOf:
            - $ref: '#/components/schemas/RelationalTableSnapshot'
            - type: 'null'
          description: >-
            Optional source snapshot used instead of rediscovering the table
            schema.
      type: object
      required:
        - connector
        - sourceCatalog
        - sourceSchema
        - sourceTable
      title: RelationalTableSpec
      description: One relation queried through a relational connector.
    ListingTableSpec-Output:
      properties:
        connector:
          type: string
          pattern: >-
            ^workspaces/[a-z0-9](?:[a-z0-9._~-]*[a-z0-9])?/connectors/[a-z0-9](?:[a-z0-9._~-]*[a-z0-9])?$
          title: Connector
          description: Object-store connector used to discover and read the table.
        tablePaths:
          items:
            type: string
          type: array
          minItems: 1
          title: Tablepaths
          description: >-
            Paths must all resolve to the same object-store registration
            identity.
        snapshot:
          anyOf:
            - $ref: '#/components/schemas/ListingTableSnapshot-Output'
            - type: 'null'
          description: >-
            Optional constructor snapshot. Missing fields are inferred by
            DataFusion.
      type: object
      required:
        - connector
        - tablePaths
      title: ListingTableSpec
      description: One table inferred from one or more absolute object-store URLs.
    ListingTableSpec-Input:
      properties:
        connector:
          type: string
          pattern: >-
            ^workspaces/[a-z0-9](?:[a-z0-9._~-]*[a-z0-9])?/connectors/[a-z0-9](?:[a-z0-9._~-]*[a-z0-9])?$
          title: Connector
          description: Object-store connector used to discover and read the table.
        tablePaths:
          items:
            type: string
          type: array
          minItems: 1
          title: Tablepaths
          description: >-
            Paths must all resolve to the same object-store registration
            identity.
        snapshot:
          anyOf:
            - $ref: '#/components/schemas/ListingTableSnapshot-Input'
            - type: 'null'
          description: >-
            Optional constructor snapshot. Missing fields are inferred by
            DataFusion.
      type: object
      required:
        - connector
        - tablePaths
      title: ListingTableSpec
      description: One table inferred from one or more absolute object-store URLs.
    RelationalTableSnapshot:
      properties:
        schema:
          $ref: '#/components/schemas/ArrowIpcSchema'
          description: Arrow schema observed for the source table.
      type: object
      required:
        - schema
      title: RelationalTableSnapshot
      description: Constructor snapshot for one relational table.
    ListingTableSnapshot-Output:
      properties:
        fileSchema:
          anyOf:
            - $ref: '#/components/schemas/ArrowIpcSchema'
            - type: 'null'
          description: >-
            Physical columns stored in the listed files, excluding partition
            columns.
        options:
          anyOf:
            - $ref: '#/components/schemas/ListingTableOptions-Output'
            - type: 'null'
          description: >-
            File discovery and format options. Omission selects runtime
            inference.
      type: object
      title: ListingTableSnapshot
      description: Optional constructor snapshot for a DataFusion listing table.
    ListingTableSnapshot-Input:
      properties:
        fileSchema:
          anyOf:
            - $ref: '#/components/schemas/ArrowIpcSchema'
            - type: 'null'
          description: >-
            Physical columns stored in the listed files, excluding partition
            columns.
        options:
          anyOf:
            - $ref: '#/components/schemas/ListingTableOptions-Input'
            - type: 'null'
          description: >-
            File discovery and format options. Omission selects runtime
            inference.
      type: object
      title: ListingTableSnapshot
      description: Optional constructor snapshot for a DataFusion listing table.
    ArrowIpcSchema:
      properties:
        ipcMessage:
          type: string
          minLength: 1
          contentEncoding: base64
          contentMediaType: application/octet-stream
          title: Ipcmessage
      type: object
      required:
        - ipcMessage
      title: ArrowIpcSchema
      description: >-
        An Arrow schema encoded as one canonical Arrow IPC schema message.


        The bytes contain only schema metadata, not an IPC stream, file,
        dictionary,

        record batch, or continuation marker. Consumers must reject any other
        IPC

        payload kind.
    ListingTableOptions-Output:
      properties:
        fileType:
          type: string
          minLength: 1
          title: Filetype
          description: >-
            Session file-format factory name, such as `parquet`, `csv`, or
            `json`.
        formatOptions:
          additionalProperties:
            type: string
          type: object
          title: Formatoptions
          description: Options passed to the selected file-format factory.
        fileExtension:
          type: string
          title: Fileextension
          description: Suffix used to select files beneath each table path.
          default: ''
        tablePartitionSchema:
          anyOf:
            - $ref: '#/components/schemas/ArrowIpcSchema'
            - type: 'null'
          description: Ordered partition fields appended to the physical file schema.
        collectStat:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Collectstat
          description: Whether DataFusion should collect file statistics while listing.
        targetPartitions:
          anyOf:
            - type: string
              gt: 0
            - type: 'null'
          title: Targetpartitions
          description: Target number of file-scan partitions.
      type: object
      required:
        - fileType
      title: ListingTableOptions
      description: Serializable subset of DataFusion ListingOptions.
    ListingTableOptions-Input:
      properties:
        fileType:
          type: string
          minLength: 1
          title: Filetype
          description: >-
            Session file-format factory name, such as `parquet`, `csv`, or
            `json`.
        formatOptions:
          additionalProperties:
            type: string
          type: object
          title: Formatoptions
          description: Options passed to the selected file-format factory.
        fileExtension:
          type: string
          title: Fileextension
          description: Suffix used to select files beneath each table path.
          default: ''
        tablePartitionSchema:
          anyOf:
            - $ref: '#/components/schemas/ArrowIpcSchema'
            - type: 'null'
          description: Ordered partition fields appended to the physical file schema.
        collectStat:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Collectstat
          description: Whether DataFusion should collect file statistics while listing.
        targetPartitions:
          anyOf:
            - type: integer
              gt: 0
            - type: 'null'
          title: Targetpartitions
          description: Target number of file-scan partitions.
      type: object
      required:
        - fileType
      title: ListingTableOptions
      description: Serializable subset of DataFusion ListingOptions.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key or OAuth2/OIDC access token
      description: >-
        An API key or OAuth2/OIDC access token sent as `Authorization: Bearer
        <token>`.

````