Skip to main content
POST
/
api
/
analytics
/
events
/
component
Get Component Analytics
curl --request POST \
  --url https://api.trieve.ai/api/analytics/events/component \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TR-Dataset: <tr-dataset>' \
  --data '{
  "filter": {
    "component_name": "<string>",
    "date_range": {
      "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"
    }
  },
  "granularity": "minute",
  "type": "total_unique_users"
}'
{
  "points": [
    {
      "point": 123,
      "time_stamp": "<string>"
    }
  ],
  "total_unique_users": 1
}

Authorizations

Authorization
string
header
required

Headers

TR-Dataset
string<uuid>
required

The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.

Body

application/json

JSON request payload to filter the graph

  • TotalUniqueUsers
  • TopPages
  • TopComponents
  • ComponentNames
  • ComponentInteractionTime
type
enum<string>
required
Available options:
total_unique_users
filter
object
granularity
enum<string>
Available options:
minute,
second,
hour,
day,
month

Response

The component analytics for the dataset

  • Option 1
  • Option 2
  • Option 3
  • Option 4
  • Option 5
points
object[]
required
total_unique_users
integer
required
Required range: x >= 0
I