Get interactions over time
curl --request GET \
--url https://{host}/v2/workspaces/slug:ai-insights-v2/webhooks/v1/analytics/interactions \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v2/workspaces/slug:ai-insights-v2/webhooks/v1/analytics/interactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:ai-insights-v2/webhooks/v1/analytics/interactions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"daily": [
{
"date": "2023-12-25",
"interactions": 123
}
],
"totals": {
"period": 123,
"d7": 123
},
"by_workspace": [
{}
],
"meta": {
"period": "<string>",
"period_start": "2023-11-07T05:31:56Z",
"definition": "<string>",
"generated_at": "2023-11-07T05:31:56Z",
"cache_ttl": 123
}
}{
"error": "InvalidArgumentsError",
"message": "Invalid arguments",
"details": {
"errors": []
}
}{
"error": "UNAUTHORIZED",
"message": "Authentication required"
}{
"error": "FORBIDDEN",
"message": "Access denied: missing permission 'ai-insights-v2:analytics:read'"
}{
"error": "RATE_LIMITED",
"message": "Rate limit exceeded"
}{
"error": "AnalyticsSourceUnavailable",
"message": "Analytics are temporarily unavailable, try again in a minute"
}Analytics
Get interactions over time
Returns daily interactions, where one interaction is one unique
request chain (correlation ID) per UTC day. by_workspace lists the
top workspaces when the caller can see platform observability data,
and is null otherwise.
Requires ai-insights-v2:analytics (read). Rate limit: 100
requests per minute.
GET
/
v1
/
analytics
/
interactions
Get interactions over time
curl --request GET \
--url https://{host}/v2/workspaces/slug:ai-insights-v2/webhooks/v1/analytics/interactions \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v2/workspaces/slug:ai-insights-v2/webhooks/v1/analytics/interactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:ai-insights-v2/webhooks/v1/analytics/interactions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"daily": [
{
"date": "2023-12-25",
"interactions": 123
}
],
"totals": {
"period": 123,
"d7": 123
},
"by_workspace": [
{}
],
"meta": {
"period": "<string>",
"period_start": "2023-11-07T05:31:56Z",
"definition": "<string>",
"generated_at": "2023-11-07T05:31:56Z",
"cache_ttl": 123
}
}{
"error": "InvalidArgumentsError",
"message": "Invalid arguments",
"details": {
"errors": []
}
}{
"error": "UNAUTHORIZED",
"message": "Authentication required"
}{
"error": "FORBIDDEN",
"message": "Access denied: missing permission 'ai-insights-v2:analytics:read'"
}{
"error": "RATE_LIMITED",
"message": "Rate limit exceeded"
}{
"error": "AnalyticsSourceUnavailable",
"message": "Analytics are temporarily unavailable, try again in a minute"
}Authorizations
BearerAuthOrgApiKeyAuth
Query Parameters
Response
Interactions.
Was this page helpful?