User's joined
status does not change after following commands, that used to work before.
api = RoutingApi()
api.post_routing_queue_users(queue_id, [{'id': user_id, 'joined': False}])
What is the recommended way to set joined status to False?
User's joined
status does not change after following commands, that used to work before.
api = RoutingApi()
api.post_routing_queue_users(queue_id, [{'id': user_id, 'joined': False}])
What is the recommended way to set joined status to False?
Can you provide a correlation ID from a response where changing the joined state did not work?
there was no correlation id in the response.
the return value of api.post_routing_queue_users(queue_id, [{'id': user_id, 'joined': False}])
was an empty string ''
.
You should be able to get it by setting PureCloudPlatformClientV2.configuration.debug = True
in your application. That will cause debug info about the request/response to be logged.
2018-03-08 16:13:40,564 DEBUG Starting new HTTPS connection (1): login.mypurecloud.ie
send: b'POST /oauth/token HTTP/1.1\r\nHost: login.mypurecloud.ie\r\nUser-Agent: python-requests/2.18.4\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nAuthorization: Basic ***********\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 29\r\n\r\n'
send: b'grant_type=client_credentials'
reply: 'HTTP/1.1 200 OK\r\n'
2018-03-08 16:13:40,811 DEBUG https://login.mypurecloud.ie:443 "POST /oauth/token HTTP/1.1" 200 147
header: Content-Type header: Date header: Inin-Correlation-Id header: Strict-Transport-Security header: Content-Length header: Connection send: b'POST /api/v2/routing/queues/c60ae5c5-b8e4-4343-b589-f5b9bc4c1148/users HTTP/1.1\r\nHost: api.mypurecloud.ie\r\nAccept-Encoding: identity\r\nContent-Length: 65\r\nAccept: application/json\r\nContent-Type: application/json\r\nUser-Agent: PureCloud SDK/python\r\npurecloud-sdk: 25.0.1\r\nAuthorization: Bearer **************\r\n\r\n'
send: b'[{"id": "880d46e2-5448-445d-be7a-96b660bec371", "joined": false}]'
reply: 'HTTP/1.1 200 OK\r\n'
2018-03-08 16:13:40,887 DEBUG https://api.mypurecloud.ie:443 "POST /api/v2/routing/queues/c60ae5c5-b8e4-4343-b589-f5b9bc4c1148/users HTTP/1.1" 200 0
header: Content-Type header: Content-Length header: Connection header: Date header: inin-ratelimit-count header: inin-ratelimit-allowed header: inin-ratelimit-reset header: ININ-Correlation-Id header: Cache-Control header: Pragma header: Expires header: X-Cache header: Via header: X-Amz-Cf-Id 2018-03-08 16:13:40,888 DEBUG response body:
It appears this is an issue with using client credentials. This should work correctly when using the implicit or auth code grant types where a user logs in. I've opened AS-1059 to investigate.
@vkondula To circle back on this, the reason that the joined
property isn't working is because that API is incorrectly documented and doesn't actually accept the joined
property. The only valid property in the request is id
. The documentation will be updated accordingly.
The correct way to join/unjoin a user is to use PATCH /api/v2/routing/queues/{queueId}/users/{memberId}.
so there is no way to update joined status in bulk? May I ask why this feature was removed?
Correct.
May I ask why this feature was removed?
According to the dev team, using the joined property with that API resource never had any effect. The documented contract was incorrectly reused from another resource (copy/paste error when the API was first written) and therefore documents properties that were never intended to work.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.