Legacy Dev Forum Posts

 View Only

Sign Up

/api/v2/users/search, can you expand the expand?

  • 1.  /api/v2/users/search, can you expand the expand?

    Posted 06-05-2025 18:28

    whoff | 2023-09-22 19:03:30 UTC | #1

    Hello!

    I am looking at the documentation here: https://developer.genesys.cloud/useragentman/users/#post-api-v2-users-search

    What I noticed was in the response schema for a 200 OK, there seems to be additional details that can be returned inside of an expand, but I am not finding a way to actually accomplish this. Is this just a documentation error?

    
    {
      "query": [
        {
          "type": "EXACT",
          "fields": [
            "addresses.voice"
          ],
          "value": "+17085551014"
        }
      ],
      "expand": [
        "groups",
        "routingStatus"
      ]
    }

    Say I wanted to expand the search results to include groups, but also return the name of the group. By the docs this seems possible. I have tried this and other iterations with no positive result:

    
    {
      "query": [
        {
          "type": "EXACT",
          "fields": [
            "addresses.voice"
          ],
          "value": "+17085551014"
        }
      ],
      "expand": [
        "groups": ["name"],
        "routingStatus"
      ]
    }

    Eos_Rios | 2023-09-27 12:53:11 UTC | #2

    Where does the documentation imply this is possible?


    plmcgrn | 2023-10-03 19:54:24 UTC | #3

    Expand is pretty flat (can't use it for nested relationship values), and group membership is a gap with the user list/search API's. So yeah, documentation is wrong there, because it's just auto-generated from the API spec. I hit this limit too, even with the normal /api/v2/users/get API call.


    system | 2023-11-03 19:54:37 UTC | #4

    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: 22175