I'm trying to create a realtime conversations overview for a user. For this I'm subscribing on the "v2.users.{id}.conversations" topic. This only gives me new updates, so i also need to get the current conversations. For this i'm using the "/api/v2/analytics/conversations/details/query" endpoint. The problem is that both schema's are different. The only solution i see is to call the " /api/v2/conversations/{conversationId}" endpoint for every conversation returned from the "/api/v2/analytics/conversations/details/query" endpoint. This doesn't look good, but i don't see another solution. Am I missing something?
If you are leveraging a user context related OAuth grant flow, to obtain your authorization token (e.g. Token Implicit Grant, Authorization Code Grant, SAML2 Bearer Grant, PKCE Authorization Code Grant), then, you can use GET /api/v2/conversations to get the active conversations for the logged in user.
Then, the analytics query is the right method to get the list of conversation details for your other user.
And if you need to retrieve the participant attributes/data for each of these conversations, you'll have to use the GET /api/v2/conversations/{conversationId} request for each.
Apart from participant data, the information in conversation details is overall similar to what's in the conversation context (just set under different attributes/structures).