POST
/
api
/
external
/
get-interaction-time-series
curl --request POST \
  --url https://backend.nebuly.com/api/external/get-interaction-time-series \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "time_range": {
    "start": "<string>",
    "end": "<string>"
  },
  "filters": [
    {
      "kind": "<string>",
      "tag": "<string>",
      "values": [
        "<string>"
      ]
    }
  ],
  "variables": [
    "<string>"
  ],
  "granularity": "<string>"
}'
{
  "buckets": [
    "<string>"
  ],
  "datasets": {
    "<group_by_value>": [
      {
        "bucket": "<string>",
        "n_interactions": 123,
        "n_interactions_prev": 123,
        "n_users": 123,
        "n_users_prev": 123,
        "n_positive_implicit_user_feedback": 123,
        "n_positive_implicit_user_feedback_prev": 123,
        "n_negative_implicit_user_feedback": 123,
        "n_negative_implicit_user_feedback_prev": 123,
        "n_positive_explicit_user_feedback": 123,
        "n_positive_explicit_user_feedback_prev": 123,
        "n_negative_explicit_user_feedback": 123,
        "n_negative_explicit_user_feedback_prev": 123
      }
    ]
  }
}

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.

variables
string[]

The variables for which values are required. If not specified, all available variables will be computed. The supported variables are

  • n_interactions
  • n_users
  • user_feedback
  • cost
  • latency_seconds
  • n_intents
  • retention
granularity
string
required

The granularity selected for the time-series chart. It can be a value between:

  • hour
  • day
  • week
  • month

Response

buckets
string[]

X axis values accordingly to the selected granularity.

datasets
object

The data to be shown on the y axis. Note that the object has as keys the values that correspond to the different group_by values, if a group by has been selected, otherwise a unique key “total” is returned.

<group_by_value>
object[]

Each object in the list corresponds to a different x,y pairs.