Commands Lhings to enable the rule with the given ruleId. Once enabled the action specified by the rule will 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": true}

Example Request

  • Request URL:
  • Request headers: X-Api-Key: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
  • Request method: PUT

Example Response

  • HTTP status: 200 OK
  • Response body:

Error summary

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