Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Change Password

openspecimen/rest/ng/users/password

Use this API to change the user passwords.

The following table lists the attributes that need to be sent in the API request body.


Parameter
Details
userIdUser identifier
oldPassword

Old password of the user.

This is not mandatory if

a) the super-admin user is invoking this API and

b) the super-admin user is not changing his/her own password!

newPasswordNew user password


http[s]://<host>:<port>/openspecimen/rest/ng/users/password

Use this URL to change the user password

Below is an example of the change password API request/resposne.

Method
URL
MethodPUT
URL/openspecimen/rest/ng/users/password
Content typeapplication/json
Body
{
    "userId": 134,
    "oldPassword": "Login!@3",
    "newPassword": "Admin!@3"
}

Response

"true"


 Error Cases :

HTTP Response Code
Description
200Password has been updated successfully
400
  1. Invalid parameters - empty new password, userId not specified
  2. User doesn't have rights to change the password
  3. User (userId) does not exist
  4. Input old password does not match etc
500Unknown, unhandled system errors.





Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com