michael | 2018-09-27 04:13:20 UTC | #1
Currently I am posting api/v2/analytics/conversations/aggregates/query, with JSON params: {"interval": "\<yesterday\>/\<today\>", "granularity": "P1D", "groupBy": ["conversationId"], "metrics": ["nOffered"]} Just To get a list of all the conversation_ids (created?) yesterday.
Then I go through one by one getting: https://api.mypurecloud.com/api/v2/conversations/\<conversationId\>
This of course seems very wasteful, is there anyway to grab batches of Ids at a time? i.e. https://api.mypurecloud.com/api/v2/conversations/\<conversationId1\>,..,\<conversationId99\>
Is there a way I can pull in all the conversations from a time window with a lot less API usage?
anon28885283 | 2018-09-27 07:33:09 UTC | #2
Have you tried the /api/v2/analytics/conversations/details/query
https://developer.mypurecloud.com/api/rest/v2/conversations/index.html#postAnalyticsConversationsDetailsQuery
michael | 2018-09-27 15:11:10 UTC | #3
I thought that was it! But on a deeper look, details/query returns objects of a little different structure, missing some information the full conversation object has :(.
Specifically the object returned from api/v2/conversations/<conversationId>, has nested Call objects within each participant object.
While api/v2/analytics/conversations/details/query returns objects whose nested participant objects dont have call objects. Also it looks like those nested participant objects don't have attributes either
tim.smith | 2018-09-27 15:17:08 UTC | #4
The structure of the conversations responses is a bit different from the analytics detail response, but they should have nearly identical data. You can definitely identify the media type for each participant from both. You are correct about the participant attributes, however. If you need those, the only way to get them is by using the conversations API.
michael | 2018-09-27 15:50:04 UTC | #5
Thanks for your help!
system | 2018-11-25 17:02:45 UTC | #7
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 3641