saveUser
Inserts/updates user document.
HTTP POST /ctreplay/:domain?/saveUser
Path variables:
Name | Mandatory | Type | Description |
---|---|---|---|
domain | NO | STRING | Unique domain identifier |
Authorization: BEARER (token returned by EasyCIM SSO)
Request body:
Name | Mandatory | Type | Description |
---|---|---|---|
document | YES | OBJECT | userobject to be saved/updated. (if id property is present the user will be updated, otherwise a new user will be inserted) |
Response:
Type: JSON
Name | Type | Description |
---|---|---|
result | BOOLEAN | If true, the service response was performed correctly |
error | NULL / STRING | Contains the error description if an error has occurred in the request |
id | STRING | document id. (only if new document is created, otherwise empty string) |
Example:
Request:
http://<hostname>:<port>/ctreplay/default/saveUser
Request Body to update an existent user (“id” field is present):
{
"document":{
"id": "5eeb856a5bdd4841745497e6",
"user":"gverde1",
"profile":"5eeb85035bdd4841745497e3",
"role":"user"
}
}
Response:
{
"result": true,
"id": "",
"error": null
}
Request Body to save a new user (“id” field is not present):
{
"document":{
"user":"Default_Oper1",
"profile":"5eeb85035bdd4841745497e3",
"role":"user"
}
}
Response: