codec
codec

Reputation: 8806

Softlayer API to get date user last accessed softlayer portal

Is there any API to get date user last accessed soft layer portal? There are no APIs for this it seems.

Thanks

Upvotes: 0

Views: 69

Answers (1)

There is no a specific method, but you could take a look at the logs, it logs when the uses logins successful and you could use filters to get only the logs which are for login successful of an specific user. take a look at this Restful

GET https://api.softlayer.com/rest/v3.1/SoftLayer_Event_Log/getAllObjects?objectFilter={"username":{"operation":"mysuername"},"eventName":{"operation":"Login Successful"}}

Note: replace "mysuername" with the username of the user you wish to get the logs

The request above will return all events which are equal to "Login Successful" for the user "mysuername". The events contains the date when event has been created and they are order by DESC. So you just need to see the first data to know the date that user last accessed softlayer.

Regards

Upvotes: 0

Related Questions