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.
As a precondition to import, first export all roles and associated privileges by making the API call, as shown in the example of exporting selected roles with an empty request body.
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.
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.
All roles and privileges from the
response of the export done before.
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.
https://auth-api.{another-environment}.tuumplatform.com/api/v1/roles/privileges/import
Result
All valid roles and their privileges in the target environment have been replaced with roles and associated privileges exported from the source environment.
Last updated
Was this helpful?