---
title: "Export Rule Chains"
method: GET
path: "/api/ruleChains/export"
tags: ["rule-chain-controller"]
---

# Export Rule Chains

`GET /api/ruleChains/export`

Exports all tenant rule chains as one JSON.

Available for users with 'TENANT_ADMIN' authority.

## Query parameters

- `limit` integer, required

## Response `200`

OK

- RuleChainData — A JSON value representing the rule chains.
  - `ruleChains` RuleChain[], required — List of the Rule Chain objects.
    - `id` RuleChainId
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'RULE_CHAIN', required — string
    - `createdTime` integer — Timestamp of the rule chain creation, in milliseconds
    - `tenantId` TenantId, required
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'TENANT', required — string
    - `name` string, required — Rule Chain name
    - `type` 'CORE' | 'EDGE' — Rule Chain type. 'EDGE' rule chains are processing messages on the edge devices only.
    - `firstRuleNodeId` RuleNodeId
      - `id` string, uuid, required — ID of the entity, time-based UUID v1
      - `entityType` 'RULE_NODE', required — string
    - `root` boolean — Indicates root rule chain. The root rule chain process messages from all devices and entities by default. User may configure default rule chain per device profile.
    - `debugMode` boolean — Reserved for future usage.
    - `version` integer
    - `configuration` unknown
    - `additionalInfo` unknown
  - `metadata` RuleChainMetaData[], required — List of the Rule Chain metadata objects.
    - `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)
