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

# Get All User Events

> This route allows you to view all user events.



## OpenAPI

````yaml post /api/analytics/events/all
openapi: 3.0.3
info:
  title: Trieve API
  description: >-
    Trieve OpenAPI Specification. This document describes all of the operations
    available through the Trieve API.
  contact:
    name: Trieve Team
    url: https://trieve.ai
    email: developers@trieve.ai
  license:
    name: BSL
    url: https://github.com/devflowinc/trieve/blob/main/LICENSE.txt
  version: 0.13.0
servers:
  - url: https://api.trieve.ai
    description: Production server
  - url: http://localhost:8090
    description: Local development server
security: []
tags:
  - name: Invitation
    description: Invitation endpoint. Exists to invite users to an organization.
  - name: Auth
    description: Authentication endpoint. Serves to register and authenticate users.
  - name: User
    description: User endpoint. Enables you to modify user roles and information.
  - name: Organization
    description: >-
      Organization endpoint. Enables you to modify organization roles and
      information.
  - name: Dataset
    description: >-
      Dataset endpoint. Datasets belong to organizations and hold configuration
      information for both client and server. Datasets contain chunks and chunk
      groups.
  - name: Chunk
    description: >-
      Chunk endpoint. Think of chunks as individual searchable units of
      information. The majority of your integration will likely be with the
      Chunk endpoint.
  - name: Chunk Group
    description: >-
      Chunk groups endpoint. Think of a chunk_group as a bookmark folder within
      the dataset.
  - name: Crawl
    description: Crawl endpoint. Used to create and manage crawls for datasets.
  - name: File
    description: >-
      File endpoint. When files are uploaded, they are stored in S3 and broken
      up into chunks with text extraction from Apache Tika. You can upload files
      of pretty much any type up to 1GB in size. See chunking algorithm details
      at `docs.trieve.ai` for more information on how chunking works. Improved
      default chunking is on our roadmap.
  - name: Events
    description: >-
      Notifications endpoint. Files are uploaded asynchronously and events are
      sent to the user when the upload is complete.
  - name: Topic
    description: >-
      Topic chat endpoint. Think of topics as the storage system for gen-ai chat
      memory. Gen AI messages belong to topics.
  - name: Message
    description: >-
      Message chat endpoint. Messages are units belonging to a topic in the
      context of a chat with a LLM. There are system, user, and assistant
      messages.
  - name: Stripe
    description: >-
      Stripe endpoint. Used for the managed SaaS version of this app. Eventually
      this will become a micro-service. Reach out to the team using contact info
      found at `docs.trieve.ai` for more information.
  - name: Health
    description: Health check endpoint. Used to check if the server is up and running.
  - name: Metrics
    description: Metrics endpoint. Used to get information for monitoring
  - name: Analytics
    description: Analytics endpoint. Used to get information for search and RAG analytics
  - name: Experiment
    description: Experiment endpoint. Used to create and manage experiments
paths:
  /api/analytics/events/all:
    post:
      tags:
        - Analytics
      summary: Get All User Events
      description: This route allows you to view all user events.
      operationId: get_all_events
      requestBody:
        description: JSON request payload to filter the events
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetEventsRequestBody'
        required: true
      responses:
        '200':
          description: The events for the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetEventsResponseBody'
        '400':
          description: Service error relating to getting events
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseBody'
      security:
        - ApiKey:
            - admin
components:
  schemas:
    GetEventsRequestBody:
      type: object
      properties:
        filter:
          allOf:
            - $ref: '#/components/schemas/EventAnalyticsFilter'
          nullable: true
        page:
          type: integer
          format: int32
          description: Page of results to return
          nullable: true
          minimum: 0
    GetEventsResponseBody:
      type: object
      description: Response body for the GetEvents endpoint
      required:
        - events
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/EventData'
    ErrorResponseBody:
      type: object
      required:
        - message
      properties:
        message:
          type: string
      example:
        message: Bad Request
    EventAnalyticsFilter:
      type: object
      description: Filter to apply to the events when querying for them
      properties:
        date_range:
          allOf:
            - $ref: '#/components/schemas/DateRange'
          nullable: true
        event_type:
          allOf:
            - $ref: '#/components/schemas/EventTypesFilter'
          nullable: true
        is_conversion:
          type: boolean
          description: Filter by conversions
          nullable: true
        metadata_filter:
          type: string
          description: Filter by metadata path i.e. path.attribute = \"value\"
          nullable: true
        user_id:
          type: string
          description: Filter by user ID
          nullable: true
      example:
        date_range:
          gt: '2021-08-10T00:00:00Z'
          lt: '2021-08-11T00:00:00Z'
        event_type: view
        is_conversion: true
        metadata_filter: path = "value"
        user_id: user1
    EventData:
      type: object
      title: EventData
      description: EventData represents a single analytics event
      required:
        - id
        - event_type
        - event_name
        - items
        - dataset_id
        - created_at
        - updated_at
      properties:
        created_at:
          type: string
          description: The time the event was created.
        dataset_id:
          type: string
          format: uuid
          description: The unique identifier for the dataset the event is associated with.
        event_name:
          type: string
          description: >-
            The name of the event, e.g. "Added to Cart", "Purchased", "Viewed
            Home Page", "Clicked", "Filter Clicked", "Followup Query".
        event_type:
          type: string
          description: >-
            The type of event, "add_to_cart", "purchase", "view", "click",
            "filter_clicked", "followup_query"
        id:
          type: string
          format: uuid
          description: The unique identifier for the event
        is_conversion:
          type: boolean
          description: Whether the event is a conversion event.
          nullable: true
        items:
          type: array
          items:
            type: string
          description: >-
            The items associated with the event. This could be a list of
            stringified json chunks for search events, or a list of items for
            add_to_cart, purchase, view, and click events.
        metadata:
          description: >-
            Additional metadata associated with the event. This can be custom
            data that is specific to the event.
          nullable: true
        request_id:
          type: string
          description: The unique identifier for the request the event is associated with.
          nullable: true
        request_type:
          type: string
          description: The type of request the event is associated with.
          nullable: true
        updated_at:
          type: string
          description: The time the event was last updated.
        user_id:
          type: string
          description: The user identifier associated with the event.
          nullable: true
      example:
        created_at: '2021-08-10T00:00:00Z'
        dataset_id: 00000000-0000-0000-0000-000000000000
        event_name: Viewed Home Page
        event_type: view
        is_conversion: true
        items:
          - item1
          - item2
        metadata: metadata
        request_id: 00000000-0000-0000-0000-000000000000
        updated_at: '2021-08-10T00:00:00Z'
        user_id: user1
    DateRange:
      type: object
      description: >-
        DateRange is a JSON object which can be used to filter chunks by a range
        of dates. This leverages the time_stamp field on chunks in your dataset.
        You can specify this if you want values in a certain range. You must
        provide ISO 8601 combined date and time without timezone.
      properties:
        gt:
          type: string
          nullable: true
        gte:
          type: string
          nullable: true
        lt:
          type: string
          nullable: true
        lte:
          type: string
          nullable: true
      example:
        gt: '2021-01-01 00:00:00.000'
        gte: '2021-01-01 00:00:00.000'
        lt: '2021-01-01 00:00:00.000'
        lte: '2021-01-01 00:00:00.000'
    EventTypesFilter:
      type: string
      enum:
        - view
        - filter_clicked
        - click
        - add_to_cart
        - purchase
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization

````