change-passwd
Use the interface to validate and change a user's password.
Prototype
Protocol |
HTTP/HTTPS POST |
URL |
ip[:port]/sc_cloud/user/change-passwd |
Data Format |
Request: Content-Type: application/json Response: Content-Type: application/json |
Request Cookies
Parameter |
Description |
mwcloud-sid |
A string value that is used to uniquely identify user logged-in. |
mwcloud-uid |
Current logged-in username. |
Request Body
Parameter |
Description |
id |
User ID. You can get the ID by using login. |
param |
MD5 encrypted old password. |
passwd |
MD5 encrypted new password. |
Request Example
POST /sc_cloud/user/change-passwd HTTP/1.1
Accept: application/json, text/plain, */*
Content-Type: application/json;charset=utf-8
Content-Length: 95
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;
{
"id": 1,
"param": "e3afed0047b08059d0fada10f400c1e5",
"passwd": "2e33a9b0b06aa0a01ede70995674ee23"
}
Response Parameters
Parameter |
Description |
Content-Type |
Value: 'application/json; charset=UTF-8' |
Response Body
Parameter |
Description |
result |
Result code. The options are as follows:- 0: success.
- Other values. For details about the result codes, please refer to API Status.
|
method |
change-passwd |
Response Example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 37
{
"method": "change-passwd",
"result": 0
}