Deactivate a Batch Rule

Deactivates an active batch rule so that data processing stops.

With this service method, you can deactivate an already active rule, thereby stopping the rule from processing data.

After a rule has been activated, it starts processing incoming time series data by testing the rule condition against the data. It's not unusual to realize that something has gone wrong with the rule configuration and that certain parameters need to be changed to make the rule perform as expected. To prevent the system from erratic behavior, it's a good idea to stop it from further processing data as long as you modify its settings. To accomplish this, you deactivate the rule with this service method.

Request

URI: /v1/projects/<projectId>/batch-rules/<ID>/activation

HTTP Method: DELETE

Permissions: <rule>.a

Request Headers

Header Required Values
If-match Yes Check if cached version matches current server version of the batch rule.

Request Parameters

Parameter Required Data Type Description Parameter Type
projectId Yes string Unique ID of the rule project to which the rule is assigned. Path
ID Yes string Unique ID of the rule to be deactivated. Path

Request Example

/v1/projects/185d9a72-a629-4b94-b421-a2f0301bb072/batch-rules/79ded171-8926-4dff-bf73-fc2d3070a100/activation

With this request, you deactivate the rule with ID "79ded171..." that is contained in rule project "185d9a72...".

Response

Response Status and Error Codes

Code Description
202 Accepted. Rule deactivated successfully.
401 Unauthorized. Rule couldn't be deactivated due to insufficient access rights.
403 Forbidden.
404 Not found. For example, an invalid rule ID or project ID has been provided.

Response Example

{
  "id": "79ded171-8926-4dff-bf73-fc2d3070a100",
  "ETag": 1234143531234253600,
  "name": "MyBatchRuleName"
    {
      "correlationId": "79ded171-8926-4dff-bf73-fc2d3070a100",
      "createdBy": "ACTIVATION_ENDPOINT",
      "createdOn": "79ded171-8926-4dff-bf73-fc2d3070a100",
      "status": "INACTIVE,ACTIVATION_TRIGGERED,ACTIVATION_COMPLETED,DEACTIVATION_TRIGGERED,DEACTIVATION_COMPLETED",
      "target": "CLOUD,EDGE",
      "activationId": "79ded171-8926-4dff-bf73-fc2d3070a100"
    }
  ],
  "texts": [
    {
      "ruleId": "79ded171-8926-4dff-bf73-fc2d3070a100",
      "language": "en",
      "shortText": "Short text for my rule",
      "description": "Long description for my rule"
    }
  ],
  "tags": [
    {
      "ruleId": "79ded171-8926-4dff-bf73-fc2d3070a100",
      "tag": "MyRuleTag"
    }
  ],
  "inputDataObjectNames": [
    {
      "ruleId": "79ded171-8926-4dff-bf73-fc2d3070a100",
      "name": "timeSeriesDOName_aggregate"
    }
  ],
  "createdOn": "2020-10-15T16:03:54.384Z",
  "lastChangedOn": "2020-10-15T16:03:54.384Z",
  "brProjectId": "4f5697d3240d4f258b900c181e35a835",
  "brDraftRuleId": "4f5697d3240d4f258b900c181e35a835",
  "brActiveRuleId": "4f5697d3240d4f258b900c181e35a835",
  "brDraftRuleServiceId": "4f5697d3240d4f258b900c181e35a835",
  "brActiveRuleServiceId": "4f5697d3240d4f258b900c181e35a835",
  "brDraftRuleSetId": "4f5697d3240d4f258b900c181e35a835",
  "brActiveRuleSetId": "4f5697d3240d4f258b900c181e35a835",
  "draftDetails": {
    "scheduling": {
      "startTime": "2019-03-18T13:26:58.756Z",
      "endTime": "2019-03-20T13:26:58.756Z",
      "value": "*/5 * * * * *"
    },
    "timeFrame": "PT1H",
    "isToggle": true
    }
  },
  "projectId": "185d9a72-a629-4b94-b421-a2f0301bb072",
  "activeDetails": {
    "scheduling": {
      "startTime": "2019-03-18T13:26:58.756Z",
      "endTime": "2019-03-20T13:26:58.756Z",
      "value": "*/5 * * * * *",
    },
    "timeFrame": "PT1H",
    "isToggle": true,
  }
}