Forum Discussion
Or you can try to go over the metric collection with API v2
SELECT * FROM metrics WHERE id IN('kudos_events_received') AND user.id = '<userid>'
but this will only give you the total count of kudos for a user overall (I think), according to the docs this (at least technically) should work, but it doesn't:
SELECT * FROM metrics WHERE id IN('kudos_events_received') AND user.id = '<userid>' AND board.id = '<boardid>'
will give this very informative error =):
{ "status" : "error", "message" : "invalid query syntax for SELECT * FROM metrics WHERE id IN ('kudos_events_received') AND user.id = '<userid>' AND board.id = '<boardid>'", "data" : { "type" : "error_data", "code" : 603, "developer_message" : "", "more_info" : "" }, "metadata" : { } }
maybe SuzieH can gather some info here why this constraint combination doesn't work, while others (such as role.id and board.id together) do?
To summarize: For now it seems that Parshant's API v1 call is what you want to use for your use case...unfortunate, yep.
- SuzieH7 years agoKhoros Alumni (Retired)
Thanks for pulling me in luk. The inability to constrain by the user ID/board ID combo seems to be a bug. I'm passing on the question to Engineering for verification. karthikeyan, Parshant's reply to use V1 to find the count is the right path at this point. Unfortunately, we have not built out support for constraining the Users collection by board ID. That would be the most efficient solution.
Related Content
- 5 years agoInactive User
- 2 years ago
- 2 years ago
- 8 years ago
- 5 years ago