Contact Us
Log In

Add Access Control Rule

Last Updated on : 2022-05-30 06:53:15

Add an access control rule, including basic information such as name and passing time.

API address

POST: /v1.0/iot-02/access-controls

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
access_control_nameString trueThe name of a specified access control device, with up to 128 characters.
user_limitBoolean falseSpecifies whether to restrict the users' access control permission. Valid values:
  • false: Without restriction, all users have permission.
  • true: indicates that a restriction is made, and only some authorized users have access control permissions.
    time_limitBoolean falseSpecifies whether there is a time limit. Valid values:
    • false: Without a time limit, it is accessible throughout the day. Default value: False.
    • true: With a time limit, it is accessible within the time_ranges.
    time_rangesList falseThe accessible period. Maximum value: 5.

    Return parameter

    Parameter nameTypeDescription
    resultStringThe ID of a specified access control rule.

    Request example

    POST: /v1.0/iot-02/access-controls
      "access_control_name": "Access Control Rules",
      "time_limit": true,
      "user_limit": true,
      "time_ranges": [

    Return example

        "result": "146304353014959****",
        "t": 1637651734297,
        "success": true

    Error code

    For more information, see error code.