/api/usr-group/add

Use this interface to add user groups.

Only available for the administrative group.

Prototype

Protocol HTTP/HTTPS POST
URL ip[:port]/api/usr-group/add
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 Name
permissions Set permissions for user groups, refer to Permission definition
users Optional, array of user names
desc Optional, description

Request Example

POST /api/usr-group/add 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",
  "permissions":1348,
  "users":["usr1", "usr2"],
  "desc":"test"
}

Response Parameters

Response Header
Parameter Description
Content-Type Value: 'application/json; charset=UTF-8'
Response Body
Parameter Description
result Result code
id If the addition is successful, the response will contain the field representing the user group's ID.

Response Example

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

results matching ""

    No results matching ""

    results matching ""

      No results matching ""