Rule.disable

Description

Commands Lhings to disable the rule with the given ruleId. Once disabled the action specified by the rule will not be executed when the corresponding event is received.

Request specification

  • Method: PUT
  • URL: /rules/{ruleId}/enabled
  • Call parameters:
    • ruleId: the id of the rule, as returned by Rule.create.
  • Request body:
    { "name": "enabled", "value": false}

Example Request

  • Request URL: https://www.lhings.com/laas/api/v1/rules/234/enabled
  • Request headers: X-Api-Key: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
  • Request method: PUT

Example Response

  • HTTP status: 200 OK
  • Response body:
    {"responseStatus":200,"message":"OK"}

Error summary

  • 200: success.
  • 401: Api key not provided or invalid.
  • 404: given rule does not exist.
Back to top