Creating or modifying a user
- Procedure
- To access the Swagger REST API, enter the following endpoint in a browser:
http://localhost:9091/v1/create
. - Pass the following parameters in the request header:
Create or Modify User Parameters and Description Element Name Element Type Description apiId String This Id is used for login to use the APIs. This is a configurable value. apiKey String This is the password for login to use the APIs. This is a configurable value. - In the request body, pass the user name, password, and tenantId parameters.
Here is a sample JSON file with user details:
// { "user": [ { "enabled": true, "password": "affadmin", "tenantId": "TIBCO", "userName": "affadmin", "userRoles": [ "ROLE_ADMIN" ] }, { "enabled": true, "password": "superadmin", "tenantId": "TIBCO", "userName": "superadmin", "userRoles": [ "ROLE_ADMIN" ] } ] }
ResultThe system uses the combination of user name and tenantId to search for the user and identify whether to create a user record or update an existing user record. If a user exists, it updates the password and user role information. The user name and tenantId cannot be changed post creation. If no matching user record exists in the database, a new user is created.