Felt Layer Exports API

With these APIs, you can export data to CSV, GeoJSON, and other formats.

OpenAPI Specification

felt-layer-exports-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: Felt REST API v2.0
  title: Felt Comments Layer Exports API
  version: '2.0'
servers:
- url: https://felt.com
  variables: {}
security: []
tags:
- description: 'With these APIs, you can export data to CSV, GeoJSON, and other formats.

    '
  name: Layer Exports
  x-page-description: APIs to export layer data
  x-page-icon: layer-group
  x-parent: Layers
paths:
  /api/v2/maps/{map_id}/layers/{layer_id}/get_export_link:
    get:
      callbacks: {}
      description: 'Generate a direct download link for layer data export.


        Get a link to export a layer as a GeoPackage (vector layers) or GeoTIFF (raster layers).

        '
      operationId: create_map_layer_export_link
      parameters:
      - description: The ID of the map where the layer is located
        in: path
        name: map_id
        required: true
        schema:
          type: string
      - description: The ID of the layer to export
        in: path
        name: layer_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExportLink'
          description: Export link
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
          description: UnauthorizedError
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
          description: UnauthorizedError
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: NotFoundError
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonErrorResponse'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
          description: InternalServerError
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableError'
          description: ServiceUnavailableError
      security:
      - bearerAuth: []
      summary: Create layer export link
      tags:
      - Layer Exports
  /api/v2/maps/{map_id}/layers/{layer_id}/custom_exports/{export_id}:
    get:
      callbacks: {}
      description: 'Check the processing status and download availability of a custom export request.


        If the export is successful, the response will include a `download_url` for accessing the exported data.

        '
      operationId: poll_map_layer_custom_export
      parameters:
      - description: The ID of the map where the layer is located
        in: path
        name: map_id
        required: true
        schema:
          type: string
      - description: The ID of the layer to export
        in: path
        name: layer_id
        required: true
        schema:
          type: string
      - description: The ID of the export
        in: path
        name: export_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomExportRequestStatus'
          description: Custom export request status
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
          description: UnauthorizedError
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
          description: UnauthorizedError
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: NotFoundError
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonErrorResponse'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
          description: InternalServerError
      security:
      - bearerAuth: []
      summary: Check custom export status
      tags:
      - Layer Exports
  /api/v2/maps/{map_id}/layers/{layer_id}/custom_export:
    post:
      callbacks: {}
      description: 'Start a custom export with specific format and filter options for layer data.


        Export requests are asynchronous. A successful response will return a `poll_endpoint` to check the status of the export using the poll custom export endpoint.

        '
      operationId: create_map_layer_custom_export
      parameters:
      - description: The ID of the map where the layer is located
        in: path
        name: map_id
        required: true
        schema:
          type: string
      - description: The ID of the layer to export
        in: path
        name: layer_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomExportParams'
        description: Custom export params
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomExportResponse'
          description: Custom export response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
          description: UnauthorizedError
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
          description: UnauthorizedError
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: NotFoundError
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonErrorResponse'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
          description: InternalServerError
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableError'
          description: ServiceUnavailableError
      security:
      - bearerAuth: []
      summary: Create custom layer export
      tags:
      - Layer Exports
components:
  schemas:
    FeltID:
      example: luCHyMruTQ6ozGk3gPJfEB
      format: felt_id
      nullable: false
      title: FeltID
      type: string
    InternalServerError:
      properties:
        errors:
          items:
            properties:
              detail:
                type: string
              source:
                properties:
                  parameter:
                    type: string
                type: object
              title:
                type: string
            type: object
          type: array
      title: InternalServerError
      type: object
    CustomExportRequestStatus:
      additionalProperties: false
      properties:
        download_url:
          example: https://us1.data-pipeline.felt.com/fcdfd96c-06fa-40b9-9ae9-ad034b5a66df/Felt-Export.zip
          nullable: true
          type: string
        export_id:
          example: FZWQjWZJSZWvW3yn9BeV9AyA
          nullable: false
          type: string
        filters:
          items: {}
          nullable: false
          type: array
        status:
          enum:
          - completed
          - failed
          - in_progress
          example: completed
          nullable: false
          type: string
      required:
      - export_id
      - status
      - download_url
      - filters
      title: CustomExportRequestStatus
      type: object
    UnauthorizedError:
      properties:
        errors:
          items:
            properties:
              detail:
                type: string
              source:
                properties:
                  header:
                    enum:
                    - authorization
                    type: string
                type: object
              title:
                type: string
            type: object
          type: array
      title: UnauthorizedError
      type: object
    ExportLink:
      additionalProperties: false
      properties:
        export_link:
          nullable: false
          type: string
      required:
      - export_link
      title: ExportLink
      type: object
    ServiceUnavailableError:
      properties:
        errors:
          items:
            properties:
              detail:
                type: string
              source:
                properties:
                  parameter:
                    type: string
                type: object
              title:
                type: string
            type: object
          type: array
      title: ServiceUnavailableError
      type: object
    NotFoundError:
      properties:
        errors:
          items:
            properties:
              detail:
                type: string
              source:
                properties:
                  parameter:
                    type: string
                type: object
              title:
                type: string
            type: object
          type: array
      title: NotFoundError
      type: object
    CustomExportParams:
      additionalProperties: false
      properties:
        email_on_completion:
          description: Send an email to the requesting user when the export completes. Defaults to `true`
          type: boolean
        filters:
          description: Filters for the layer in Felt Style Language filter format
          items: {}
          type: array
        output_format:
          enum:
          - csv
          - gpkg
          - geojson
          - geotiff
          - pmtiles
          example: csv
          nullable: false
          type: string
      required:
      - output_format
      title: CustomExportParams
      type: object
    CustomExportResponse:
      additionalProperties: false
      properties:
        export_request_id:
          $ref: '#/components/schemas/FeltID'
        poll_endpoint:
          example: http://felt.com/api/v2/maps/vAbZ5eKqRoGe4sCH8nHW8D/layers/7kF9Cfz45TUWIiuuWV8uZ7A/custom_exports/auFxn9BO4RrGGiKrGfaS7ZB
          nullable: false
          type: string
      required:
      - export_request_id
      - poll_endpoint
      title: CustomExportResponse
      type: object
    JsonErrorResponse:
      properties:
        errors:
          items:
            properties:
              detail:
                example: null value where string expected
                type: string
              source:
                properties:
                  pointer:
                    example: /data/attributes/petName
                    type: string
                required:
                - pointer
                type: object
              title:
                example: Invalid value
                type: string
            required:
            - title
            - source
            - detail
            type: object
          type: array
      required:
      - errors
      title: JsonErrorResponse
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: YOUR_API_KEY
      scheme: bearer
      type: http