{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/AnalyticsQueryResult", "title": "AnalyticsQueryResult", "type": "object", "properties": { "name": { "type": "string", "description": "This is the unique key for the query." }, "timeRange": { "description": "This is the time range for the query.", "allOf": [ { "$ref": "#/components/schemas/TimeRange" } ] }, "result": { "description": "This is the result of the query, a list of unique groups with result of their aggregations.\n\nExample:\n\"result\": [\n { \"date\": \"2023-01-01\", \"assistantId\": \"123\", \"endedReason\": \"customer-ended-call\", \"sumDuration\": 120, \"avgCost\": 10.5 },\n { \"date\": \"2023-01-02\", \"assistantId\": \"123\", \"endedReason\": \"customer-did-not-give-microphone-permission\", \"sumDuration\": 0, \"avgCost\": 0 },\n // Additional results\n]", "type": "array", "items": { "type": "object" } } }, "required": [ "name", "timeRange", "result" ] }