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

# Get a dataset's schema

> The columns of the current version, or of `version` when given, and
how the schema differs from the schema before it.




## OpenAPI

````yaml /platforms/openapi.yaml get /v1/datasets/{datasetId}/schema
openapi: 3.1.0
info:
  title: Ploti Data Feeds API
  version: 1.0.0
  description: |
    Early access: contact support@ploti.ai to set up a subscription.

    Public records from the places your workspace covers, delivered to your
    own systems. Subscribe to counties, load each dataset's snapshot once,
    then apply each new version's changes as Ploti publishes them.

    Every call acts as the workspace member who holds the API key. Lists that
    page take `limit` and `cursor` and return `nextCursor`, null on the last
    page. Fields are camelCase. A refusal is
    `{ "error": { "code", "message", "links" } }`.
servers:
  - url: https://api.ploti.ai
security:
  - bearerAuth: []
tags:
  - name: Places
    description: The counties a workspace can subscribe to.
  - name: Datasets
    description: What each dataset holds, where it comes from and how it is shaped.
  - name: Versions
    description: Each published version of a dataset, its files and its changes.
  - name: Subscriptions
    description: The places, topics and datasets you receive, and where they are delivered.
  - name: Events
    description: An ordered, replayable log of what changed in a subscription.
paths:
  /v1/datasets/{datasetId}/schema:
    get:
      tags:
        - Datasets
      summary: Get a dataset's schema
      description: |
        The columns of the current version, or of `version` when given, and
        how the schema differs from the schema before it.
      operationId: getDatasetSchema
      parameters:
        - $ref: '#/components/parameters/datasetId'
        - name: version
          in: query
          description: A dataset version. Defaults to the current one.
          schema:
            type: integer
            minimum: 1
      responses:
        '200':
          description: The schema.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Schema'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    datasetId:
      name: datasetId
      in: path
      required: true
      schema:
        type: string
      example: ds_orange_fl_building_permits
  schemas:
    Schema:
      type: object
      required:
        - datasetId
        - schemaVersion
        - firstVersion
        - columns
        - keyColumns
      properties:
        datasetId:
          type: string
        schemaVersion:
          type: string
          description: |
            `MAJOR.MINOR`. MINOR goes up for additive changes; MAJOR for
            changes that can break a consumer.
          examples:
            - '2.1'
        firstVersion:
          type: integer
          description: The first dataset version with this schema.
        columns:
          type: array
          items:
            $ref: '#/components/schemas/Column'
        keyColumns:
          type: array
          items:
            type: string
        envelopeColumns:
          type: array
          description: The `_ploti_` columns every file carries.
          items:
            $ref: '#/components/schemas/Column'
        changeFromPrevious:
          oneOf:
            - $ref: '#/components/schemas/SchemaChange'
            - type: 'null'
    Column:
      type: object
      required:
        - name
        - type
        - nullable
      properties:
        name:
          type: string
          examples:
            - issued_date
        type:
          type: string
          enum:
            - string
            - integer
            - number
            - boolean
            - date
            - timestamp
            - geometry
            - json
        nullable:
          type: boolean
        description:
          type: string
          examples:
            - The date the permit was issued.
        sourceName:
          type: string
          description: The column's name at the source, when Ploti renamed it.
          examples:
            - ISSUE_DT
    SchemaChange:
      type: object
      required:
        - kind
        - previousSchemaVersion
      properties:
        kind:
          type: string
          enum:
            - additive
            - breaking
          description: |
            `additive`: columns added or made nullable. `breaking`: columns
            removed, renamed or retyped, or the key columns changed.
        previousSchemaVersion:
          type: string
          examples:
            - '1.4'
        added:
          type: array
          items:
            $ref: '#/components/schemas/Column'
        removed:
          type: array
          items:
            type: string
        retyped:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              from:
                type: string
              to:
                type: string
        keyColumnsChanged:
          type: boolean
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              examples:
                - not_found
                - outside_coverage
                - not_distributable
                - cursor_expired
            message:
              type: string
            links:
              type: object
              additionalProperties:
                type: string
                format: uri
  responses:
    NotFound:
      description: Not found, or not in the workspace's coverage.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An API key from Settings, API keys, with the `feeds` scope.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.