For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create rule

Create a new rule in your workspace using POST /dev/v1/rule. The request body must include name and type. The type determines which other fields are required:

  • type = simpleRulecustomInput, conditions (startNode + nodes), action (then / else), settings, optional firstCustomInput. Leave decisionTable rows/properties/results empty or null for a pure simple rule.

  • type = decisionTablecustomInput, conditions, decisionTable (firstRow, firstProperty, firstResult, rows, properties, results), action.then.outputData, policy, settings. Do not use ruleSet / ruleChain for the table itself.

  • type = ruleSetruleSet (array of rule IDs), ruleSetPolicy, firstRuleChain, ruleChain, settings. conditions / decisionTable are typically empty.

A minimal stub (only name, type, dataSetId) is not sufficient to create a working rule. You need the full payload shape Nected expects—the same structure you see when you get a rule by id (minus top-level id / checksum on create).

Create rule

post

Create a new rule. Request body must include name and type (simpleRule, decisionTable, or ruleSet).

Use the Examples dropdown for a complete, copy-paste-ready payload per type. Create returns data.id and data.checksum (see 201 response example).

Authorizations
Nected-API-KeystringRequired

Dev API key (Nected-API-Key header)

Header parameters
Nected-BranchstringOptional

Branch name (optional)

Body

Request body for Create rule. Must include name and type. type is one of simpleRule, decisionTable, or ruleSet.

The high-level shape is the same for all types, but which fields you fill vs. leave blank depends on the rule type.

Shared fields (all types)

  • name (string, required): Rule name.
  • type (string, required): One of simpleRule, decisionTable, ruleSet.
  • description (string, optional).
  • dataSetId (string, optional): ID of the dataset used by the rule (when applicable).
  • customInput (object, optional): Map of custom input definitions keyed by input name.
  • settings (object, optional): Common runtime settings (isEnabled, api, schedule, cache, dateFormat, timezone, etc.).
  • dependencyMap (array, optional): Reserved for advanced use; usually empty on create.

When type = simpleRule

  • Typically filled: conditions, action, customInput, settings, firstCustomInput (optional).
  • Should be empty / null: decisionTable.rows, decisionTable.properties, decisionTable.results for pure simple rules.
  • Rule set fields: ruleSet, ruleSetPolicy, firstRuleChain, ruleChain, policy are not used for evaluation of a pure simpleRule.

When type = decisionTable

  • Must be filled: decisionTable (firstRow, firstProperty, firstResult, rows, properties, results), action.then.outputData, policy.
  • Usually filled: customInput, settings, firstCustomInput.
  • Must be empty / null: ruleSet, ruleSetPolicy, firstRuleChain, ruleChain.

When type = ruleSet

  • Must be filled: ruleSet, ruleSetPolicy, firstRuleChain, ruleChain.
  • Usually filled: customInput, settings.
  • Must be empty / null: conditions, decisionTable, action output/actionNode fields as appropriate.

Canonical files: Create/create_SR.json, Create/create_decisiontable.json, Create/create_ruleset.json, and examples/ for GET/PATCH mirrors.

namestringRequired

Rule name

typestring · enumRequired

Rule type; payload shape depends on this.

Possible values:
descriptionstringOptional
dataSetIdstring · nullableOptional
customInputobjectOptional
conditionsobjectOptional
actionobjectOptional
settingsobjectOptional
firstCustomInputstringOptional
decisionTableobject · nullableOptional

Required for type decisionTable

ruleSetPolicystringOptional
firstRuleChainstringOptional
policystringOptional
dependencyMaparrayOptional
Other propertiesanyOptional
Responses
post
/dev/v1/rule

Copy‑paste JSON examples

You can copy any of the following payloads, replace IDs/field values with your own, and call POST /dev/v1/rule directly.

Example payload – type = simpleRule

Example payload – type = decisionTable

Example payload – type = ruleSet

Response: The response structure is the same for all rule types:

  • data.id – Entity ID of the created rule

  • data.checksum – Checksum for updates in the rule.

  • code – Status code (e.g., "success")

  • message – Additional status message

See the API reference to try the endpoint and view schema details.

Last updated