---
title: "Update Rule Chain Metadata"
method: POST
path: "/api/ruleChain/metadata"
tags: ["rule-chain-controller"]
---

# Update Rule Chain Metadata

`POST /api/ruleChain/metadata`

Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections.

Available for users with 'TENANT_ADMIN' authority.

## Query parameters

- `updateRelated` boolean

## Request body

- RuleChainMetaData — A JSON value representing the rule chain metadata.
  - `ruleChainId` RuleChainId, required
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'RULE_CHAIN', required — string
  - `version` integer — Version of the Rule Chain
  - `firstNodeIndex` integer, required — Index of the first rule node in the 'nodes' list
  - `nodes` RuleNode[], required — List of rule node JSON objects
    - `id` RuleNodeId
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'RULE_NODE', required — string
    - `createdTime` integer — Timestamp of the rule node creation, in milliseconds
    - `ruleChainId` RuleChainId
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'RULE_CHAIN', required — string
    - `type` string — Full Java Class Name of the rule node implementation.
    - `name` string — User defined name of the rule node. Used on UI and for logging.
    - `debugMode` boolean
    - `debugSettings` DebugSettings
      - `failuresEnabled` boolean — Debug failures.
      - `allEnabled` boolean — Debug All. Used as a trigger for updating debugAllUntil.
      - `allEnabledUntil` integer — Timestamp of the end time for the processing debug events.
    - `singletonMode` boolean — Enable/disable singleton mode.
    - `queueName` string — Queue name.
    - `configurationVersion` integer — Version of rule node configuration.
    - `configuration` unknown
    - `externalId` RuleNodeId
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'RULE_NODE', required — string
    - `additionalInfo` unknown
  - `connections` NodeConnectionInfo[], required — List of JSON objects that represent connections between rule nodes
    - `fromIndex` integer, required — Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'from' part of the connection.
    - `toIndex` integer, required — Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'to' part of the connection.
    - `type` string, required — Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure'
  - `ruleChainConnections` RuleChainConnectionInfo[], required — List of JSON objects that represent connections between rule nodes and other rule chains.
    - `fromIndex` integer, required — Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'from' part of the connection.
    - `targetRuleChainId` RuleChainId, required
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'RULE_CHAIN', required — string
    - `additionalInfo` unknown, required
    - `type` string, required — Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure'

## Response `200`

OK

- RuleChainMetaData — A JSON value representing the rule chain metadata.
  - `ruleChainId` RuleChainId, required
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'RULE_CHAIN', required — string
  - `version` integer — Version of the Rule Chain
  - `firstNodeIndex` integer, required — Index of the first rule node in the 'nodes' list
  - `nodes` RuleNode[], required — List of rule node JSON objects
    - `id` RuleNodeId
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'RULE_NODE', required — string
    - `createdTime` integer — Timestamp of the rule node creation, in milliseconds
    - `ruleChainId` RuleChainId
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'RULE_CHAIN', required — string
    - `type` string — Full Java Class Name of the rule node implementation.
    - `name` string — User defined name of the rule node. Used on UI and for logging.
    - `debugMode` boolean
    - `debugSettings` DebugSettings
      - `failuresEnabled` boolean — Debug failures.
      - `allEnabled` boolean — Debug All. Used as a trigger for updating debugAllUntil.
      - `allEnabledUntil` integer — Timestamp of the end time for the processing debug events.
    - `singletonMode` boolean — Enable/disable singleton mode.
    - `queueName` string — Queue name.
    - `configurationVersion` integer — Version of rule node configuration.
    - `configuration` unknown
    - `externalId` RuleNodeId
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'RULE_NODE', required — string
    - `additionalInfo` unknown
  - `connections` NodeConnectionInfo[], required — List of JSON objects that represent connections between rule nodes
    - `fromIndex` integer, required — Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'from' part of the connection.
    - `toIndex` integer, required — Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'to' part of the connection.
    - `type` string, required — Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure'
  - `ruleChainConnections` RuleChainConnectionInfo[], required — List of JSON objects that represent connections between rule nodes and other rule chains.
    - `fromIndex` integer, required — Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'from' part of the connection.
    - `targetRuleChainId` RuleChainId, required
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'RULE_CHAIN', required — string
    - `additionalInfo` unknown, required
    - `type` string, required — Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure'

---

[API](https://skmtc.net/thingsboard/apis/thingsboard-rest-api.md) · [All operations](https://skmtc.net/thingsboard/apis/thingsboard-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/thingsboard/thingsboard-rest-api/revisions/40169ccdec5c/schema)
