> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nebuly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Interactions Time-Series

You need an API key to authenticate. See [here](/embedded-pages/quickstart) for more information about the API keys.

<ParamField body="time_range" type="object" required>
  The time range to consider when computing the metrics and analytics to show.

  <Expandable title="properties">
    <ParamField path="start" type="string" default="2024-05-30T09:27:52.420Z" required>
      The start date for the time-range.
    </ParamField>

    <ParamField path="end" type="string" default="2024-05-30T09:27:52.420Z" required>
      The end date for the time-range.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="filters" type="object[]" required>
  Filters you can use to get data based only on the interactions you are interested in.

  <Expandable title="properties">
    <ParamField path="kind" type="string" required>
      The filter kind. It can be one of the following values:

      * user\_intent
      * negative\_user\_intent
      * keyword
      * user\_feedback
      * tag
      * type\_of\_problem
      * topic
      * user
      * user\_query
    </ParamField>

    <ParamField path="tag" type="string">
      Optional field to be used only when the kind is tag. It should specify the tag name, which is the same as the key you used in the tags dictionary during the interaction submission.
    </ParamField>

    <ParamField path="values" type="string[]" required>
      The values of the selected filter you want to filter on. Note that all the values passed in
      the list are considered to be in "or" the one with the other. This means that if the kind is
      "topic" and the passed values are "value A", "value B", this is equal to `topic="value A" or topic="value B"`.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="variables" type="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
</ParamField>

<ParamField body="granularity" type="string" required>
  The granularity selected for the time-series chart. It can be a value between:

  * hour
  * day
  * week
  * month
</ParamField>

# Response

<ResponseField name="buckets" type="string[]">
  X axis values accordingly to the selected granularity.
</ResponseField>

<ResponseField name="datasets" type="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.

  <ResponseField name="<group_by_value>" type="object[]">
    Each object in the list corresponds to a different x,y pairs.

    <Expandable title="properties">
      <ResponseField name="bucket" type="string">
        The x axis value.
      </ResponseField>

      <ResponseField name="n_interactions" type="integer">
        The total number of interaction for the selected granularity and given x-value.
      </ResponseField>

      <ResponseField name="n_interactions_prev" type="integer">
        The total number of interaction for the selected granularity, but referring to the previous time-range respect the one considered.
      </ResponseField>

      <ResponseField name="n_users" type="integer">
        The total number of distinct users for the selected granularity and given x-value.
      </ResponseField>

      <ResponseField name="n_users_prev" type="integer">
        The total number of distinct users for the selected granularity, but referring to the previous time-range respect the one considered.
      </ResponseField>

      <ResponseField name="n_positive_implicit_user_feedback" type="integer">
        The total number of positive implicit feedback for the selected granularity and given x-value.
      </ResponseField>

      <ResponseField name="n_positive_implicit_user_feedback_prev" type="integer">
        The total number of positive implicit feedback for the selected granularity, but referring to the previous time-range respect the one considered.
      </ResponseField>

      <ResponseField name="n_negative_implicit_user_feedback" type="integer">
        The total number of negative implicit feedback for the selected granularity and given x-value.
      </ResponseField>

      <ResponseField name="n_negative_implicit_user_feedback_prev" type="integer">
        The total number of negative implicit feedback for the selected granularity, but referring to the previous time-range respect the one considered.
      </ResponseField>

      <ResponseField name="n_positive_explicit_user_feedback" type="integer">
        The total number of positive explicit feedback for the selected granularity and given x-value.
      </ResponseField>

      <ResponseField name="n_positive_explicit_user_feedback_prev" type="integer">
        The total number of positive explicit feedback for the selected granularity, but referring to the previous time-range respect the one considered.
      </ResponseField>

      <ResponseField name="n_negative_explicit_user_feedback" type="integer">
        The total number of negative explicit feedback for the selected granularity and given x-value.
      </ResponseField>

      <ResponseField name="n_negative_explicit_user_feedback_prev" type="integer">
        The total number of negative explicit feedback for the selected granularity, but referring to the previous time-range respect the one considered.
      </ResponseField>
    </Expandable>
  </ResponseField>
</ResponseField>
