It seems that that “member” rest API is no longer return if a member peer is online. That is an API call like that does no longer contains an “online” field:
I wrote an app that also used the “Online” flag to see which users are currently connected to the network. It’s annoying it was obviously recently removed. I find the API documentation at ZeroTier and what’s actually being transmitted via json to be different and it’s not the first time I’ve seen discrepancies between what’s written and what’s actually available.
Of course there is the “onlineMemberCount” from the network query: curl -X GET -H “Authorization: token LongTokenHere” https://api.zerotier.com/api/v1/network/n3tw0rk1dH3r3 which can give you the total users online however it would be nice if they told you somewhere what constitutes an Online user. We can probably get the values from “lastOnline” or “lastSeen” with a bit of math however I ran a test and even though I was currently connected, those values were returning weeks rather than minutes. I do know that it sometimes takes a while for those values to update but this was after 20 minutes of being connected.
So, not sure where to go with this. Guessing it was the time discrepancies that made them decide to drop “Online” from the previous json file. Anyone have some other answers?
Thanks AndrewZ, that helps explain things. I’ve recoded the app using “clock” - “lastSeen” and set the user as online if the time has been less than 2 minutes (seems they used 3 minutes as their previous counter but I can tweak that as a user changeable value in the app). Nice to see the issue was addressed and an explanation put forth on how it worked before and how it now works.