> ## Documentation Index
> Fetch the complete documentation index at: https://cognitio-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List sync events

> List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.



## OpenAPI

````yaml /openapi.json post /sync/history
openapi: 3.1.1
info:
  title: cognitio
  description: cognitio api
  version: 1.0.0
servers: []
security: []
paths:
  /sync/history:
    post:
      summary: List sync events
      description: >-
        List sync events for all aggregates. Keys are aggregate IDs the client
        already knows about, values are the last known sequence ID. Events with
        seq > value are returned for those aggregates. Aggregates not listed in
        the input get their full history.
      operationId: sync.history.list
      parameters:
        - in: query
          name: directory
          schema:
            type: string
        - in: query
          name: workspace
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              propertyNames:
                type: string
              additionalProperties:
                type: integer
                minimum: 0
                maximum: 9007199254740991
      responses:
        '200':
          description: Sync events
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    aggregate_id:
                      type: string
                    seq:
                      type: number
                    type:
                      type: string
                    data:
                      type: object
                      propertyNames:
                        type: string
                      additionalProperties: {}
                  required:
                    - id
                    - aggregate_id
                    - seq
                    - type
                    - data
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
      x-codeSamples:
        - lang: js
          source: |-
            import { createCognitioClient } from "@cognitio/sdk

            const client = createCognitioClient()
            await client.sync.history.list({
              ...
            })
components:
  schemas:
    BadRequestError:
      type: object
      properties:
        data: {}
        errors:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        success:
          type: boolean
          const: false
      required:
        - data
        - errors
        - success

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.