How to get Inactive Users via api call from outside sugar.

Hi,
I am trying to find a user in sugar via user_name field and that user is inactive. While making api call via postman i am not getting that inactive user detail.


http://<localhost>/rest/v11/Users/?filter[0][user_name]=Test

Is there any param available for getting the inactive user via api call or do i need to make some customization in sugar to get that user.

Thanks

Parents Reply
  • Interesting, thanks for the explanation -

    You may have to write a custom API to search by Inactive users, since Sugar filters them out by default. Follow this link on how to create custom APIs - and you can write your custom logic to return the Inactive user IDs.

    But - there are a couple of other options you could explore:

    1. Make the user active, migrate the data, and then make the user inactive again. If you want to disable login, you can just set a random password in user_hash and force sugar_login as true.

    2. Get all the list of users upfront from the DB (or from the Admin UI), cache them and use the IDs directly in your migrate script.

Children