> ## 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 version and its files

> A version with signed links to its files: the full snapshot, the
changes from the version before it, and its schema. Links expire
after `files.expiresAt`; ask again for fresh ones.




## OpenAPI

````yaml /platforms/openapi.yaml get /v1/datasets/{datasetId}/versions/{version}
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}/versions/{version}:
    get:
      tags:
        - Versions
      summary: Get a version and its files
      description: |
        A version with signed links to its files: the full snapshot, the
        changes from the version before it, and its schema. Links expire
        after `files.expiresAt`; ask again for fresh ones.
      operationId: getDatasetVersion
      parameters:
        - $ref: '#/components/parameters/datasetId'
        - $ref: '#/components/parameters/version'
        - name: format
          in: query
          description: File format. GeoParquet unless given.
          schema:
            type: string
            enum:
              - geoparquet
              - csv
            default: geoparquet
      responses:
        '200':
          description: The version with its files.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VersionWithFiles'
        '404':
          $ref: '#/components/responses/NotFound'
        '410':
          description: |
            The version's files are past retention. Load the current version's
            snapshot instead.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    datasetId:
      name: datasetId
      in: path
      required: true
      schema:
        type: string
      example: ds_orange_fl_building_permits
    version:
      name: version
      in: path
      required: true
      schema:
        type: integer
        minimum: 1
  schemas:
    VersionWithFiles:
      allOf:
        - $ref: '#/components/schemas/Version'
        - type: object
          required:
            - files
          properties:
            files:
              type: object
              required:
                - snapshot
                - changes
                - schema
                - expiresAt
              properties:
                snapshot:
                  type: array
                  description: The full dataset at this version, in parts.
                  items:
                    $ref: '#/components/schemas/File'
                changes:
                  type: array
                  description: >-
                    Changes from the previous version. Empty for a first
                    version.
                  items:
                    $ref: '#/components/schemas/File'
                schema:
                  $ref: '#/components/schemas/File'
                expiresAt:
                  type: string
                  format: date-time
    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
    Version:
      type: object
      required:
        - datasetId
        - version
        - schemaVersion
        - publishedAt
        - rowCount
        - counts
      properties:
        datasetId:
          type: string
        version:
          type: integer
        previousVersion:
          type:
            - integer
            - 'null'
        schemaVersion:
          type: string
        publishedAt:
          type: string
          format: date-time
        sourceFetchedAt:
          type: string
          format: date-time
          description: When Ploti read this version from the source.
        rowCount:
          type: integer
        counts:
          type: object
          required:
            - added
            - changed
            - removed
          properties:
            added:
              type: integer
            changed:
              type: integer
            removed:
              type: integer
        resyncRequired:
          type: boolean
          description: |
            True when this version's changes cannot be applied to the version
            before it (the key columns changed). Load its snapshot instead.
    File:
      type: object
      required:
        - url
        - format
        - rows
        - bytes
        - sha256
      properties:
        url:
          type: string
          format: uri
        format:
          type: string
          enum:
            - geoparquet
            - csv
            - json
        rows:
          type: integer
        bytes:
          type: integer
        sha256:
          type: string
  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.