Hello everybody, Im using the code below but getting error 400. Anyone could tell me what is wrong? Thanks in advance
ConversationsApi = PureCloudPlatformClientV2.ConversationsApi(apiclient);
body = PureCloudPlatformClientV2.ConversationActivityQuery() # ConversationActivityQuery | query
query = '{"metrics":[{"metric":"oAlerting","details":true}],"groupBy":["ani"],"filter":{"type":"","clauses":[{"type":"","predicates":[{"type":"","dimension":"","operator":"","value":""}]}],"predicates":[{"type":"","dimension":"","operator":"","value":""}]},"order":""}'
body = json.loads(query)
api_response = ConversationsApi.post_analytics_conversations_activity_query(body)
Response:
Exception when calling ConversationsApi->post_analytics_conversations_activity_query: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', 'Content-Length': '211', 'Connection': 'keep-alive', 'Date': 'Mon, 26 Jun 2023 16:32:37 GMT', 'ININ-Correlation-Id': '835a5fe5-9c7f-4fbf-a621-9ad3205d0f6c', 'Strict-Transport-Security': 'max-age=600; includeSubDomains', 'Cache-Control': 'no-cache, no-store, must-revalidate', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 81639b0c2d006d816b1bf7f223de98fe.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'ATL56-C4', 'X-Amz-Cf-Id': 'QBubMJu4GJlRiyecbEm8-78PlZE_-jlrVYLOLEbRUBQccvWu0MxiWg=='})
HTTP response body: {"message":"Value [] is not valid for field type [QueryFilterType]. Allowable values are: and, or","code":"invalid.value","status":400,"contextId":"835a5fe5-9c7f-4fbf-a621-9ad3205d0f6c","details":[],"errors":[]}
#SystemAdministration------------------------------
Ighor Toth
------------------------------