openspecimen/rest/ng/users/password
Use this resource for change the password in the OpenSpecimen application. Use HTTP PUT method to call this API by passing the below details in JSON format.
Below are the attributes which need to be sent in the request:
Parameter | Details |
---|---|
userId | User identifier |
oldPassword | Old password of the user. |
newPassword | New password that user wants to change |
http[s]:<host>:<port>/openspecimen/rest/ng/users/password
Use this URL to change the password in openSpecimen application.
Result:
The response of this request will contains the details of the changed password.
Below is the example of the change password:
Method | URL |
---|---|
PUT | openspecimen/rest/ng/users/password |
Request | application/json |
json | { "userId":134, "oldPassword":"Login!@3", "newPassword":"Admin!@3" } |
Response | "true" |
Error Cases :
code | Applies to | Status Message |
---|---|---|
200 | All resources | Password has been updated successfully |
400 | All requests | Invalid parameters, e.g blank old password, blank new password etc. |
401 | All requests | Authorization failed, user doesn’t have authority |
404 | All requests | User not found, user with given details not present in the system |
500 | All requests | Internal server error, encountered server error while performing operations |