All pages
Powered by GitBook
1 of 1

Loading...

Import all roles

In this example, you can learn how to replace all roles and their privileges in the target Tuum environment.

This endpoint is disabled for the Prod (Live) environment and is available only for non-Prod environments like DEV, TEST, or similar ones.

Use case

In this example, we showcase the steps to replace all roles and associated privileges in the target environment using the data retrieved in your export roles request.

The system will import only roles and privileges with a valid validity range.

Sample API calls

To import all roles and privileges, make the following API call with the roles and associated privileges (exported before) in the request body.

Result

All valid roles and their privileges in the target environment have been replaced with roles and associated privileges exported from the source environment.

As a precondition to import, first export all roles and associated privileges by making the API call, as shown in the with an empty request body.

Use case data
API parameters with values

We want to import all roles to the target environment and thus we have to use the roles and privileges from the response of the export done before.

https://auth-api.{another-environment}.tuumplatform.com/api/v1/roles/privileges/import

Learn more about the in the Tuum developer portal.

All roles and privileges from the 
response of the export done before.
example of exporting selected roles
endpoint