I understand the concern about the the inconsistency, but how many were you expecting? I’m assuming either zero or one is at least in the ballpark, correct?
From the looks of it, you’re comparing occ output to the serverinfo external monitoring endpoint.
From a cursory review of the code, it looks like occ user:lastseen is looking up the lastLogin (i.e. the most recent outright successful login attempt with a username/password) whereas the monitoring endpoint is reporting active users based on session activity (as in they’ve recently done something in NC but didn’t necessarily re-login since their session was still authenticated).
P.S. In the future, when posting for help please more specific with your examples (such as the exact curl call) so people don’t have to guess what you mean by “API” – there are a LOT of APIs in Nextcloud.
I understand the concern about the the inconsistency, but how many were you expecting? I’m assuming either zero or one is at least in the ballpark, correct?
I was expecting the numbers to match, that is 0 or 1 indeed.
From a cursory review of the code, it looks like occ user:lastseen is looking up the lastLogin (i.e. the most recent outright successful login attempt with a username/password) whereas the monitoring endpoint is reporting active users based on session activity (as in they’ve recently done something in NC but didn’t necessarily re-login since their session was still authenticated).
Could it be that calling the OCS API as I am doing (providing user credentials), means that the user I am using is counted in the activeUsers ?
P.S. In the future, when posting for help please more specific with your examples (such as the exact curl call) so people don’t have to guess what you mean by “API” – there are a LOT of APIs in Nextcloud.
Sorry, you are right, I forgot to give the API route I am using, here it is: