Export selected roles

In this example, you can learn how to retrieve specific roles and their privileges from the source Tuum environment.

circle-info

To export all roles and privileges, make the same API call with an empty request body.

Use case

In this example, we will export specific roles and privileges.

Use case data
API parameters with values

The role codes we're exporting roles and privileges for are: ACCOUNTANT and TEST_LT.

circle-exclamation

Sample API call

To export specific roles and privileges, make the following API call.

https://auth-api.sandbox.tuumplatform.com/api/v1/roles/privileges/export

circle-info

Learn more about the endpointarrow-up-right in the Tuum developer portal.

Sample request

Below is an example request body of the API call for export roles.

{
  "roleCodes": [
    "ACCOUNTANT",
    "TEST_LT"
  ]
}

Sample response

Below you find an example response body to the API call above.

chevron-rightResponsehashtag

Result

The selected valid roles ACCOUNTANT and TEST_LT with related privileges have been exported.

circle-info

Use the response content to import roles and privileges into the target environment.

Last updated

Was this helpful?