In this example, you can learn how to replace all roles and their privileges in the target Tuum environment.
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.
To import all roles and privileges, make the following API call with the roles and associated privileges (exported before) in the request body.
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.
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.