Query Permissions of a User

Last Updated on : 2023-07-06 09:10:56download

Query all permissions of a single user.

API address

GET: /v1.0/iot-03/idaas/spaces/{space_id}/users/{uid}/permissions

Request parameter

Parameter nameTypeINRequiredDescription
space_idStringuritrueThe ID of a specified space.
uidStringuritrueThe user ID (UID).

Return parameter

Parameter nameTypeDescription
resultList

Description of result

Parameter nameTypeDescription
permission_codeStringThe identifier of a specified permission.
nameStringThe name that is displayed.
parent_codeStringThe code of a parent permission.
orderIntegerThe order that the items are displayed.
remarkStringThe remarks.
space_idStringThe ID of a specified space.
gmt_createStringThe time when it is created.
gmt_modifiedStringThe time when it is modified.

Request example

GET: /v1.0/iot-03/idaas/spaces/12345/users/uid1/permissions

Return example

{
    "result": [
        {
            "gmt_create": "1622884271558",
            "remark": "remark1",
            "gmt_modified": "1622884271558",
            "permission_code": "permissionCode1",
            "type": 1,
            "name": "name1",
            "space_id": "12345",
            "order": 1
        }
    ],
    "t": 1623033833971,
    "success": true
}

Error code

For more information, see error code.