import requests
url = "https://backend.nebuly.com/api/external/get-interaction-aggregates-v2"
headers = {
"Authorization": "Bearer <YOUR_API_KEY>"
}
payload = {
"time_range": {
"start": "2024-05-01T00:00:00Z",
"end": "2024-05-31T23:59:59Z",
},
"filters": [],
"variables": ["n_interactions", "aifi_score"],
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
{
"data": [
{
"group_name": "total",
"n_interactions": 120,
"aifi_proficiency_score": 45.0
}
],
"total": 1,
"limit": 10,
"offset": 0
}
Insights API
Get Interaction Aggregates V2
POST
/
api
/
external
/
get-interaction-aggregates-v2
import requests
url = "https://backend.nebuly.com/api/external/get-interaction-aggregates-v2"
headers = {
"Authorization": "Bearer <YOUR_API_KEY>"
}
payload = {
"time_range": {
"start": "2024-05-01T00:00:00Z",
"end": "2024-05-31T23:59:59Z",
},
"filters": [],
"variables": ["n_interactions", "aifi_score"],
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
{
"data": [
{
"group_name": "total",
"n_interactions": 120,
"aifi_proficiency_score": 45.0
}
],
"total": 1,
"limit": 10,
"offset": 0
}
This endpoint returns the same grouped interaction metrics as Get Interaction Aggregates, with a shorter response. The request body is the same:
time_range, filters, group_by, additional_group_bys, variables, order_by, limit, and offset.
You need an API key to authenticate. See here for more information about the API keys.
import requests
url = "https://backend.nebuly.com/api/external/get-interaction-aggregates-v2"
headers = {
"Authorization": "Bearer <YOUR_API_KEY>"
}
payload = {
"time_range": {
"start": "2024-05-01T00:00:00Z",
"end": "2024-05-31T23:59:59Z",
},
"filters": [],
"variables": ["n_interactions", "aifi_score"],
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
{
"data": [
{
"group_name": "total",
"n_interactions": 120,
"aifi_proficiency_score": 45.0
}
],
"total": 1,
"limit": 10,
"offset": 0
}
integer
The total number of groups.
integer
The offset used for pagination.
integer
The maximum number of groups returned.
object[]
Aggregated values for each group.
Show properties
Show properties
string
The group name.
string[]
Names for the additional group-by dimensions, when requested.
integer
The number of interactions in the group.
integer
The number of interactions in the previous period.
integer
The number of users in the group.
integer
The number of users in the previous period.
integer
The number of feedback events in the group.
integer
The number of feedback events in the previous period.
integer
Positive implicit feedback in the group.
integer
Negative implicit feedback in the group.
integer
Positive explicit feedback in the group.
integer
Negative explicit feedback in the group.
integer
Positive implicit feedback in the previous period.
integer
Negative implicit feedback in the previous period.
integer
Positive explicit feedback in the previous period.
integer
Negative explicit feedback in the previous period.
integer
The number of intents in the group.
integer
The number of intents in the previous period.
float
The total cost for the group.
float
The average latency for the group, in seconds.
float
Retention for the group.
float
Average session length for the group.
float
Average session time for the group.
integer
The number of sessions in the group.
integer
The number of sessions in the previous period.
integer
The number of segments in the group.
integer
The number of segments in the previous period.
string[]
Topics present in the group.
float
Average input length for the group.
float
Average input length in the previous period.
integer
Input tokens for the group.
integer
Input tokens in the previous period.
integer
Output tokens for the group.
integer
Output tokens in the previous period.
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.