Got feedback or spotted a mistake?

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

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Current »

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 :

code
Applies to
Status Message
200All resourcesPassword has been updated successfully
400All requestsInvalid parameters, e.g  blank old password, blank new password etc.
401All requestsAuthorization failed, user doesn’t have authority
404All requestsUser not found, user with given details not present in the system
500All requestsInternal server error, encountered server error while performing operations





  • No labels