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

# Read a tap's incremental-sync state

> Returns the bookmark/cursor the tap's script saved after its last successful run — the object the next run receives via the DATRIS_TAP_STATE environment variable. `state` is null when the tap has never committed state (non-incremental tap, or no successful run yet).



## OpenAPI

````yaml /openapi.yaml get /api/v1/tap/state
openapi: 3.0.3
info:
  title: Datris API
  description: >
    REST API for the Datris AI Data Platform. Ingest, validate, transform,
    store, and retrieve data.


    For AI agent integration, use the [MCP
    Server](https://docs.datris.ai/mcp-server) instead.
  version: 1.11.3
  contact:
    name: Datris
    url: https://datris.ai
  license:
    name: Apache 2.0
servers:
  - url: http://localhost:8080
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /api/v1/tap/state:
    get:
      tags:
        - Taps
      summary: Read a tap's incremental-sync state
      description: >-
        Returns the bookmark/cursor the tap's script saved after its last
        successful run — the object the next run receives via the
        DATRIS_TAP_STATE environment variable. `state` is null when the tap has
        never committed state (non-incremental tap, or no successful run yet).
      parameters:
        - name: name
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Current state
          content:
            application/json:
              schema:
                type: object
                properties:
                  tap:
                    type: string
                  state:
                    type: object
                    nullable: true
                    additionalProperties: true
                  updatedAt:
                    type: string
                  updatedBy:
                    type: string
                    description: >-
                      The committing run's key (`tapName|runTime`), or `manual`
                      for API/UI overrides.
        '500':
          description: Error
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Optional API key for authentication (enabled via application.yaml)

````