POST
/
api
/
external
/
get-interaction-aggregates
curl --request POST \
  --url https://backend.nebuly.com/api/external/get-interaction-aggregates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "time_range": {
    "start": "<string>",
    "end": "<string>"
  },
  "filters": [
    {
      "kind": "<string>",
      "tag": "<string>",
      "values": [
        "<string>"
      ]
    }
  ],
  "group_by": {
    "kind": "<string>",
    "tag": "<string>"
  },
  "limit": 123,
  "offset": 123
}'
{
  "total": 123,
  "offset": 123,
  "limit": 123,
  "data": [
    {
      "group_name": "<string>",
      "n_interactions": 123,
      "n_users": 123,
      "n_positive_implicit_user_feedback": 123,
      "n_negative_implicit_user_feedback": 123,
      "n_positive_explicit_user_feedback": 123,
      "n_negative_explicit_user_feedback": 123,
      "n_feedback": 123,
      "cost": 123,
      "latency_seconds": 123
    }
  ]
}

This endpoint returns aggregate values among interactions. The returned aggregates are:

  • number of interactions
  • number of users
  • number of positive implicit feedback
  • number of positive explicit feedback
  • number of negative implicit feedback
  • number of negative explicit feedback

Using the optional group by field you can aggregate the interaction on different view, e.g. grouping by “intent” or “positive_implicit_feedback”.

You need an API key to authenticate. See here for more information about the API keys.

time_range
object
required

The time range to consider when computing the metrics and analytics to show.

filters
object[]
required

Filters you can use to get data based only on the interactions you are interested in.

group_by
object

Filters you can use to get data based only on the interactions you are interested in. If no value is give, the total aggregated values among the desired interactions are returned.

limit
integer
required

Parameter needed for pagination. It indicates the number of rows per page.

offset
integer
required

Parameter needed for pagination. It indicates the offset to be applied to the first rows returned.

Response

total
integer

Needed for pagination. The total number of rows available.

offset
integer

Needed for pagination. It indicates the offset to be applied to the first rows returned.

limit
integer

Needed for pagination. It indicates the number of rows per page.

data
object[]

The data aggregated using the given group_by field.