Read All Sessions
GET {{apiPath}}/environments/{{envID}}/users/{{userID}}/sessions
The GET /environments/{{envID}}/users/{{userID}}/sessions
operation returns a list of all sessions for the specified user and environment, in descending order based on the session date.
The session information returned includes session location, date, browser, operating system, and device information.
There's a limit of 10 sessions per user, so that is the maximum number of sessions returned.
Self-service scope
Scope: p1:read:sessions
Role information
A user having the Identity Data Administrator role assigned at the Population level can read sessions for any users in the assigned populations. They cannot read sessions for users outside of those populations, even if the users are in the same environment.
A user having the Identity Data Administrator role assigned at the Environment level can read the sessions of any user in any population in that environment.
RESPONSES
status: OK
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/710d6278-ccce-4a91-bdb9-ac7a4a0e60d5/sessions"}},"_embedded":{"sessions":[{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/710d6278-ccce-4a91-bdb9-ac7a4a0e60d5/sessions/465b7031-292f-4641-941f-e21240a88a43"},"environment":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"user":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/710d6278-ccce-4a91-bdb9-ac7a4a0e60d5"}},"id":"465b7031-292f-4641-941f-e21240a88a43","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"user":{"id":"710d6278-ccce-4a91-bdb9-ac7a4a0e60d5"},"createdAt":"2020-07-22T19:26:10.680Z","activeAt":"2020-07-22T19:26:55.666Z","locations":[{"at":"2020-07-22T19:26:55.666Z","remoteIp":"174.xx.xx.xxx","city":"tacoma","state":"washington","country":"united states"}],"lastSignOn":{"remoteIp":"174.xx.xx.xxx","at":"2020-07-22T19:26:55.665Z"},"browser":{"name":"Chrome","version":"83.0.4103"},"operatingSystem":{"name":"Mac OS X","version":"10.13.6"},"device":{"type":"Other"}},{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/710d6278-ccce-4a91-bdb9-ac7a4a0e60d5/sessions/9729e107-bb00-4c46-8b49-7c0c1d51761c"},"environment":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"user":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/710d6278-ccce-4a91-bdb9-ac7a4a0e60d5"}},"id":"9729e107-bb00-4c46-8b49-7c0c1d51761c","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"user":{"id":"710d6278-ccce-4a91-bdb9-ac7a4a0e60d5"},"createdAt":"2020-07-22T22:21:31.693Z","activeAt":"2020-07-30T18:51:39.384Z","locations":[{"at":"2020-07-22T22:21:42.384Z","remoteIp":"174.xx.xx.xxx","city":"tacoma","state":"washington","country":"united states"},{"at":"2020-07-22T22:27:35.705Z","remoteIp":"174.xx.xx.xxx","city":"tacoma","state":"washington","country":"united states"},{"at":"2020-07-30T18:51:01.887Z","remoteIp":"174.xx.xx.xxx","city":"tacoma","state":"washington","country":"united states"},{"at":"2020-07-30T18:51:39.384Z","remoteIp":"174.xx.xx.xxx","city":"tacoma","state":"washington","country":"united states"}],"lastSignOn":{"remoteIp":"174.xx.xx.xxx","at":"2020-07-30T18:51:01.887Z"},"browser":{"name":"Chrome","version":"83.0.4103"},"operatingSystem":{"name":"Mac OS X","version":"10.13.6"},"device":{"type":"Other"}}]},"count":2,"size":2}