latestOpenAPI 3.1.0Apache License Version 2.02026-08-17498525913.3 KB

40169ccdec5c

rule-chain-controller

Import Rule Chains

Imports all tenant rule chains as one JSON.

Available for users with 'TENANT_ADMIN' authority.

post/api/ruleChains/import

Query parameters

overwriteboolean

Enables overwrite for existing rule chains with the same name.

Request body

Example request

{
  "ruleChains": [
    {
      "id": {
        "id": "784f394c-42b6-435a-983c-b7beff2784f9",
        "entityType": "RULE_CHAIN"
      },
      "createdTime": 1609459200000,
      "tenantId": {
        "id": "784f394c-42b6-435a-983c-b7beff2784f9",
        "entityType": "TENANT"
      },
      "name": "Humidity data processing",
      "type": "A4B72CCDFF33",
      "firstRuleNodeId": {
        "id": "784f394c-42b6-435a-983c-b7beff2784f9",
        "entityType": "RULE_NODE"
      },
      "configuration": {},
      "additionalInfo": {}
    }
  ],
  "metadata": [
    {
      "ruleChainId": {
        "id": "784f394c-42b6-435a-983c-b7beff2784f9",
        "entityType": "RULE_CHAIN"
      },
      "nodes": [
        {
          "id": {
            "id": "784f394c-42b6-435a-983c-b7beff2784f9",
            "entityType": "RULE_NODE"
          },
          "createdTime": 1609459200000,
          "ruleChainId": {
            "id": "784f394c-42b6-435a-983c-b7beff2784f9",
            "entityType": "RULE_CHAIN"
          },
          "type": "com.mycompany.iot.rule.engine.ProcessingNode",
          "name": "Process sensor reading",
          "queueName": "Main",
          "configuration": {},
          "externalId": {
            "id": "784f394c-42b6-435a-983c-b7beff2784f9",
            "entityType": "RULE_NODE"
          },
          "additionalInfo": {}
        }
      ],
      "ruleChainConnections": [
        {
          "targetRuleChainId": {
            "id": "784f394c-42b6-435a-983c-b7beff2784f9",
            "entityType": "RULE_CHAIN"
          },
          "additionalInfo": {}
        }
      ]
    }
  ]
}

Response

OK

ruleChainNamestring
updatedboolean
errorstring

Example response

[
  {
    "ruleChainId": {
      "id": "784f394c-42b6-435a-983c-b7beff2784f9",
      "entityType": "RULE_CHAIN"
    }
  }
]