User search moving from Json to Python

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
api_response = api_instance.post_users_search(body)

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

thanks in advance

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.

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