Skip to main content

Copy a custom role

POST 

/api/v1/RolesRole/:roleId/Copy

Creates a new role from an existing custom role. The copy keeps the permissions, scope and members of the original, but takes its name, description, target and all-items flags from the body, so send the role as it is returned by the get role route with a new name. Built-in roles cannot be copied.

Permission required: Administrator role.

Values for roleTarget: 0 = AccessPolicies, 1 = Credentials, 2 = Auditors.

Request​

Responses​

Returns the new role.