Change user's password
Changes user's password, the old password must be given.
This operation can be invoked on behalf of the current user only.
Example cURL requests
Change user's password
curl -u username:password -H "Content-type: application/json" -X PATCH \
-d '{"oldPassword": "password", "newPassword": "password123"}' \
https://$HOST/api/v3/onezone/user/password
Request body
User password update request.
| Property | Type & Description |
|---|---|
oldPassword string The old user's password (in plaintext) or null if it was never set. | |
newPassword string The new user's password (in plaintext). | |
Request Examples
{
"oldPassword": "7bNN89d453za62",
"newPassword": "lS1c6FD2mxB2ff"
}Responses
User password changed successfully.
Invalid request.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authentication error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Authorization error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server Error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}