Legacy Dev Forum Posts

 View Only

Sign Up

Not able to get all users (active,inactive and deleted) using /api/v2/users

  • 1.  Not able to get all users (active,inactive and deleted) using /api/v2/users

    Posted 06-05-2025 18:24

    Rafael | 2022-11-07 23:30:26 UTC | #1

    Hi Genesys,

    I'm trying to retrieve all users independently of their state (active, inactive and deleted) using the /api/v2/users. However it return to me a strange number of agents. I'm calling the REST API without any filter what I would expect to receive all users. My Genesys Org instance has:

    • 33 active users
    • 973 inactive users
    • 146 deleted users

    When I make the REST API call without filters I get 36 users what is a very strange number. How I can get all the users independently of their state using REST API's?

    Best Regards,


    Jerome.Saint-Marc | 2022-11-08 15:06:07 UTC | #2

    Hello,

    GET /api/v2/users supports a "state" query parameter which can take the following values: active, inactive, deleted or any I think the default value for the state parameter is "active" - that's why you only got active users running your request with no filter/parameter set (state = active).

    To get all users, set your state query parameter to *any*

    The reason why you may get more users than what you see in the Genesys Desktop - Admin - People (when you request active users) is that it seems some integrations (Webhook integration with JIRA, Generic, .... appear to create invisible users when enabled. At least that's what I see in my own Genesys Cloud environment (just realized it running this test).

    Regards,


    system | 2022-12-09 15:06:15 UTC | #3

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


    This post was migrated from the old Developer Forum.

    ref: 17112