> ## 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.

# List events

> Events in the order they happened, after `after`. Store the last
event id you applied and pass it next time. Events are kept for 90
days; a cursor older than that returns `410` and you reload from the
manifest. The same events are sent to webhooks subscribed to them.




## OpenAPI

````yaml /platforms/openapi.yaml get /v1/subscriptions/{subscriptionId}/events
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/subscriptions/{subscriptionId}/events:
    get:
      tags:
        - Events
      summary: List events
      description: |
        Events in the order they happened, after `after`. Store the last
        event id you applied and pass it next time. Events are kept for 90
        days; a cursor older than that returns `410` and you reload from the
        manifest. The same events are sent to webhooks subscribed to them.
      operationId: listSubscriptionEvents
      parameters:
        - $ref: '#/components/parameters/subscriptionId'
        - name: after
          in: query
          description: The id of the last event you applied. From the start when left out.
          schema:
            type: string
        - name: types
          in: query
          description: Comma-separated event types to keep.
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 500
            default: 100
      responses:
        '200':
          description: A page of events.
          content:
            application/json:
              schema:
                type: object
                required:
                  - events
                  - hasMore
                properties:
                  events:
                    type: array
                    items:
                      $ref: '#/components/schemas/Event'
                  hasMore:
                    type: boolean
                    description: Whether more events follow the last one returned.
        '410':
          description: The cursor is past retention. Reload from the manifest.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    subscriptionId:
      name: subscriptionId
      in: path
      required: true
      schema:
        type: string
      example: sub_8f3k2m
  schemas:
    Event:
      type: object
      required:
        - id
        - type
        - createdAt
        - subscriptionId
        - data
      properties:
        id:
          type: string
          description: >-
            Increases with each event. Pass as `after` to read the ones that
            follow.
          examples:
            - evt_0000018f2a9c
        type:
          type: string
          enum:
            - dataset.added
            - dataset.updated
            - dataset.schema_changed
            - dataset.resync_required
            - dataset.removed
        createdAt:
          type: string
          format: date-time
        subscriptionId:
          type: string
        data:
          type: object
          required:
            - datasetId
          properties:
            datasetId:
              type: string
            version:
              type: integer
            previousVersion:
              type:
                - integer
                - 'null'
            schemaVersion:
              type: string
            counts:
              type: object
              properties:
                added:
                  type: integer
                changed:
                  type: integer
                removed:
                  type: integer
            schemaChange:
              $ref: '#/components/schemas/SchemaChange'
            reason:
              type: string
              description: Why, for `dataset.resync_required` and `dataset.removed`.
              enum:
                - key_columns_changed
                - cursor_expired
                - left_coverage
                - subscription_changed
                - source_retired
            links:
              type: object
              properties:
                version:
                  type: string
                  format: uri
                changes:
                  type: string
                  format: uri
                schema:
                  type: string
                  format: uri
    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
    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
    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
  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.