Get analysis queue statistics
curl --request GET \
--url https://{host}/v2/workspaces/slug:ai-insights-v2/webhooks/v1/analytics/queue-stats \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v2/workspaces/slug:ai-insights-v2/webhooks/v1/analytics/queue-stats', 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/queue-stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"queue_depth": 123,
"processing": 123,
"completed_total": 123,
"failed_total": 123,
"throughput": {
"completed_per_hour": 123,
"failed_per_hour": 123
},
"estimated_completion_hours": 123,
"health": "healthy"
}{
"error": "UNAUTHORIZED",
"message": "Authentication required"
}{
"error": "FORBIDDEN",
"message": "Access denied: missing permission 'ai-insights-v2:analytics:read'"
}{
"error": "TooManyRequests",
"message": "Too many requests for 'Insights'",
"details": {
"name": "Insights",
"ok": false,
"retryAfter": 42.5,
"limit": 100,
"window": 60,
"remaining": 0
}
}Queue
Get analysis queue statistics
Returns the organization’s analysis queue: items per status,
throughput over the last hour, estimated time to drain, and a health
status. health is backlogged above 100,000 pending items, busy
above 10,000, degraded when more than 10 items failed in the last
hour, and healthy otherwise.
Requires ai-insights-v2:queue (read). Rate limit: 100 requests
per minute.
GET
/
v1
/
analytics
/
queue-stats
Get analysis queue statistics
curl --request GET \
--url https://{host}/v2/workspaces/slug:ai-insights-v2/webhooks/v1/analytics/queue-stats \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v2/workspaces/slug:ai-insights-v2/webhooks/v1/analytics/queue-stats', 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/queue-stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"queue_depth": 123,
"processing": 123,
"completed_total": 123,
"failed_total": 123,
"throughput": {
"completed_per_hour": 123,
"failed_per_hour": 123
},
"estimated_completion_hours": 123,
"health": "healthy"
}{
"error": "UNAUTHORIZED",
"message": "Authentication required"
}{
"error": "FORBIDDEN",
"message": "Access denied: missing permission 'ai-insights-v2:analytics:read'"
}{
"error": "TooManyRequests",
"message": "Too many requests for 'Insights'",
"details": {
"name": "Insights",
"ok": false,
"retryAfter": 42.5,
"limit": 100,
"window": 60,
"remaining": 0
}
}Authorizations
BearerAuthOrgApiKeyAuth
Response
Queue statistics.
Was this page helpful?