Every day our end-users log 2000 calls. So we have to hit the "/api/v2/conversations/{conversationId}" endpoint at least 2000 times and extract the "attributes" from the JSON response. This process is time and resource-consuming. Could you please let us know if any endpoints are available to query conversations that have "attributes" in their JSON response?
If you do not need them in real time you can obtain them in bulk from: POST /api/v2/analytics/conversations/details/jobs
But they may not be available before 6 am the next day depending on processing.
If you need them in real time your only options are the one you are currently using, or creating a websocket listener and subscribing to the queues you want to capture from. You will get the same conversation multiple times from that listener and require a dedicated server to be running it, so obvious drawbacks.
Which endpoint are you referring to? There are many analytics endpoints that return conversation data. The answer is different depending on which one you're talking about. Analytics jobs have attribute data. Non-job queries don't.
That resource does contain attribute data, but it is not suitable for your use case (bulk data retrieval). It also only has conversation data for 60 days; after that it's only available via analytics resources. The purpose of this endpoint is for applications to use while working with live/recent conversations on an individual basis. That usually means apps like an agent's desktop app.
I believe you meant you want to filter the query in this way. That's not possible. Your app must retrieve conversations via things you can filter for and then refine the results based on attribute data as post-processing within the app.
Ok, I get it. So we will implement the change to request the endpoint in a loop.
Following is a sample, and we wanted to filter all conversations containing the "attribute" property. Note: I have removed identifiers and some data to keep the example relevant.