Using REST API to get the last date of login per user login

fox144
Community Member

I'm currently programming a script do delete old user logins per user account. As a context: it is possible to have more logins per user account and i would like to delete logins of users with more than one login, if the user did not use the login for a specific amount of time.

So if i use the UI, i get a listing of every information i need: user account, user logins per account, last date of login per login. But how do i get those information using the REST API? So far, i figured out to retrieve an event log per login from the API. This is the endpoint i'm using: /api/v1/audit/authentication/logins/{login_id}

The thing which confuses me: some event logs of the logins are empty, but in the UI all information is there. Where do they come from? Is there another API endpoint for this?

0 Likes