Query User Role

Last Updated on : 2023-06-15 05:48:55

This topic describes the APIs of Query User Role.

API description

Query the role information about a specified user.

API address

GET: /v1.0/iot-03/users/{uid}/roles

Request parameter

Parameter name Type IN Required Description
uid String uri true The user ID.

Return parameter

Parameter name Type Description
result UserQueryRolesRes

Description of result

Parameter name Type Description
roles List The role set.

Description of roles

Parameter name Type Description
role_name String The name of a specified role.
role_id String The ID of a specified role.
remark String The description of a specified role.

Request example

GET: /v1.0/iot-03/users/1xx/roles

Return example

{ "result": { "roles": [ { "remark": "remark", "role_name": "test", "role_id": "13946235031515054xxx" } ] }, "t": 1623772177934, "success": true }

Error code

See Error code.