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

# Upload Semantic Layer Metadata

> Upload a metadata file describing the dataset. A `.md`/`.txt` doc sets the free-text context; a `.csv`/`.json` file fills per-column descriptions/units. Merges into the dataset's semantic layer.



## OpenAPI

````yaml /openapi.json post /datasets/{dataset_id}/semantic-metadata
openapi: 3.1.0
info:
  title: Woodwide API
  description: API service for the Woodwide platform
  version: 0.1.0
servers:
  - url: https://api.woodwide.ai
    description: Production
security: []
paths:
  /datasets/{dataset_id}/semantic-metadata:
    post:
      tags:
        - Datasets
      summary: Upload Semantic Layer Metadata
      description: >-
        Upload a metadata file describing the dataset. A `.md`/`.txt` doc sets
        the free-text context; a `.csv`/`.json` file fills per-column
        descriptions/units. Merges into the dataset's semantic layer.
      operationId: upload_semantic_metadata_datasets__dataset_id__semantic_metadata_post
      parameters:
        - name: dataset_id
          in: path
          required: true
          schema:
            type: string
            title: Dataset Id
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_upload_semantic_metadata_datasets__dataset_id__semantic_metadata_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dataset'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    Body_upload_semantic_metadata_datasets__dataset_id__semantic_metadata_post:
      properties:
        file:
          type: string
          format: binary
          contentMediaType: application/octet-stream
          title: File
      type: object
      required:
        - file
      title: >-
        Body_upload_semantic_metadata_datasets__dataset_id__semantic_metadata_post
    Dataset:
      properties:
        id:
          type: string
          title: Id
          description: Public ID of the dataset (e.g. ds_A8K2P9QX).
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        context_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Context Text
          description: Free-form 'about this data' context.
        entity:
          anyOf:
            - $ref: '#/components/schemas/DatasetEntity'
            - type: 'null'
          description: The dataset's main entity (what a row represents).
        current_version:
          anyOf:
            - $ref: >-
                #/components/schemas/woodwide__api__routers__datasets__schemas__CurrentVersion
            - type: 'null'
        is_archived:
          type: boolean
          title: Is Archived
          description: True if the dataset has been soft-deleted.
          default: false
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - name
        - created_at
        - updated_at
      title: Dataset
      description: Dataset response model.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DatasetEntity:
      properties:
        column:
          type: string
          title: Column
          description: Column that identifies the entity.
        label:
          type: string
          title: Label
          description: Singular noun label, e.g. 'customer'.
        source:
          type: string
          title: Source
          description: '''auto'' = AI-suggested, ''user'' = user-picked.'
      type: object
      required:
        - column
        - label
        - source
      title: DatasetEntity
      description: The dataset's main entity (what a single row represents).
    woodwide__api__routers__datasets__schemas__CurrentVersion:
      properties:
        id:
          type: string
          title: Id
          description: Public ID of the version (e.g. dsv_A8K2P9QX).
        version:
          type: integer
          title: Version
        status:
          type: string
          title: Status
          description: 'Version status: processing, ready, or failed.'
        schema_json:
          additionalProperties: true
          type: object
          title: Schema Json
          description: Inferred column schema.
        byte_size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Byte Size
          description: Size of the dataset version in bytes.
        row_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Row Count
          description: Number of rows in the dataset version.
        column_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Column Count
          description: >-
            Number of columns in the version's schema. Sent even in list
            responses, which omit `schema_json` — deriving it client-side from
            `schema_json` therefore always yielded null there.
        ingest_job_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Ingest Job Id
          description: Public ID of the ingestion job that created this version.
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: When the version was created.
        ready_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ready At
          description: When the version became ready for use.
        source_type:
          type: string
          title: Source Type
          description: Dataset version source type.
          default: file_upload
        source_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Provider
          description: Database provider for imports.
        source_connection_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Source Connection Id
          description: Source data connection ID for imports.
        source_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Label
          description: File, table, or query label.
        source_snapshot:
          additionalProperties: true
          type: object
          title: Source Snapshot
          description: Source metadata captured when this version was created.
      type: object
      required:
        - id
        - version
        - status
      title: CurrentVersion
      description: Current version detail (all DatasetVersion fields except dataset_id).
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````