Create Permissions

Last Updated on : 2023-07-06 09:14:08download

Create permissions in bulk. You can set the permission type, display order, remarks, and parent permissions.

API address

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

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
permissionsListbodytrueThe request of creating permissions.

Description of permissions

Parameter nameTypeINRequiredDescription
orderInteger falseThe order that the items are displayed.
remarkString falseThe remarks.
permission_codeString trueThe identifier of a permission.
permission_nameString falseThe name of a specified permission.
permission_typeInteger trueThe type of the specified permission. Valid values:
  • 1: API.
  • 2: menu.
  • 3: button.
  • 4: data.
  • 5: combination.
parent_codeString falseThe identifier of a parent permission.

Return parameter

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

Request example

POST: /v1.0/iot-02/permissions
{
  "permissions": [
    {
      "permission_type": 4,
      "remark": "Permission",
      "permission_code": "permissionCode****",
      "permission_name": "namepermissionCode****",
      "order": 3
    }
  ]
}

Return example

true

Error code

For more information, see error code.