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
}
]
}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
}
]
}You need an API key to authenticate. See here for more information about the API keys.
Filters you can use to get data based only on the interactions you are interested in.
Show properties
Show properties
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
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.
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".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
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
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.
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
Parameter needed for pagination. It indicates the number of rows per page.
Parameter needed for pagination. It indicates the offset to be applied to the first rows returned.
Response
Needed for pagination. The total number of rows available.
Needed for pagination. It indicates the offset to be applied to the first rows returned.
Needed for pagination. It indicates the number of rows per page.
The data aggregated using the given group_by field.
Show properties
Show properties
The value of the group_by filter selected as input.
The total number of interaction for the selected group.
The total number of distinct users for the selected group.
The total number of positive implicit feedback for the selected group.
The total number of negative implicit feedback for the selected group.
The total number of positive explicit feedback for the selected group.
The total number of negative explicit feedback for the selected group.
The total number of feedback for the selected group.
The total cost for the selected group.
The average latency, i.e. time-to-response, for the selected group.
⌘I