Delete User Role

Last Updated on : 2023-07-06 09:13:33download

Delete the user and role relationship based on the user ID and role code.

API address

DELETE: /v1.0/iot-02/users/{uid}/roles

Request parameter

Parameter nameTypeINRequiredDescription
uidStringuritrueThe user ID.
requestUserRoleDeleteRequestquerytrueThe request of deleting a specified user role.

Description of request

Parameter nameTypeINRequiredDescription
role_codeString trueThe identifier of a specified role.

Return parameter

Parameter nameTypeDescription
resultBooleanIndicates whether the operation is successful. Valid values:
  • true: Deleted successfully.
  • false: Failed to delete it.

Request example

DELETE: /v1.0/iot-02/users/bsh1645068029415****/roles?role_code=roleCodegcnI****

Return example

{
    "tid": "524bc6be948811ec82481264f1be8bd1",
    "result": true,
    "t": 1645607375967,
    "success": true
}

Error code

For more information, see error code.