/api/usr/list

Use this interface to list users and groups.

Only available for the administrative group.

Prototype

Protocol HTTP/HTTPS GET
URL ip[:port]/api/usr/list
Content-Type Response: Content-Type: application/json

Request URL parameters

Parameter Description
type Optional, specify the parameter to usr to get the user list, to group to get the user group list, to get all information without specifying the parameter.
id Optional, when type is group, you can specify the id to get the group information with the specified id.
more Optional, when set to 1, you can get more detailed information about the group member.

Request Example

GET /api/usr/list HTTP/1.1
Accept: application/json, text/plain, */*
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;

Response Parameters

Response Header
Parameter Description
Content-Type Value: 'application/json; charset=UTF-8'
Response Body
Parameter Description
result Result code
groups User group list, see Groups List
users User list, refer to User Info
User Group
Parameter Description
name User group name.
id User group id.
desc User group description.
permission Permission mask.
users An arraylist of user names. If more is 1 in the request URL, then the user name and id will be contained in the result.
type User group type, options are 1 for admin, 2 for usr, 4 for viewer, 8 for custom.
User Info
Parameter Description
name User name.
id User ID.
group-name User group name
group-id User group ID
permission Permission mask.

Response Example

{
    "groups": [
        {
            "desc": "Administrator group",
            "id": 1,
            "name": "Admin",
            "permission": 4294967295,
            "type": 1,
            "users": [
                "Admin"
            ]
        },
        {
            "desc": "User groups",
            "id": 2,
            "name": "User",
            "permission": 57183,
            "type": 2,
            "users": [
                "10"
            ]
        },
        {
            "desc": "Viewer group",
            "id": 4,
            "name": "Viewer",
            "permission": 57183,
            "type": 4
        }
    ],
    "result": 0,
    "users": [
        {
            "group-id": 1,
            "group-name": "Admin",
            "id": 1,
            "name": "Admin",
            "permission": 4294967295
        },
        {
            "group-id": 2,
            "group-name": "User",
            "id": 4194304,
            "name": "10",
            "permission": 57183
        }
    ]
}

results matching ""

    No results matching ""

    results matching ""

      No results matching ""