...
Mandatory fields:
- firstName
- lastName
- password
- facility
- role
- status
...
- A Facility with 'facility' id must exist
- A Role with 'role' id must exist
- A UserStatus with 'status' value must exist
- 'password' must be longer than 5 characters and shorter than 20
- If 'tagId' is not null, it must be longer than 5 characters and shorter than 20
- If 'emai' is not null, 'email' must be a well formed email
- If 'emai' is not null, 'email' must be unique among existing users.
The result in case of validation errors has the same structure as the validation errors returned by the patient creation operation.
Important notice: If a user is trying to modify his/her email, password and/or tagId, the argument 'passwordValidation' of this operation is mandatory and it must be the original (old) password of the current user.
UserId and Username fields can't be modified by this operation.
...
Name | Type | Mandatory | Description |
---|---|---|---|
{requestedUserId} | String | Yes | The id of the requested user. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
firstName | String | Yes | The new name for the user. |
lastName | String | Yes | The new last name for the user. |
String | YesNo | The new email address for the user. If this parameter is not provided, the email of the user will not be modified. | |
password | String | No | The new password for the user. |
organization | String | Yes | The new id of the organization for the user. |
facility | String | Yes | The new id of the facility for the user. |
role | String | Yes | The new id of the role for the user. |
tagId | String | No | The new NFC tag id for the new user. If this value is not provided, the original tagId of the user will not be modified. |
...
passwordValidation | String | If a user is trying to modify his/her email, password and/or tagId, the argument 'passwordValidation' -> Yes | The original (old) password of the user. This argument is used for when a user tries to modify his/her OWN email, password and/or tag id. |
curl 'http://192.168.2.103:8080/PresentationServices/users/354a7aae-ac06-4892-ac61-ce302351eb35' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Origin: file://' -H 'User-Agent: Mozilla/5.0 (Linux; Android 4.4.2; Nexus 5 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' --data 'firstName=e&lastName=e&email=e%40e.com&password=&organization=UNC&facility=UNC&role=2&status=SUSPENDED&userId=sigal&token=8a4804ef-3301-4f89-a5a9-c3fed479d8c3' --compressed
...
Name | Type | Mandatory | Description |
---|---|---|---|
{requestedUserId} | String | Yes | The id of the requested user. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
API Sample
curl -X DELETE 'http://192.168.2.103:8080/PresentationServices/users/354a7aae-ac06-4892-ac61-ce302351eb35' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Origin: file://' -H 'User-Agent: Mozilla/5.0 (Linux; Android 4.4.2; Nexus 5 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' --compressed
...