I am consuming the / api / v2 / analytics / reporting / export endpoint and sending the following json through the body:
{
"name": "Campaign load test using api for tokenized",
"timeZone": "GMT-3",
"exportFormat": "CSV",
"interval": "2021-06-01T00: 00: 00.000Z / 2021-06-07T00: 00: 00.000Z",
"period": "P1D",
"viewType": "AGENT_PERFORMANCE_SUMMARY_VIEW",
"filter": {
"showSecondaryStatus": "true"
},
"read": true,
"locale": "en-us"
}
The answer is:
{
"message": "select at least one media type to view",
"code": "general.bad.request",
"status": 400,
"contextId": "e4829232-f910-4c1c-ae04-3f7d56542fa1",
"details": [],
"mistakes": []
}
I don't understand exactly what it is: "select at least one media type to view"
The error message indicates you have to provide a view filter with the mediaType attribute set (e.g. callback, chat, co-browse, email, message, screen share, video or voice). Without the filter, the query will fail.
I hope that helps.
Thanks,
John Carnell
Manager, Developer Engagement
{
"message": "select atleast one media type for the view",
"code": "general.bad.request",
"status": 400,
"contextId": "e7a51ab1-935e-4674-90e1-ddb408630cd5",
"details": [],
"errors": []
}
Please refer to the documented schema for the properties you can use: POST /api/v2/analytics/reporting/exports; ViewFilter is not a property. The error is saying you need to add the media type property on the filter, which exists as the property filter.