Creating or modifying a user

Procedure

  1. To access Swagger REST API, enter the following endpoint in a browser: http://localhost:9091/v1/create.
  2. In the request body, pass the userName, 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"
    ]
    }
    ]
    }

Result

The system uses the combination of userName and tenantId to search for the user and identify whether to create a new user record or update an existing user record. If a user already exists, it updates the password and user role information. The userName and tenantId cannot be changed post creation. If no matching user record exists in the database, a new user is created.