TarikSeyceri | 2023-02-27 14:02:11 UTC | #1
Hi, i am trying to send a post request through API Explorer, for this endpoint
POST /api/v2/analytics/users/aggregates/query Query for user aggregates
with input:
{ "interval": "2023-02-26T21:00:00.000Z/2023-02-27T20:59:00.000Z", "filter": { "predicates": [ { "type": "dimension", "dimension": "userId", "operator": "exists" } ], "type": "and" }, "metrics": [ "tAgentRoutingStatus", "tOrganizationPresence", "tSystemPresence" ] }
i am getting response: 500 Internal Server Error
{ "message": "Server resources are unable to complete the request.", "code": "internal.server.error", "status": 500, "messageParams": {}, "contextId": "db8dd7bc-970a-4383-a4cc-d6158d630a51", "details": [], "errors": [] }
It seems that the problem from the operator "exists", i need this operator to list all existing users for the aggregation. when i give a value ("picking an agent")
it gives me error 400:
{ "message": "value must be null when using the exists/notExists operators", "code": "bad.request", "status": 400, "messageParams": {}, "contextId": "380d6574-85fa-4070-8d77-a2817a5c6c66", "details": [], "errors": [] }
Can anybody advice about this matter? Thank you.
Sosy | 2023-03-06 17:18:09 UTC | #2
Hi TarikSeyceri
we've been having the same problem (we tried with the same body you posted and a different one)... have you been able to make it works? Or do you have any news if it's a global api malfunction?
Thanks
tim.smith | 2023-03-06 17:28:10 UTC | #3
@TarikSeyceri @Sosy please open a case with Genesys Cloud Care to report and investigate the 5xx errors. All 5xx errors can only be investigated by Care.
Though if I had to guess, I'd say the query you're building doesn't make sense. All presence events will of course be in the context of a user, so asking for user presence data where a user exists is redundant and not an effective way to filter data from this endpoint. See https://developer.genesys.cloud/analyticsdatamanagement/analytics/aggregate/user-query for documentation on using this endpoint. The example query shows filtering with a predicate setting the dimension to userId and the value to the ID of a user. As explained in the limitations section, you can add up to 100 users in the filter; if you need to get data for more users, make additional queries with up to 100 additional users in each query.
TarikSeyceri | 2023-03-07 07:56:12 UTC | #4
Hello All,
I am trying to get aggregated analysis data for all agents at once and the response is resource error,
I opened a case: they said, it is a bug in the system, they are gone work on fixing it, but not anytime soon.
tim.smith | 2023-03-07 14:29:59 UTC | #5
TarikSeyceri, post:4, topic:18615
I am trying to get aggregated analysis data for all agents at once
Please refer to the link above.
Limitations
Filtering and group-by is limited to the userId dimension only. A single query may contain no more than 100 userId predicates.
system | 2023-04-07 14:30:25 UTC | #6
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: 18615