I used the dev portal with the json it works
post /api/v2/analytics/conversations/details/query
{
"segmentFilters": [
{
"type": "or",
"predicates": [
{
"type": "dimension",
"dimension": "direction",
"operator": "matches",
"value": "inbound"
}
]
}
],
"interval": "2025-04-01T00:00:00.000Z/2025-04-10T23:59:59.999Z"
}
but when i used python code, it doesn't. i am not sure what is the problem
def get_conversation():
body = PureCloudPlatformClientV2.ConversationQuery()
segmentFilter = PureCloudPlatformClientV2.SegmentDetailQueryFilter()
predicte01 = PureCloudPlatformClientV2.SegmentDetailQueryPredicate()
predicte01.type = "dimension"
predicte01.dimension = "direction"
predicte01.operator = "matches"
predicte01.values = ["inbound"]
segmentFilter.predicates = [predicte01]
segmentFilter.type = "or"
body.segment_filters = segmentFilter
body.interval='2025-04-01T00:00:00.000Z/2025-04-10T23:59:59.999Z'
try:
api_response = conversationApi.post_analytics_conversations_details_query(body)
print(api_response)
return "200 OK"
except ApiException as e:
print("Exception when calling ConversationApi %s\n" % e)
error message: response body: {"message":"The request could not be understood by the server due to malformed syntax.","code":"bad.request","status":400,"contextId":"3c7c4d5f-f70b-4ada-8a41-aac0d4bc0c38","details":[],"errors":[]}
#PlatformSDK------------------------------
Allan Zhao
------------------------------