Add a User
This API is used to create a new user.
URL: /user
Type: POST
Parameters
| Param Type | Name | Description | Field Type |
|---|---|---|---|
Header |
sessionId** (or) Token** | Use either Session Id or Token received after login | String |
Query |
gwkey | Tenant Key. Needed only in case of multitenant installations | String |
Query |
gwsource** | Source from which the request is triggered (Eg: web, external) | String |
Payload |
loginName** | Unique names used as the username for authentication. Duplication is not allowed | String |
Payload |
password** | A password that can be used to authenticate. Note: Not relevant if ‘isExternalAuth’ is set to Y | String |
Payload |
confirmPassword** |
Reconfirm the given password Note: Not relevant if ‘isExternalAuth’ is set to Y |
String |
Payload |
isExternalAuth** | Specify if the user is from an external authentication system like LDAP, Radius, etc. Possible values are ‘Y’ for yes and ‘N’ for No | String |
Payload |
comment | Comment for the user | String |
Payload |
preferredContactMode** | Preferred contact mode. Possible values are ‘E’ for email. | String |
Payload |
email** | Email address | String |
** - Mandatory value
Possible Response Message and Code
| HTTP Code | Description | Response Message |
|---|---|---|
| 400 | Bad request | User password cannot be null or empty. |
| 201 | Created | User added successfully |
| 409 | Conflict | User name already exist. |
Sample Request/Response
Use Case
Add a new internal user with login name appviewx.
Request URL
https://appviewxapi.com/avxapi/user?gwkey=f000ca01&gwsource=external
Request Payload
{
"payload": {
"loginName": "appviewx",
"password":"QWRtaW5AMTIz",
"confirmPassword": "QWRtaW5AMTIz",
"isExternalAuth" : "N",
"comment": "This is a test user",
"preferredContactMode": "E",
"email": "[email protected]"
}
}
Response
{
"response": "User added successfully",
"message": "User added successfully",
"appStatusCode": null,
"tags": null,
"headers": null
}