Search

Assign Roles

Last Updated: Mar 8, 2023

Articles

Use this API to assign or modify roles for the specified user in the App.

  • API: {URL}/docube/api/app/{appgroup_name}/{app_name}/updateRoles

    To account for spaces in app or group names, replace them with “%20”.

    If the appgroup_name is “Basic Training”, it should be written as “Basic%20Training”. Similarly, if the app name is “Check app”, it should be written as “Check%20app”.

  • API Type: POST
  • Authentication Type: Token- Based Authentication or No Auth can be used by providing JSESSION ID (as Cookies).
  • Request API Body (JSON):

    [{
    “name”: “username”,
    “rolesToAdd”: [“Roles to be added”],
    “rolesToRemove”: [“Roles to be removed”]
    }]

  • Sample API Body:
    • Adds DESIGNER role for user John Smith and another user Peter Paul.


      [  {
      “name”: ”John Smith”,
      “rolesToAdd”: [ ”DESIGNER” ],
      “rolesToRemove”: []
      },
      {“name”: ”Peter Paul”,
      “rolesToAdd”: [ ”DESIGNER” ],
      “rolesToRemove”: [] } ]

    • Removes DESIGNER role for user John Smith.

      {
      “name”: “John Smith”,
      “rolesToAdd”: [ ],
      “rolesToRemove”: [“DESIGNER” ]
      }

    • Adds Release Role and removes Support role for user John Smith.

      {
      “name”: “John Smith”,
      “rolesToAdd”: [ “Release” ],
      “rolesToRemove”: [“Support” ]
      }

Make sure that double quotation marks (“) are used throughout in the API.

To view all the APIs, click here.

Did you find what you were looking for?