v1

latestOpenAPI 3.0.3BSL2026-07-17133415718.8 KB
Analytics

Get CTR Analytics

This route allows you to view the CTR analytics for a dataset.

post/api/analytics/events/ctr

Headers

TR-Datasetstring 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.

Request body

OR
OR
OR
OR
OR

Example request

{
  "filter": {
    "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"
    },
    "query_rating": {
      "gt": 1,
      "gte": 1,
      "lt": 1,
      "lte": 1
    }
  }
}

Response

The CTR analytics for the dataset

OR
OR
OR
OR
OR

Example response

{
  "queries": [
    {
      "clicked_chunk": {
        "chunk": {
          "chunk_html": "<p>Hello, world!</p>",
          "created_at": "2021-01-01 00:00:00.000",
          "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
          "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
          "link": "https://trieve.ai",
          "metadata": {
            "key": "value"
          },
          "tag_set": "[tag1,tag2]",
          "time_stamp": "2021-01-01 00:00:00.000",
          "tracking_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
          "updated_at": "2021-01-01 00:00:00.000",
          "weight": 0.5
        }
      }
    }
  ]
}