Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  export roles and permissions

    Posted 07-26-2024 11:36
    No replies, thread closed.

    Hello,

    is there a way to export/import roles and permissions between two different organizations under the same zone?

    thx


    #API/Integrations
    #PlatformAdministration

    ------------------------------
    Rihab
    ------------------------------


  • 2.  RE: export roles and permissions
    Best Answer

    Posted 07-26-2024 13:33
    No replies, thread closed.

    Hi Rihab,

    You can use API for it. 

    To copy the role of the organization, GET /api/v2/authorization/roles

    To create this same role in another organization, API: POST /api/v2/authorization/roles

    Att,



    ------------------------------
    Breno Canyggia Ferreira Marreco
    https://www.linkedin.com/in/brenocfm-40b62182/
    ------------------------------



  • 3.  RE: export roles and permissions

    Posted 07-29-2024 07:12
    No replies, thread closed.

    Hello,

    thank you for your response.

    I should load empty schema and paste the response of the get API ? or use postman?



    ------------------------------
    Rihab
    ------------------------------



  • 4.  RE: export roles and permissions

    Posted 07-29-2024 10:04
    No replies, thread closed.

    You can use the body bellow:

    {
    "name": "",
    "description": "",
    "defaultRoleId": "",
    "permissions": [],
    "permissionPolicies": [
    {
    "domain": "",
    "entityName": "",
    "policyName": "",
    "policyDescription": "",
    "actionSet": [],
    "namedResources": [],
    "allowConditions": true,
    "resourceConditionNode": {
    "variableName": "",
    "operator": "",
    "operands": [
    {
    "user": {},
    "queue": {},
    "value": "",
    "type": ""
    }
    ],
    "conjunction": "",
    "terms": [
    {
    "variableName": "",
    "operator": "",
    "operands": [
    {}
    ],
    "conjunction": "",
    "terms": [
    {}
    ]
    }
    ]
    }
    }
    ],
    "userCount": 0,
    "roleNeedsUpdate": true,
    "default": true,
    "base": true
    }

    Att,



    ------------------------------
    Breno Canyggia Ferreira Marreco
    https://www.linkedin.com/in/brenocfm-40b62182/
    ------------------------------



  • 5.  RE: export roles and permissions

    Posted 07-30-2024 09:25
    No replies, thread closed.

    Hi Rihab,

    On the Genesys Cloud developer center you'll find 2 tools that can help you out with this.

    The first is the Genesys Cloud CLI (Command Line Interface).  If you are savy at the command line (PowerShell, Bash, etc) then you can use the CLI to easy run commands or scripts that will end up calling the Genesys Cloud Platform APIs: https://developer.genesys.cloud/devapps/cli/.  It's really easy to use and there are even ways to export to and import from a CSV file.  The CLI is good for small activities like you are describing.

    The second tool is called CX as Code (https://developer.genesys.cloud/devapps/cx-as-code/).  It is a more involved than the CLI but CX as Code is designed to do things such as export items from one org and then import them into another.  

    And of course you can always just code up something or use Postman using the Public API directly.

    I hope that helps you make some progress.



    ------------------------------
    Jim Crespino
    Senior Director, Developer Evangelism
    Genesys
    https://developer.genesys.com
    ------------------------------



  • 6.  RE: export roles and permissions

    Posted 07-30-2024 10:07
    No replies, thread closed.

    I second the CLI. VERY valuable tool, well worth the time to learn how to use it. Whenever I need to do large automated jobs, it's my go to. We hope to get into CX as code one day.



    ------------------------------
    Caleb Smith
    Interstate Gas Supply, Inc.
    ------------------------------



  • 7.  RE: export roles and permissions

    Posted 07-30-2024 10:22
    No replies, thread closed.

    I'm going to make one more suggestion here to might help speed things along.  You can probably use any AI system, but I know that with ChatGPT and Perplexity.AI you can ask the following in the same thread:

    "How can I export all roles and permissions from Genesys Cloud using the API?"

    After it answers then continue to ask:

    "How would I do that with the Genesys Cloud CLI?"

    You can continue along that thread asking it to produce that code in different languages, etc.  It can help speed things along instead of having to dig through docs and trial and error testing.



    ------------------------------
    Jim Crespino
    Senior Director, Developer Evangelism
    Genesys
    https://developer.genesys.com
    ------------------------------