reset-passwd

Use the interface to reset a user's password without validation.

Only available for users with administrative rights.

Prototype

Protocol HTTP/HTTPS POST
URL ip[:port]/sc_cloud/user/reset-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 obtain by usign get-users.
passwd MD5 encrypted new password.

Request Example

POST /sc_cloud/user/reset-passwd HTTP/1.1
Accept: application/json, text/plain, */*
Content-Type: application/json;charset=utf-8
Content-Length: 52
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;
{
  "id": 2,
  "passwd": "c81e728d9d4c2f636f067f89cc14862c"
}

Response Parameters

Response Header
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 reset-passwd

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 36
{
  "method": "reset-passwd",
  "result": 0
}

results matching ""

    No results matching ""

    results matching ""

      No results matching ""