Change Password

Change Password
Change current user password

This endpoint allows the currently authenticated user to change their password.
Authorized Roles : DSM_ADMIN or DSM_USER

Request
URI
POST
https://{api_host}/provider/current-user/password?action=change
COPY
Query Parameters
action
Required
Constraints: default: change

Action to change password. The only allowed value is 'change'.

Possible values are : change,
Header Parameters
string
Authorization
Required

Bearer token for authentication (e.g., "Bearer <token>" obtained from /provider/session)

string
Content-Type
Required

Request body content type (application/json or application/vnd.vmware.dms-v1+json)

Possible values are : application/json, application/vnd.vmware.dms-v1+json,
string
Accept
Required

Must be application/vnd.vmware.dms-v1+json

Possible values are : application/vnd.vmware.dms-v1+json,

Request Body

Request body containing user details for password change.

changePasswordDTO of type(s) application/json
Required
{
    "currentPassword": "string",
    "newPassword": "string"
}
string
currentPassword
Required

Current password of the user

string As ^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[?!@#$%^&*])[A-Za-z\d?!@#$%^&*]{8,20}$
newPassword
Required

New password for the user. Password Rule - Minimum 8 and Maximum 20 characters, at least one uppercase letter, one lowercase letter, one number and one special character (?!@#$%^&*)

Authentication
This operation uses the following authentication methods.
Responses
200

Password changed successfully. No content returned.

Operation doesn't return any data structure

400

Bad request. The provided input data is invalid.

Returns ErrorDto of type(s) application/vnd.vmware.dms-v1+json
{
    "message": "string",
    "errorCodes": {
        "type": "string"
    }
}
string
message
Optional

message

object
errorCodes
Optional

errorCodes


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"currentPassword:"string","newPassword:"string"}' https://{api_host}/provider/current-user/password?action=change