fabianopinheiro | 2021-07-21 19:10:16 UTC | #1
Hello,
I'm trying update the user division using User update api at ApiExplorer, I receive a 200 OK but in Genesys Cloud the value is not change.
I tried sent division name, division id and the return is the same.
API Used: https://developer.genesys.cloud/api/rest/v2/users/#patch-api-v2-users--userId-
Someone help me?
tim.smith | 2021-07-21 19:23:08 UTC | #2
Per the documentation for PATCH /api/v2/users/{userId}, the division is not settable in that request; only documented properties should be expected to work. You can use POST /api/v2/authorization/divisions/{divisionId}/objects/{objectType} to set the user's division, using the value USER for objectType and the body containing the user's ID.
Jason_Ross2 | 2021-07-30 00:14:25 UTC | #3
Hi
You can update a user's division using PATCH with the body of your request as follows:
{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User", "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User", "urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User" ], "Operations": [ { "op": "replace", "value": { "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": { "division": "Operations" } } } ] }
Curl command would be like:
curl --location --request PATCH 'https://api.mypurecloud.com.au/api/v2/scim/users/272147f-b176-4c9d-813e-11cb2b16a2' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer 8SAI5QCxxxxxxxxxxxxxxxxxxxxxxzuQ' \ --data-raw '{ "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User", "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User", "urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User" ], "Operations": [ { "op": "replace", "value": { "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": { "division": "Operations" }
} } ] }'
system | 2021-08-30 00:14:26 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: 11541