Last login timestamp?

users

#1

Trying to pull users last login date, but I do not see any option for this? Does anyone know away to do this via the API? We ware not using SSO for PD.

{
“user”: {
“id”: “PXPGF42”,
“type”: “user”,
“summary”: “Earline Greenholt”,
“self”: //api.pagerduty.com/users/PXPGF42",
“html_url”: “https://subdomain.pagerduty.com/users/PXPGF42”,
“name”: “Earline Greenholt”,
“email”: “125.greenholt.earline@graham.name”,
“time_zone”: “America/Lima”,
“color”: “green”,
“role”: “admin”,
“avatar_url”: d=mm&r=PG",
“description”: “I’m the boss”,
“invitation_sent”: false,
“contact_methods”: [


(Nadine Javier) #2

Hi there,

Thanks for reaching out.

Currently, it is not possible to get a user’s last login timestamp via the API, but you can reach out to PagerDuty Support(support@pagerduty.com) and we can provide you with that information!

Cheers,


#3

Is it possible to export the results of a user reports to csv or xml? Being able to see 6 months of on-calls would be beneficial, where the API only allows a range of 3 months.


(Jay Chiarella) #4

Hi,

Unfortunately it’s not currently possible to export the users report to CSV, however we’d be happy to create a feature request for you on this behalf.

A workaround could be to navigate to the Users Reports -> select the desired date range -> and copy and paste the table to a spreadsheet such as excel. You should see the data of the table that way!

In regards to your second comment, while it’s only possible to view 3 months per API request on the /oncalls endpoint, it’s possible to make multiple REST API requests to view a different 3 month period if you modify the since and until request parameters.

I hope this helps!

Cheers,


(system) closed #5

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.