Forum Discussion

PerBonomi's avatar
6 years ago

When did these users last log in

Hi folks. I have a list of, say, 1500 user ids.

I want to throw this list at the system and get back their respective most recent logins. Is there a fairly easy way to do this that I'm overlooking?

I'm just assuming API 2 won't be happy if I tell it to give me last_login_date where user_id IN(<1500 ids>) . And I'd prefer to not loop through smaller batches as an ongoing practice.

1 Reply

  • Hi PerBonomi ,

    what about using an endpoint and APIv1 as an alternative approach?

    You can add your IDs as a Freemarker sequence and loop over this list. For each list item you can send an APIv1 request to get the last_visit_time of the current ID.

    While looping you can create/build your final response object, which contains a key/value structure with ID/last_visit_time.

    Looping through big lists and sending API request for each list item is a costly operation and you'll have to check the performance of your instance etc.

     

    Regards,

    Christian