Get Interaction Multi Aggregates
curl --request POST \
--url https://backend.nebuly.com/api/external/get-interaction-multi-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_groups": [
[
{
"kind": "<string>",
"tag": "<string>"
}
]
],
"variables": [
"<string>"
],
"limit": 123,
"offset": 123
}
'import requests
url = "https://backend.nebuly.com/api/external/get-interaction-multi-aggregates"
payload = {
"time_range": {
"start": "<string>",
"end": "<string>"
},
"filters": [
{
"kind": "<string>",
"tag": "<string>",
"values": ["<string>"]
}
],
"group_by_groups": [[
{
"kind": "<string>",
"tag": "<string>"
}
]],
"variables": ["<string>"],
"limit": 123,
"offset": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
time_range: {start: '<string>', end: '<string>'},
filters: [{kind: '<string>', tag: '<string>', values: ['<string>']}],
group_by_groups: [[{kind: '<string>', tag: '<string>'}]],
variables: ['<string>'],
limit: 123,
offset: 123
})
};
fetch('https://backend.nebuly.com/api/external/get-interaction-multi-aggregates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://backend.nebuly.com/api/external/get-interaction-multi-aggregates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'time_range' => [
'start' => '<string>',
'end' => '<string>'
],
'filters' => [
[
'kind' => '<string>',
'tag' => '<string>',
'values' => [
'<string>'
]
]
],
'group_by_groups' => [
[
[
'kind' => '<string>',
'tag' => '<string>'
]
]
],
'variables' => [
'<string>'
],
'limit' => 123,
'offset' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://backend.nebuly.com/api/external/get-interaction-multi-aggregates"
payload := strings.NewReader("{\n \"time_range\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"filters\": [\n {\n \"kind\": \"<string>\",\n \"tag\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"group_by_groups\": [\n [\n {\n \"kind\": \"<string>\",\n \"tag\": \"<string>\"\n }\n ]\n ],\n \"variables\": [\n \"<string>\"\n ],\n \"limit\": 123,\n \"offset\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://backend.nebuly.com/api/external/get-interaction-multi-aggregates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"time_range\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"filters\": [\n {\n \"kind\": \"<string>\",\n \"tag\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"group_by_groups\": [\n [\n {\n \"kind\": \"<string>\",\n \"tag\": \"<string>\"\n }\n ]\n ],\n \"variables\": [\n \"<string>\"\n ],\n \"limit\": 123,\n \"offset\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.nebuly.com/api/external/get-interaction-multi-aggregates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"time_range\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"filters\": [\n {\n \"kind\": \"<string>\",\n \"tag\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"group_by_groups\": [\n [\n {\n \"kind\": \"<string>\",\n \"tag\": \"<string>\"\n }\n ]\n ],\n \"variables\": [\n \"<string>\"\n ],\n \"limit\": 123,\n \"offset\": 123\n}"
response = http.request(request)
puts response.read_body{
"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,
"aifi_proficiency_score": 123,
"aifi_proficiency_score_prev": 123,
"aifi_proficiency_task_clarity_score": 123,
"aifi_proficiency_context_provision_score": 123,
"aifi_proficiency_output_specification_score": 123,
"aifi_proficiency_prompt_length_score": 123,
"aifi_proficiency_conversation_efficiency_score": 123,
"aifi_proficiency_constraint_specification_score": 123,
"aifi_proficiency_moved_up": 123,
"aifi_proficiency_slipped_back": 123,
"aifi_proficiency_stayed": 123,
"roi_hours_saved": 123,
"roi_hours_saved_prev": 123,
"roi_value_saved": 123,
"roi_value_saved_prev": 123
}
]
}Insights API
Get Interaction Multi Aggregates
POST
/
api
/
external
/
get-interaction-multi-aggregates
Get Interaction Multi Aggregates
curl --request POST \
--url https://backend.nebuly.com/api/external/get-interaction-multi-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_groups": [
[
{
"kind": "<string>",
"tag": "<string>"
}
]
],
"variables": [
"<string>"
],
"limit": 123,
"offset": 123
}
'import requests
url = "https://backend.nebuly.com/api/external/get-interaction-multi-aggregates"
payload = {
"time_range": {
"start": "<string>",
"end": "<string>"
},
"filters": [
{
"kind": "<string>",
"tag": "<string>",
"values": ["<string>"]
}
],
"group_by_groups": [[
{
"kind": "<string>",
"tag": "<string>"
}
]],
"variables": ["<string>"],
"limit": 123,
"offset": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
time_range: {start: '<string>', end: '<string>'},
filters: [{kind: '<string>', tag: '<string>', values: ['<string>']}],
group_by_groups: [[{kind: '<string>', tag: '<string>'}]],
variables: ['<string>'],
limit: 123,
offset: 123
})
};
fetch('https://backend.nebuly.com/api/external/get-interaction-multi-aggregates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://backend.nebuly.com/api/external/get-interaction-multi-aggregates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'time_range' => [
'start' => '<string>',
'end' => '<string>'
],
'filters' => [
[
'kind' => '<string>',
'tag' => '<string>',
'values' => [
'<string>'
]
]
],
'group_by_groups' => [
[
[
'kind' => '<string>',
'tag' => '<string>'
]
]
],
'variables' => [
'<string>'
],
'limit' => 123,
'offset' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://backend.nebuly.com/api/external/get-interaction-multi-aggregates"
payload := strings.NewReader("{\n \"time_range\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"filters\": [\n {\n \"kind\": \"<string>\",\n \"tag\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"group_by_groups\": [\n [\n {\n \"kind\": \"<string>\",\n \"tag\": \"<string>\"\n }\n ]\n ],\n \"variables\": [\n \"<string>\"\n ],\n \"limit\": 123,\n \"offset\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://backend.nebuly.com/api/external/get-interaction-multi-aggregates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"time_range\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"filters\": [\n {\n \"kind\": \"<string>\",\n \"tag\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"group_by_groups\": [\n [\n {\n \"kind\": \"<string>\",\n \"tag\": \"<string>\"\n }\n ]\n ],\n \"variables\": [\n \"<string>\"\n ],\n \"limit\": 123,\n \"offset\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.nebuly.com/api/external/get-interaction-multi-aggregates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"time_range\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"filters\": [\n {\n \"kind\": \"<string>\",\n \"tag\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ],\n \"group_by_groups\": [\n [\n {\n \"kind\": \"<string>\",\n \"tag\": \"<string>\"\n }\n ]\n ],\n \"variables\": [\n \"<string>\"\n ],\n \"limit\": 123,\n \"offset\": 123\n}"
response = http.request(request)
puts response.read_body{
"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,
"aifi_proficiency_score": 123,
"aifi_proficiency_score_prev": 123,
"aifi_proficiency_task_clarity_score": 123,
"aifi_proficiency_context_provision_score": 123,
"aifi_proficiency_output_specification_score": 123,
"aifi_proficiency_prompt_length_score": 123,
"aifi_proficiency_conversation_efficiency_score": 123,
"aifi_proficiency_constraint_specification_score": 123,
"aifi_proficiency_moved_up": 123,
"aifi_proficiency_slipped_back": 123,
"aifi_proficiency_stayed": 123,
"roi_hours_saved": 123,
"roi_hours_saved_prev": 123,
"roi_value_saved": 123,
"roi_value_saved_prev": 123
}
]
}You need an API key to authenticate. See here for more information about the API keys.
object
required
object[]
required
Filters you can use to get data based only on the interactions you are interested in.
Show properties
Show properties
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
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.
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".object[][]
You can use group_by filters to aggregate data according to your preferences. This endpoint allows you to get data aggregated in different ways with a single call.For example, if you want both The inner lists can specify additional groupings for splitting your data. Suppose you want to get both
negative_intent and intents in a single API call, you can set the group_by_groups value to the following list:[[{kind: user_intent}], [{kind: negative_user_intent}]]
intent and negative_user_intent further split by topic. In this case, your request should include the field as:[[{kind: user_intent}, {kind: topic}], [{kind: negative_user_intent}, {kind: topic}]]
Show properties
Show properties
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
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.
string[]
The variables for which values are required. If omitted, the API computes
n_interactions, n_users, cost, and latency_seconds. Any variable you do not request is null.
The supported variables are- n_interactions
- n_users
- user_feedback_v2
- cost
- latency_seconds
- n_intents
- retention
- aifi_score: returned as
aifi_proficiency_score.order_by.byusesaifi_scoreas well. - aifi_task_clarity_score: returned as
aifi_proficiency_task_clarity_score - aifi_context_provision_score: returned as
aifi_proficiency_context_provision_score - aifi_output_specification_score: returned as
aifi_proficiency_output_specification_score - aifi_prompt_length_score: returned as
aifi_proficiency_prompt_length_score - aifi_conversation_efficiency_score: returned as
aifi_proficiency_conversation_efficiency_score - aifi_constraint_specification_score: returned as
aifi_proficiency_constraint_specification_score - aifi_proficiency_moved_up
- aifi_proficiency_slipped_back
- aifi_proficiency_stayed
integer
required
Parameter needed for pagination. It indicates the number of rows per page.
integer
required
Parameter needed for pagination. It indicates the offset to be applied to the first rows returned.
Response
integer
Needed for pagination. The total number of rows available.
integer
Needed for pagination. It indicates the offset to be applied to the first rows returned.
integer
Needed for pagination. It indicates the number of rows per page.
object[]
The data aggregated using the given group_by field.
Show properties
Show properties
string
The value of the group_by filter selected as input.
integer
The total number of interaction for the selected group.
integer
The total number of distinct users for the selected group.
integer
The total number of positive implicit feedback for the selected group.
integer
The total number of negative implicit feedback for the selected group.
integer
The total number of positive explicit feedback for the selected group.
integer
The total number of negative explicit feedback for the selected group.
integer
The total number of feedback for the selected group.
float
The total cost for the selected group.
float
The average latency, i.e. time-to-response, for the selected group.
float
AI Proficiency for the selected group, with two digits after the decimal. Null when the group has no proficiency score.
float
AI Proficiency for the selected group in the previous period. Null when the group has no proficiency score.
float
Task clarity component of AI Proficiency, with two digits after the decimal. Null when the group has no score.
float
Context provision component of AI Proficiency, with two digits after the decimal. Null when the group has no score.
float
Output specification component of AI Proficiency, with two digits after the decimal. Null when the group has no score.
float
Prompt length component of AI Proficiency, with two digits after the decimal. Null when the group has no score.
float
Conversation efficiency component of AI Proficiency, with two digits after the decimal. Null when the group has no score.
float
Constraint specification component of AI Proficiency, with two digits after the decimal. Null when the group has no score.
integer
Users in the group whose AI Proficiency moved up. Null when it was not requested.
integer
Users in the group whose AI Proficiency slipped back. Null when it was not requested.
integer
Users in the group whose AI Proficiency stayed the same. Null when it was not requested.
float
Hours saved for the selected group when ROI is enabled. Null when ROI is off.
float
Hours saved for the selected group in the previous period. Null when ROI is off.
float
Value saved for the selected group when ROI is enabled. Null when ROI is off.
float
Value saved for the selected group in the previous period. Null when ROI is off.