Updating the users division through python scripts

Hi,

I'm new to API s, Could someone help me with Getting the user details and changing the Division and Roles of a particular user using python script.

I am able to connect to Genesys through API and need little input further to get user details and change the Divisions.

Thanks in Advance.

Hello Komali,

You can use these user apis linking below for the use-case.

Getting user information: https://developer.mypurecloud.com/api/rest/v2/users/#get-api-v2-users--userId-
Assigning role to a user: https://developer.mypurecloud.com/api/rest/v2/users/#put-api-v2-users--userId--roles Adding divisions to roles: https://developer.mypurecloud.com/api/rest/v2/users/#post-api-v2-authorization-subjects--subjectId--divisions--divisionId--roles--roleId-

I hope this is helpful to you.

Thanks and Regards,
Mrunal

Hi Mrunal,

Thank you for the links, those are helpful.

Hi Murnal,

Is there any way for updating User divisions using user_id directly.

For updating users division, i am passing as below, it is throwing error.
body = [PureCloudPlatformClientV2.liststr] # list[str] | Object Id List

body = [PureCloudPlatformClientV2.list'bd1583a0-4ded-4415-837a-7346376784ec']

AttributeError: module 'PureCloudPlatformClientV2' has no attribute 'list'

If im passing without list, it is throwing syntax error. Could someone please help. I tried all possible ways, its not working.

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