Edit Role Permissions

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

Edit the permissions of a specified role. The new settings will overwrite the previous settings.

API address

POST: /v1.0/iot-02/roles/{role_code}/permissions

Request parameter

Parameter nameTypeINRequiredDescription
role_codeStringuritrueThe identifier of a specified role.

Description of body

Parameter nameTypeINRequiredDescription
permission_codesList trueThe identifier of a specified parent organization.

Return parameter

Parameter nameTypeDescription
resultBooleanIndicates whether the operation is successful. Valid values:
  • true: success
  • false: failure.

Request example

POST: /v1.0/iot-02/roles/123/permissions
{
  "permission_codes": [
    "permissionCode****"
  ]
}

Return example

true

Error code

For more information, see error code.