---
title: "Get All User Events"
method: POST
path: "/api/analytics/events/all"
tags: ["Analytics"]
---

# Get All User Events

`POST /api/analytics/events/all`

This route allows you to view all user events.

## Request body

- GetEventsRequestBody
  - `filter` EventAnalyticsFilter — Filter to apply to the events when querying for them
    - `date_range` DateRange — 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.
      - `gt` string, nullable
      - `gte` string, nullable
      - `lt` string, nullable
      - `lte` string, nullable
    - `event_type` 'view' | 'filter_clicked' | 'click' | 'add_to_cart' | 'purchase'
    - `is_conversion` boolean, nullable — Filter by conversions
    - `metadata_filter` string, nullable — Filter by metadata path i.e. path.attribute = \"value\"
    - `user_id` string, nullable — Filter by user ID
  - `page` integer, nullable — Page of results to return

## Response `200`

The events for the request

- GetEventsResponseBody — Response body for the GetEvents endpoint
  - `events` EventData[], required
    - `created_at` string, required — The time the event was created.
    - `dataset_id` string, uuid, required — The unique identifier for the dataset the event is associated with.
    - `event_name` string, required — The name of the event, e.g. "Added to Cart", "Purchased", "Viewed Home Page", "Clicked", "Filter Clicked", "Followup Query".
    - `event_type` string, required — The type of event, "add_to_cart", "purchase", "view", "click", "filter_clicked", "followup_query"
    - `id` string, uuid, required — The unique identifier for the event
    - `is_conversion` boolean, nullable — Whether the event is a conversion event.
    - `items` string[], required — 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` unknown
    - `request_id` string, nullable — The unique identifier for the request the event is associated with.
    - `request_type` string, nullable — The type of request the event is associated with.
    - `updated_at` string, required — The time the event was last updated.
    - `user_id` string, nullable — The user identifier associated with the event.

## Other responses

- `400` — Service error relating to getting events

---

[API](https://skmtc.net/devflowinc/apis/trieve-api.md) · [All operations](https://skmtc.net/devflowinc/apis/trieve-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/devflowinc/trieve-api/revisions/84583e7c9fc1/schema)
