Query Multiple Permissions

Last Updated on : 2023-07-06 09:14:15download

Query multiple permissions based on the list of permission codes.

API address

GET: /v1.0/iot-02/permissions

Request parameter

Parameter nameTypeINRequiredDescription
requestPermissionQueryRequestquerytrueThe request of querying permissions.

Description of request

Parameter nameTypeINRequiredDescription
permission_codesString trueThe list of permission codes, separated with commas (,).

Return parameter

Parameter nameTypeDescription
resultListThe returned list of 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/permissions?permission_codes=aaa,bbb,ccc

Return example

{
    "tid": "4fcadb7d948811ec82481264f1be8bd1",
    "result": [
        {
            "remark": "Permission permissionCodepHhD",
            "permission_code": "permissionCode****",
            "permission_name": "namepermissionCodepHhD",
            "permission_type": 4,
            "order": 3
        }
    ],
    "t": 1645607371745,
    "success": true
}

Error code

For more information, see error code.