Create and Modify User

This request is used to create a new user or update the existing one.

Method: HTTP POST method

Endpoint: http://<host_address>:<port_address>/v1/user

Create and Modify User Parameters
Parameter Cardinality Description
X-API-AppId Mandatory The application ID is used for getting user details. The default ID is auth.
X-API-Key Mandatory This key is used for getting user details. The default ID is auth.
userInfo (Body) enabled Mandatory The value can be true or false. true makes the user accessible through the configurator and Order Management System UI and false makes the user disable.
password Mandatory The password to be used for the user.
tenantId Mandatory This is the TENANT value as stored in the users table in the database. If the tenantId is not present in the database, then a new TENANT is created.
userName Mandatory It specifies the user name to be created or modified.
userRoles Mandatory It assigns the role to the user. The valid role values are ROLE_ADMIN and ROLE_USER.
Note: If the userName and tenantId provided in the request already exist, then the user is modified with the provided values.
Example for the Create and Modify User request:
{
				"user": [
				{
					"enabled": true,
					"password": "testpassword",
					"tenantId": "testTenant",
					"userName": "testuser",
					"userRoles": [
						"ROLE_ADMIN"
					]
				} 
			  ]
			}