Use this API to retrieve the login events of all the users or a specified user within a specified time range.
Additional Information
- If a range and specific
userId
is not specified as query parameters, login history of all users over the past 7 days is returned. - If a range is not specified but a specific
userId
is specified as a query parameter, login history of the past 365 days is returned. - If the time range does not fall within the last 365 days, an error is returned.
Example Request
Login History of All Users
GET https://{hostname}/api/access/v1/login-history
GET https://trial.onetrust.com/api/access/v1/login-history?startDate=2011-12-03T10:15:30Z&endDate='2011-12-03T10:15:30Z'
Login History of a Specific User
GET https://{hostname}/api/access/v1/login-history?userId=baf826e7-91ca-4fa6-8d11-6c64661d9f02
GET https://trial.onetrust.com/api/access/v1/login-history?userId=baf826e7-91ca-4fa6-8d11-6c64661d9f02&startDate=2011-12-03T10:15:30Z&endDate='2011-12-03T10:15:30Z'