/api/usr/update

Use this interface to Change user password.

Prototype

Protocol HTTP/HTTPS POST
URL ip[:port]/api/usr/update
Content-Type Request: Content-Type: application/json
Response: Content-Type: application/json

Request Cookies

Parameter Description
mwcloud-sid A string that is used to identify current logged-in user.
mwcloud-uid Current logged-in username.
Request Body
Parameter Description
name User name, optional, use the one from cookies if not provided
old-passwd MD5-processed old password, not required for Admin group
passwd MD5 processed password

Request Example

POST /api/usr/update HTTP/1.1
Accept: application/json, text/plain, */*
Content-Type: application/json;charset=utf-8
Content-Length: xx
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;
{
  "name":"test",
  "passwd":"c4ca4238a0b923820dcc509a6f75849b"
}

Response Parameters

Response Header
Parameter Description
Content-Type Value: 'application/json; charset=UTF-8'
Response Body
Parameter Description
result Result code
Possible Error Codes
Error Code Description
MW_STATUS_NOT_EXIST User does not exist
MW_STATUS_MISMATCH Incorrect old password

Response Example

HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
content-length: xx
{
  "result": 0
}

results matching ""

    No results matching ""

    results matching ""

      No results matching ""