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

# Get import dataset schema

> Get the historical schema of an import dataset.



## OpenAPI

````yaml /generated/openapi-import-generated-2023-12-01.json get /import/datasets/{id}/schema
openapi: 3.1.0
info:
  title: Prequel Data Import
  description: Data Import API spec
  version: '2023-12-01'
servers:
  - url: https://api.prequel.co
    description: Cloud-hosted server (US)
  - url: https://eu-api.prequel.co
    description: Cloud-hosted server (EU)
  - url: https://{custom_host}
    description: Self-hosted Prequel API host
security:
  - ApiKeyAuth: []
paths:
  /import/datasets/{id}/schema:
    get:
      tags:
        - Import Datasets
      summary: Get import dataset schema
      description: Get the historical schema of an import dataset.
      operationId: get-import-dataset-schema
      parameters:
        - name: id
          in: path
          required: true
          description: Import Dataset ID.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    $ref: '#/components/schemas/GetDatasetSchemaResponse'
                    $schema: https://json-schema.org/draft/2020-12/schema
                    $id: >-
                      https://github.com/prequel-co/datafeed/internal/import/api/models/get-dataset-schema-response
                  message:
                    type: string
                type: object
                required:
                  - status
                  - data
                  - message
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    GetDatasetSchemaResponse:
      properties:
        columns:
          items:
            $ref: '#/components/schemas/DatasetSchemaColumn'
          type: array
      additionalProperties: false
      type: object
      required:
        - columns
    DatasetSchemaColumn:
      properties:
        column_name:
          type: string
          title: Column Name
          description: The name of the column in the dataset.
        prequel_type:
          type: string
          title: Prequel Type
          description: The most recent normalized Prequel data type for this column.
        source_type:
          type: string
          title: Source Type
          description: The most recent raw data type from the source for this column.
        seen_source_types:
          items:
            type: string
          type: array
          title: Seen Source Types
          description: All distinct raw source types seen historically for this column.
        seen_prequel_types:
          items:
            type: string
          type: array
          title: Seen Prequel Types
          description: >-
            All distinct normalized Prequel types seen historically for this
            column.
        in_latest_extract:
          type: boolean
          title: In Latest Extract
          description: >-
            Indicates if this column was present in the most recent successful
            extract.
        first_seen_at:
          type: string
          title: First Seen At
          description: The timestamp when this column was first extracted.
        last_seen_at:
          type: string
          title: Last Seen At
          description: The timestamp when this column was most recently extracted.
      additionalProperties: false
      type: object
      required:
        - column_name
        - prequel_type
        - source_type
        - seen_source_types
        - seen_prequel_types
        - in_latest_extract
        - first_seen_at
        - last_seen_at
    ErrorResponse:
      properties:
        status:
          type: string
          const: error
        message:
          type: string
        data:
          type: 'null'
      type: object
      required:
        - status
        - message
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````