POST
/
api
/
analytics
/
top
curl --request POST \
  --url https://api.trieve.ai/api/analytics/top \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TR-Organization: <tr-organization>' \
  --data '{
  "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"
  },
  "type": "search"
}'
[
  {
    "dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "dataset_tracking_id": "<string>",
    "total_queries": 123
  }
]

Authorizations

Authorization
string
header
required

Headers

TR-Organization
string
required

The organization id to use for the request

Body

application/json
JSON request payload to filter the top datasets
type
enum<string>
required
Available options:
search,
rag,
recommendation
date_range
object

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.

Response

200
application/json
The top datasets for the request
dataset_id
string
required
total_queries
integer
required
dataset_tracking_id
string | null