Getting last login information via API call
I have looked at the documentation for the API call but when I am hitting the users endpoint: https://api.smartsheet.com/2.0/users?include=lastLogin,source&includeAll=true it is not including the lastLogin information.
If I hit: https://api.smartsheet.com/2.0/users?include=lastLogin then I will receive it for those users that have logged in. Any thoughts on why I'm not getting this info through the first API call?
Also, I would like to pull in all fields that would normally be included in /users/<userid> using a single call, is this possible?
Answers
-
Hi @chuckleswk,
When using both calls, I was able to obtain all query parameters including "lastLogin" for each ACTIVE user object who has logged in at least once. Both calls returned results in a single page.
Therefore, there doesn't seem to be anything wrong with any of them if you are intending to return this information for all users without paginating results. Please include a capture of an example of the information returned when using these calls in your environment making sure to hide any sensitive information contained that you wouldn't want to share.
Cheers!
Julio
-
Thank you for your response.
I am attaching 2 screen shots of the queries and the results. As you can see, if I'm paging then I receive all of the information, but if I'm wanting to receive it all back in a single query it does not provide me with the last login information.
-
Hi @chuckleswk,
I can't seem to see anything being incorrect in your calls. If all headers are active and the relevant users have logged in at least once, and you haven't done yet, I would recommend opening a ticket with our Support team via this form. When doing so, I'd recommend sharing the whole information (including the user data) so that it can be confirmed that the users have indeed logged in at least once.
Cheers!
Julio
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives