Query All Permissions of a User

Last Updated on : 2023-06-15 05:03:21

Query all permissions of a single user based on the user ID.

API address

GET: /v1.0/iot-02/users/{uid}/permissions

Request parameter

Parameter nameTypeINRequiredDescription
uidStringuritrueThe user ID.

Return parameter

Parameter nameTypeDescription
resultListThe returned result of the specified user's permissions.

Description of result

Parameter nameTypeDescription
permission_nameStringThe name of a specified permission.
orderIntegerThe order that the items are displayed.
remarkStringThe remarks.
permission_typeIntegerThe type of permission. Valid values:
  • 1: API
  • 2: menu
  • 3: button
  • 4: data
  • 5: combination
permission_codeStringThe identifier of a permission.
parent_codeStringThe identifier of a parent permission.

Request example

GET: /v1.0/iot-02/users/bsh1645068029415****/permissions

Return example

{
    "tid": "51cdceb0948811ec82481264f1be8bd1",
    "result": [
        {
            "remark": "",
            "permission_code": "SA_RESALE",
            "permission_name": "Retail product",
            "permission_type": 0,
            "order": 3
        },
        {
            "remark": "",
            "permission_code": "SA_SALES_CENTER",
            "permission_name": "Marketing center",
            "permission_type": 0,
            "order": 7
        },
        {
            "remark": "Remarks about modifications",
            "permission_code": "permissionCodeinfv",
            "permission_name": "namepermissionCodeinfv",
            "permission_type": 4,
            "order": 3
        },
        {
            "remark": "Remarks about modifications",
            "permission_code": "permissionCodeO2Kx",
            "permission_name": "namepermissionCodeO2Kx",
            "permission_type": 4,
            "order": 3
        }
    ],
    "t": 1645607375146,
    "success": true
}

Error code

For more information, see error code.