curl --request POST \
--url https://api.trata.ai/v1/metrics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requests": [
{
"id": "<string>",
"name": "CALLS",
"fromDate": "2023-12-25",
"toDate": "2023-12-25",
"aggregationPeriod": "MONTHLY",
"aggregationFormula": "COUNT"
}
]
}
'{
"responses": [
{
"id": "<string>",
"name": "CALLS",
"datapoints": [
{
"timestamp": "2023-12-25",
"value": "<string>"
}
]
}
]
}Get fine grained analytics data from Trata AI like call, duration stats, etc.
curl --request POST \
--url https://api.trata.ai/v1/metrics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requests": [
{
"id": "<string>",
"name": "CALLS",
"fromDate": "2023-12-25",
"toDate": "2023-12-25",
"aggregationPeriod": "MONTHLY",
"aggregationFormula": "COUNT"
}
]
}
'{
"responses": [
{
"id": "<string>",
"name": "CALLS",
"datapoints": [
{
"timestamp": "2023-12-25",
"value": "<string>"
}
]
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Show child attributes
Unique identifier for the metric request. This can be helped to co-relate the request and response
1 - 512Name of the metric
CALLS, CALL_DURATION, APPOINTMENT_SCHEDULED, PROSPECTS, INTERESTED, NOT_INTERESTED Start date to get metric request
End date until get metric request
Aggregation period for the metric request
MONTHLY, WEEKLY, DAILY Aggregation formula for the metric request
COUNT, SUM, MEDIAN Successful Response
Show child attributes
Unique identifier for the metric response. This will help co-relate the request and response
1 - 512Name of the metric
CALLS, CALL_DURATION, APPOINTMENT_SCHEDULED, PROSPECTS, INTERESTED, NOT_INTERESTED