jaread83
6 years agoChampion
Online users API V2 call brings back duplicates
I am trying to bring back a list of all online users using the V2 api but when trying it out on the live environment, it shows a lot of duplicates - possibly other browser sessions? Not sure.
Is it possible to remove these duplicates in the API call?
Here is my code:
<#assign query = "SELECT id, login, avatar, view_href, rank.id, rank.name FROM users WHERE online_status = 'online' LIMIT 100" />
<#assign res = restadmin("2.0", "/search?q=${query?url}?").data.items />
Any help would be greatly appreciated!
Thanks,
Jack