Legacy Dev Forum Posts

 View Only

Sign Up

User search moving from Json to Python

  • 1.  User search moving from Json to Python

    Posted 06-05-2025 19:23

    Clayton_Curtis | 2023-01-20 00:29:12 UTC | #1

    I have a query working in Json, but my company is moving to python and i am trying to learn on the fly. is payload / query criteria:

    "query": [{ "operator": "OR", "type": "EXACT", "fields": ["divisionId"], "value": "xxx" }]} { "pageSize": 300, "pageNumber": 4, "query": [{ "operator": "OR", "type": "EXACT", "fields": ["divisionId"], "value": "xxxx" }] }

    calling this: api_instance = PureCloudPlatformClientV2.UsersApi() body = PureCloudPlatformClientV2.UserSearchRequest() # UserSearchRequest | Search request options

    try:

    Search users

    apiresponse = apiinstance.postuserssearch(body)

    Any help/example, basically trying to search all users in a division, and get agent id.

    thanks in advance


    jacobshaw | 2023-01-20 14:44:10 UTC | #2

    Hi @Clayton_Curtis

    The API Explorer has example SDK invocations for python in the invocations tab. You can follow that example for the POST /api/v2/users/search resource. You can also form your request body with the request builder there.


    system | 2023-02-20 14:44:26 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: 18067