curl --location --request GET 'https://api-v2.opencopilot.so/backend/reports/insights/alerts?startDate=2023-01-01T00:00:00Z&endDate=2023-12-31T23:59:59Z' \
--header 'Authorization: Bearer YOUR_TOKEN_HERE'
{
"alerts": [
{
"type": "<string>",
"session_id": "<string>",
"wait_time": 123
}
]
}Retrieve alerts based on predefined thresholds for chat sessions
curl --location --request GET 'https://api-v2.opencopilot.so/backend/reports/insights/alerts?startDate=2023-01-01T00:00:00Z&endDate=2023-12-31T23:59:59Z' \
--header 'Authorization: Bearer YOUR_TOKEN_HERE'
{
"alerts": [
{
"type": "<string>",
"session_id": "<string>",
"wait_time": 123
}
]
}{
"alerts": [
{
"type": "LongWaitTime",
"session_id": "5f3e9c1b-7c1d-4e3f-8f9a-1a2b3c4d5e6f",
"wait_time": 1200000
},
{
"type": "LongWaitTime",
"session_id": "6a7b8c9d-0e1f-2g3h-4i5j-6k7l8m9n0o1p",
"wait_time": 900000
}
]
}
{
"error": "Unauthorized",
"message": "Invalid or missing authentication token"
}
curl --location --request GET 'https://api-v2.opencopilot.so/backend/reports/insights/alerts?startDate=2023-01-01T00:00:00Z&endDate=2023-12-31T23:59:59Z' \
--header 'Authorization: Bearer YOUR_TOKEN_HERE'
Was this page helpful?