Endpoint: /sites/{siteid}/users/{userid}/counters

Returns user account statistics.

NOTE: As of EFT 8.1, the response will include "timePasswordChanged" (see GET Response Body Sample below).
  • GET

Method & URL

GET https://[server URL]:[port]/admin/v2/sites/{siteId}/users/{userid}/counters

GET Body Sample

Copy
#### GET USER DETAILS COUNTERS ####
## Must obtain User_ID##

GET https://{{host}}/admin/v2/sites/{{Siteid}}/users/{{UserID}}/counters HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
###

GET Response Body Sample

Copy
HTTP/1.1 200 OK Date: Mon, 08 Aug 2022 17:43:54 GMT Content-Type: application/vnd.api+json 
Content-Length: 264 Cache-Control: no-cache, no-store, must-revalidate Expires: -1 
X-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block 
Content-Security-Policy: default-src 'self' 'unsafe-inline' 'unsafe-eval' data:; 
Referrer-Policy: no-referrer 

{ "data": { "attributes": { "isConnected": false, "isLocked": false, "lastModifiedBy": "admin", 
"timeCreated": "2022-08-04 01:23:35 PM", "timeLastConnected": null, "timeLastModified": 
"2022-08-04 01:23:35 PM", "timePasswordChanged": "2022-08-04 01:23:35 PM" }, "type": 
"userCounters" } }

GET PowerShell Sample

Copy
$userid = $userList.data[0].id

# get users counters
Write-Output "Users counters"
Write-Output "-----"
$userList = Invoke-RestMethod -Uri "$baseURL/v2/sites/$siteID/users/$userid/counters" 
-Method 'GET' -Headers $authHeader
Write-Output $userList | ConvertTo-Json
foreach ($user in $userList.data)
{
    Write-Output ("User $($user.id): $($user.attributes.loginName)")
}