The RingCentral Analytics API has one of the most complex request formats among all RingCentral APIs. If there is the smallest error made in formatting this request, then the API will return an HTTP 400 Bad Request with an error code of CMN-103.
The precise fix is impossible to document in this article, as everyone's code and apps are different. But the following can help you troubleshoot:
1. Start with a code sample you know works. Then make modifications incrementally, testing each change you make as you go.
2. Pass only the request parameters you require. Most of the parameters in an Analytics API request are optional. By passing in only the elements you require, you minimize the number of error you may unintentionally introduce.
With that advice in hand, if you are looking for a fully-formed request payload that you know will work, then try the following:
{
"grouping": {
"groupBy": "Users"
},
"timeSettings": {
"timeZone": "America/Los_Angeles",
"timeRange": {
"timeFrom": "2022-08-25T21:57:12.252Z",
"timeTo": "2023-01-10T21:57:12.252Z"
}
},
"responseOptions": {
"counters": {
"allCalls": {
"aggregationType": "Sum"
},
"callsByDirection": {
"aggregationType": "Sum"
},
"callsByOrigin": {
"aggregationType": "Sum"
},
"callsByResponse": {
"aggregationType": "Sum"
},
"callsSegments": {
"aggregationType": "Sum"
},
"callsByResult": {
"aggregationType": "Sum"
},
"callsByCompanyHours": {
"aggregationType": "Sum"
},
"callsByActions": {
"aggregationType": "Sum"
},
"callsByType": {
"aggregationType": "Sum"
},
"queueOpportunities": {
"aggregationType": "Sum"
}
},
"timers": {
"allCallsDuration": {
"aggregationType": "Sum"
},
"callsDurationByDirection": {
"aggregationType": "Sum"
},
"callsDurationByOrigin": {
"aggregationType": "Sum"
},
"callsDurationByResponse": {
"aggregationType": "Sum"
},
"callsSegmentsDuration": {
"aggregationType": "Sum"
},
"callsDurationByResult": {
"aggregationType": "Sum"
},
"callsDurationByCompanyHours": {
"aggregationType": "Sum"
},
"callsDurationByType": {
"aggregationType": "Sum"
}
}
}
}
Be the first to reply!
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.