Add Role

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

Add a role. You can set the role name and remarks.

API address

POST: /v1.0/iot-02/roles

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
role_codeString trueThe identifier of a specified role.
role_nameString falseThe name of a specified role.
remarkString falseThe remarks.

Return parameter

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

Request example

POST: /v1.0/iot-02/roles
{
  "role_code": "roleCode****",
  "role_name": "roleNameroleCodeB8H6",
  "remark": "Remarks 1"
}

Return example

true

Error code

For more information, see error code.