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>"
      ],
      "is_exclude": true
    }
  ],
  "group_by": {
    "kind": "<string>",
    "tag": "<string>",
    "field": "<string>"
  },
  "variables": [
    "<string>"
  ],
  "additional_group_bys": [
    {
      "kind": "<string>"
    }
  ],
  "limit": 123,
  "offset": 123
}'
{
  "total": 123,
  "offset": 123,
  "limit": 123,
  "data": [
    {
      "group_name": "<string>",
      "n_interactions": 123,
      "n_users": 123,
      "n_feedback": 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_users_negative": 123,
      "n_users_negative_implicit": 123,
      "n_users_negative_explicit": 123,
      "explicit_feedback_ratio": 123,
      "n_paste_output": 123,
      "n_interactions_negative": 123,
      "n_interactions_negative_implicit": 123,
      "n_interactions_negative_explicit": 123,
      "n_conversations_positive_explicit": 123,
      "n_conversations_negative_explicit": 123,
      "n_intents": 123,
      "cost": 123,
      "latency_seconds": 123,
      "retention": 123,
      "topics": [
        "<string>"
      ],
      "session_time": 123,
      "session_length": 123,
      "start_session": "<string>",
      "end_session": "<string>",
      "percentage_negative_feedback": 123,
      "percentage_negative_feedback_explicit": 123,
      "conversation_percentage_negative_feedback": 123,
      "conversation_percentage_negative_feedback_explicit": 123,
      "sentiment_score": 123,
      "conversation_sentiment_score": 123,
      "n_positive_messages": 123,
      "n_negative_messages": 123,
      "n_topics": 123,
      "n_topics_conversations": 123,
      "n_user_actions": 123,
      "n_user_actions_conversations": 123,
      "n_negative_intent": 123,
      "n_keywords": 123,
      "n_data_sources": 123,
      "n_emotions": 123,
      "tags": [
        {
          "tag_name": "<string>",
          "n_tag_values": 123
        }
      ],
      "bounce_rate": 123,
      "penetration": 123,
      "user_rating": 123
    }
  ]
}

This endpoint returns aggregated values for interactions. The specific aggregates to compute are defined by the variables field in the request body.
You can optionally use the group_by field to aggregate results by various dimensions—for example, by intent or positive_implicit_feedback.
If no group_by is provided, the response returns overall totals across all interactions.

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

Groups you can use to aggregate data based on the interactions you’re interested in.
If no value is provided, total aggregated values for the selected interactions will be returned.
When a group_by is provided, the selected group will appear as group_name in the response.
If not, the response will contain a single row with the overall aggregated values.

variables
string[]

The variables to compute aggregated values for. If not specified, all available variables will be computed.

additional_group_bys
object[]

Optional additional group_by filters to further refine the aggregations.
These filters allow you to split the selected variables in the main group_by
into more detailed subcategories.

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.