Management API
The Management API is a secure REST API that provides read/write access to your rules and spaces.
API Request methods cheat sheet:
NEW in v1.16.0! The Management API now fully support use of Rule Aliases when making requests.
Swagger
You can check out these endpoints and call them right away using swagger.
Swagger UI: https://api.decisionrules.io/api/docs/
Swagger JSON File: https://api.decisionrules.io/api/docs/json
Folder Paths
NEW in v1.18.1 Some Management API Endpoints now support targetting by Folder Path.
All Folder and select Rule endpoints now support targetting items by their folder path. Instead of having to provide the requests with Rule Aliases/IDs or Folder IDs users can now define the request target by leveraging the new Folder Path functionality.
Example:
To access Calculation v2 (see image below), instead of appending it's rule ID to the request as a parameter you can now specify the ?path= query parameter.

In this case to GET the rule the request would look like this:
https://api.decisionrules.io/api/rule?path=/Client/Important/Calculation&version=2To access the entire "Important" Folder the request could now look like this:
https://api.decisionrules.io/api/folder?path=/Client/ImportantRequest targets can be defined either by the ID or path, not both at the same time
Folder Paths have to always begin with a slash "/"
To target specific rule versions by path use the ?version= query parameter
Rules
Gets all of the infromation stored about the rule, including its content, version or input and output schemas.
If the version is specified, gets the version irrespective of the rule status.
If the version is not specified, gets the latest published version.
The ID or alias of the rule.
The version of the rule.
The unique folder path leading to the rule. Use this OR the 'identifier' parameter.
Optional. The specific version of the business rule.
Bearer
application/json
OK
{"name":"Rule Name","description":"","inputSchema":{"Input attribute":{}},"outputSchema":{"Output Attribute":{}},"decisionTable":{"columns":[{"condition":{"type":"simple","inputVariable":"Input attribute","name":"New Condition"},"columnId":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","type":"input"},{"columnOutput":{"type":"simple","outputVariable":"Output Attribute","name":"New Result"},"columnId":"2e46eb73-de05-51bc-5913-4b261bbe2069","type":"output"}],"rows":[{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"value":"","operator":"anything"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"value":"Hello from Solver"},"type":"output"}]}]},"type":"decision-table","status":"published","ruleId":"4ea...","version":1,"createdIn":"2021-09-03T06:35:42.663Z","lastUpdate":"2021-09-03T06:35:42.663Z","tags":["tagName","anotherTagName"]}GET /api/rule/{identifier}/{version}? HTTP/1.1
Host: https:/.decisionrules.io
Authorization: text
Accept: */*
{
"name": "Rule Name",
"description": "",
"inputSchema": {
"Input attribute": {}
},
"outputSchema": {
"Output Attribute": {}
},
"decisionTable": {
"columns": [
{
"condition": {
"type": "simple",
"inputVariable": "Input attribute",
"name": "New Condition"
},
"columnId": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"type": "input"
},
{
"columnOutput": {
"type": "simple",
"outputVariable": "Output Attribute",
"name": "New Result"
},
"columnId": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"type": "output"
}
],
"rows": [
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"value": "",
"operator": "anything"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": "Hello from Solver"
},
"type": "output"
}
]
}
]
},
"type": "decision-table",
"status": "published",
"ruleId": "4ea...",
"version": 1,
"createdIn": "2021-09-03T06:35:42.663Z",
"lastUpdate": "2021-09-03T06:35:42.663Z",
"tags": [
"tagName",
"anotherTagName"
]
}Creates rule based on the body of the request. The body must be formatted according to the example below.
Optional. The specific version of the business rule.
Optional. The path to the business rule.
Bearer
application/json
Name of the rule
Description of the rule
Type of rule
Current state of the rule
Unique identifier of the rule
Version number of the rule
Optional list of tags
OK
{"name":"Rule Name","description":"","inputSchema":{"Input attribute":{}},"outputSchema":{"Output Attribute":{}},"decisionTable":{"columns":[{"condition":{"type":"simple","inputVariable":"Input attribute","name":"New Condition"},"columnId":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","type":"input"},{"columnOutput":{"type":"simple","outputVariable":"Output Attribute","name":"New Result"},"columnId":"2e46eb73-de05-51bc-5913-4b261bbe2069","type":"output"}],"rows":[{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"value":"","operator":"anything"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"value":"Hello from Solver"},"type":"output"}]}]},"type":"decision-table","status":"published","ruleId":"4ea...","version":1,"createdIn":"2021-09-03T06:35:42.663Z","lastUpdate":"2021-09-03T06:35:42.663Z","tags":["tagName","anotherTagName"]}POST /api/rule HTTP/1.1
Host: https:/.decisionrules.io
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 820
{
"name": "Rule Name",
"description": "",
"inputSchema": {
"Input attribute": {}
},
"outputSchema": {
"Output Attribute": {}
},
"decisionTable": {
"columns": [
{
"condition": {
"type": "simple",
"inputVariable": "Input attribute",
"name": "New Condition"
},
"columnId": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"type": "input"
},
{
"columnOutput": {
"type": "simple",
"outputVariable": "Output Attribute",
"name": "New Result"
},
"columnId": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"type": "output"
}
],
"rows": [
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"value": "",
"operator": "anything"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": "Hello from Solver"
},
"type": "output"
}
]
}
]
},
"type": "decision-table",
"status": "published",
"ruleId": "4ea...",
"version": 1,
"tags": [
"tagName",
"anotherTagName"
]
}{
"name": "Rule Name",
"description": "",
"inputSchema": {
"Input attribute": {}
},
"outputSchema": {
"Output Attribute": {}
},
"decisionTable": {
"columns": [
{
"condition": {
"type": "simple",
"inputVariable": "Input attribute",
"name": "New Condition"
},
"columnId": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"type": "input"
},
{
"columnOutput": {
"type": "simple",
"outputVariable": "Output Attribute",
"name": "New Result"
},
"columnId": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"type": "output"
}
],
"rows": [
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"value": "",
"operator": "anything"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": "Hello from Solver"
},
"type": "output"
}
]
}
]
},
"type": "decision-table",
"status": "published",
"ruleId": "4ea...",
"version": 1,
"createdIn": "2021-09-03T06:35:42.663Z",
"lastUpdate": "2021-09-03T06:35:42.663Z",
"tags": [
"tagName",
"anotherTagName"
]
}Changes the rule according to the body of the request.
The ID or alias of the rule.
The version of the rule.
The unique folder path leading to the rule. Use this OR the 'identifier' parameter.
Optional. The specific version of the business rule.
Bearer
application/json
Optional name of the rule
Optional identifier
Optional base identifier
Optional alias for the rule
Type of rule
Optional list of tags
Current state of the rule
Version number of the rule
Description of the rule
Unique identifier of the rule
Creation timestamp
Last update timestamp
OK
{"name":"Rule Name","description":"","inputSchema":{"Input attribute":{}},"outputSchema":{"Output Attribute":{}},"decisionTable":{"columns":[{"condition":{"type":"simple","inputVariable":"Input attribute","name":"New Condition"},"columnId":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","type":"input"},{"columnOutput":{"type":"simple","outputVariable":"Output Attribute","name":"New Result"},"columnId":"2e46eb73-de05-51bc-5913-4b261bbe2069","type":"output"}],"rows":[{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"value":"","operator":"anything"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"value":"Hello from Solver"},"type":"output"}]}]},"type":"decision-table","status":"published","ruleId":"4ea...","version":1,"auditLog":{"active":false,"debug":{"active":false},"ttl":14},"createdIn":"2021-09-03T06:35:42.663Z","lastUpdate":"2021-09-03T06:35:42.663Z","tags":["tagName","anotherTagName"]}PUT /api/rule/{identifier}/{version}? HTTP/1.1
Host: https:/.decisionrules.io
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 961
{
"name": "Rule Name",
"description": "",
"inputSchema": {
"Input attribute": {}
},
"outputSchema": {
"Output Attribute": {}
},
"decisionTable": {
"columns": [
{
"condition": {
"type": "simple",
"inputVariable": "Input attribute",
"name": "New Condition"
},
"columnId": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"type": "input"
},
{
"columnOutput": {
"type": "simple",
"outputVariable": "Output Attribute",
"name": "New Result"
},
"columnId": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"type": "output"
}
],
"rows": [
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"value": "",
"operator": "anything"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": "Hello from Solver"
},
"type": "output"
}
]
}
]
},
"type": "decision-table",
"status": "published",
"ruleId": "4ea...",
"version": 1,
"auditLog": {
"active": false,
"debug": {
"active": false
},
"ttl": 14
},
"createdIn": "2021-09-03T06:35:42.663Z",
"lastUpdate": "2021-09-03T06:35:42.663Z",
"tags": [
"tagName",
"anotherTagName"
]
}{
"name": "Rule Name",
"description": "",
"inputSchema": {
"Input attribute": {}
},
"outputSchema": {
"Output Attribute": {}
},
"decisionTable": {
"columns": [
{
"condition": {
"type": "simple",
"inputVariable": "Input attribute",
"name": "New Condition"
},
"columnId": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"type": "input"
},
{
"columnOutput": {
"type": "simple",
"outputVariable": "Output Attribute",
"name": "New Result"
},
"columnId": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"type": "output"
}
],
"rows": [
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"value": "",
"operator": "anything"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": "Hello from Solver"
},
"type": "output"
}
]
}
]
},
"type": "decision-table",
"status": "published",
"ruleId": "4ea...",
"version": 1,
"auditLog": {
"active": false,
"debug": {
"active": false
},
"ttl": 14
},
"createdIn": "2021-09-03T06:35:42.663Z",
"lastUpdate": "2021-09-03T06:35:42.663Z",
"tags": [
"tagName",
"anotherTagName"
]
}Changes rule status from pending to published and vice versa. If the version is not specified, the latest version will be used.
The ID or alias of the rule.
pending XOR published.
The version of the rule.
Bearer
application/json
OK
{"name":"Rule Name","description":"","inputSchema":{"Input attribute":{}},"outputSchema":{"Output Attribute":{}},"decisionTable":{"columns":[{"condition":{"type":"simple","inputVariable":"Input attribute","name":"New Condition"},"columnId":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","type":"input"},{"columnOutput":{"type":"simple","outputVariable":"Output Attribute","name":"New Result"},"columnId":"2e46eb73-de05-51bc-5913-4b261bbe2069","type":"output"}],"rows":[{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"value":"","operator":"anything"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"value":"Hello from Solver"},"type":"output"}]}]},"type":"decision-table","status":"published","ruleId":"4ea...","version":1,"createdIn":"2021-09-03T06:35:42.663Z","lastUpdate":"2021-09-03T06:35:42.663Z","tags":["tagName","anotherTagName"]}PUT /api/rule/status/{identifier}/{status}/{version} HTTP/1.1
Host: https:/.decisionrules.io
Authorization: text
Accept: */*
{
"name": "Rule Name",
"description": "",
"inputSchema": {
"Input attribute": {}
},
"outputSchema": {
"Output Attribute": {}
},
"decisionTable": {
"columns": [
{
"condition": {
"type": "simple",
"inputVariable": "Input attribute",
"name": "New Condition"
},
"columnId": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"type": "input"
},
{
"columnOutput": {
"type": "simple",
"outputVariable": "Output Attribute",
"name": "New Result"
},
"columnId": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"type": "output"
}
],
"rows": [
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"value": "",
"operator": "anything"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": "Hello from Solver"
},
"type": "output"
}
]
}
]
},
"type": "decision-table",
"status": "published",
"ruleId": "4ea...",
"version": 1,
"createdIn": "2021-09-03T06:35:42.663Z",
"lastUpdate": "2021-09-03T06:35:42.663Z",
"tags": [
"tagName",
"anotherTagName"
]
}Deletes the rule.
The ID or alias of the rule.
The version of the rule.
The unique folder path leading to the rule. Use this OR the 'identifier' parameter.
Optional. The specific version of the business rule.
Bearer
application/json
OK
No content
DELETE /api/rule/{identifier}/{version}? HTTP/1.1
Host: https:/.decisionrules.io
Authorization: text
Accept: */*
No content
If you do not specify version of the rule to be deleted, the endpoint will delete all versions of the rule. Please, use it with caution! Once deleted, rules cannot be recovered.
Creates a new version of the rule identified by :ruleId and based on the body of the request. The body must be formatted according to the example below. The new version is added to the same folder as the latest version.
Unique rule ID or alias which is common to all rule versions.
Bearer
application/json
Name of the rule
Description of the rule
Type of rule
Current state of the rule
Unique identifier of the rule
Version number of the rule
Optional list of tags
OK
{"name":"Rule Name","description":"","inputSchema":{"Input attribute":{}},"outputSchema":{"Output Attribute":{}},"decisionTable":{"columns":[{"condition":{"type":"simple","inputVariable":"Input attribute","name":"New Condition"},"columnId":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","type":"input"},{"columnOutput":{"type":"simple","outputVariable":"Output Attribute","name":"New Result"},"columnId":"2e46eb73-de05-51bc-5913-4b261bbe2069","type":"output"}],"rows":[{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"value":"","operator":"anything"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"value":"Hello from Solver"},"type":"output"}]}]},"type":"decision-table","status":"published","ruleId":"4ea...","version":1,"tags":["tagName","anotherTagName"]}POST /api/rule/{identifier}/new-version HTTP/1.1
Host: https:/.decisionrules.io
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 820
{
"name": "Rule Name",
"description": "",
"inputSchema": {
"Input attribute": {}
},
"outputSchema": {
"Output Attribute": {}
},
"decisionTable": {
"columns": [
{
"condition": {
"type": "simple",
"inputVariable": "Input attribute",
"name": "New Condition"
},
"columnId": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"type": "input"
},
{
"columnOutput": {
"type": "simple",
"outputVariable": "Output Attribute",
"name": "New Result"
},
"columnId": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"type": "output"
}
],
"rows": [
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"value": "",
"operator": "anything"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": "Hello from Solver"
},
"type": "output"
}
]
}
]
},
"type": "decision-table",
"status": "published",
"ruleId": "4ea...",
"version": 1,
"tags": [
"tagName",
"anotherTagName"
]
}{
"name": "Rule Name",
"description": "",
"inputSchema": {
"Input attribute": {}
},
"outputSchema": {
"Output Attribute": {}
},
"decisionTable": {
"columns": [
{
"condition": {
"type": "simple",
"inputVariable": "Input attribute",
"name": "New Condition"
},
"columnId": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"type": "input"
},
{
"columnOutput": {
"type": "simple",
"outputVariable": "Output Attribute",
"name": "New Result"
},
"columnId": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"type": "output"
}
],
"rows": [
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"value": "",
"operator": "anything"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": "Hello from Solver"
},
"type": "output"
}
]
}
]
},
"type": "decision-table",
"status": "published",
"ruleId": "4ea...",
"version": 1,
"tags": [
"tagName",
"anotherTagName"
]
}Sets a lock on a rule version to prevent edits.
The ID or alias of the rule.
The version of the rule.
Bearer
application/json
Indicates if the rule should be locked.
OK
No content
PATCH /api/rule/lock/{identifier}/{version} HTTP/1.1
Host: https:/.decisionrules.io
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"locked": true
}No content
Spaces
The desired space is determined by Management API Key. This endpoint also gets set of rules used in every ruleflow.
Bearer
application/json
OK
[{"baseId":"009d9438-59fc-1531-50c5-76fb4741aaca","version":1,"name":"Client Profitability (Sample Rule)","status":"published","type":"decision-table","tags":[],"description":"Sample client profitability rule","lastUpdate":"2022-02-21T14:10:33.581Z"},{"baseId":"00941c5a-7d21-d332-7cbf-a4f742556a85","version":1,"name":"Decision Tree","status":"published","type":"decision-tree","tags":[],"description":"","lastUpdate":"2022-03-24T09:52:43.548Z"},{"baseId":"b7b3f52a-52f1-4b04-59ff-548bf063221b","version":1,"name":"Sample Rule Flow","status":"pending","type":"composition","tags":[],"description":"This is sample description","lastUpdate":"2021-11-14T08:43:22.611Z","rules":[{"id":"e72a23a2-0838-c52b-a284-baac28bc41b8"}]}]GET /api/space/items HTTP/1.1
Host: https:/.decisionrules.io
Authorization: text
Accept: */*
OK
[
{
"baseId": "009d9438-59fc-1531-50c5-76fb4741aaca",
"version": 1,
"name": "Client Profitability (Sample Rule)",
"status": "published",
"type": "decision-table",
"tags": [],
"description": "Sample client profitability rule",
"lastUpdate": "2022-02-21T14:10:33.581Z"
},
{
"baseId": "00941c5a-7d21-d332-7cbf-a4f742556a85",
"version": 1,
"name": "Decision Tree",
"status": "published",
"type": "decision-tree",
"tags": [],
"description": "",
"lastUpdate": "2022-03-24T09:52:43.548Z"
},
{
"baseId": "b7b3f52a-52f1-4b04-59ff-548bf063221b",
"version": 1,
"name": "Sample Rule Flow",
"status": "pending",
"type": "composition",
"tags": [],
"description": "This is sample description",
"lastUpdate": "2021-11-14T08:43:22.611Z",
"rules": [
{
"id": "e72a23a2-0838-c52b-a284-baac28bc41b8"
}
]
}
]Tags
This endpoint allows you to get all ruless with certain tags. Desired space is derived from Management API Key.
New parameter
Comma separated list of tags. The query at the end of the url address should look like this: ?tags=tag1,tag2. Such query would select all the rules where tag array contains both tag1 and tag
Bearer
application/json
OK
[{"name":"Rule Name","description":"","inputSchema":{"Input attribute":{}},"outputSchema":{"Output Attribute":{}},"decisionTable":{"columns":[{"condition":{"type":"simple","inputVariable":"Input attribute","name":"New Condition"},"columnId":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","type":"input"},{"columnOutput":{"type":"simple","outputVariable":"Output Attribute","name":"New Result"},"columnId":"2e46eb73-de05-51bc-5913-4b261bbe2069","type":"output"}],"rows":[{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"value":"","operator":"anything"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"value":"Hello from Solver"},"type":"output"}]}]},"type":"decision-table","status":"published","ruleId":"4ea...","version":1,"createdIn":"2021-09-03T06:35:42.663Z","lastUpdate":"2021-09-03T06:35:42.663Z","tags":["tag1","tag2"]},{"name":"Rule Name","description":"","inputSchema":{"Input attribute":{}},"outputSchema":{"Output Attribute":{}},"decisionTable":{"columns":[{"condition":{"type":"simple","inputVariable":"Input attribute","name":"New Condition"},"columnId":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","type":"input"},{"columnOutput":{"type":"simple","outputVariable":"Output Attribute","name":"New Result"},"columnId":"2e46eb73-de05-51bc-5913-4b261bbe2069","type":"output"}],"rows":[{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"value":"","operator":"anything"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"value":"Hello from Solver"},"type":"output"}]}]},"type":"decision-table","status":"published","ruleId":"4ea...","version":2,"createdIn":"2021-09-03T06:35:42.663Z","lastUpdate":"2021-09-03T06:35:42.663Z","tags":["tag1","tag2"]}]GET /api/tags/items?NewParameter=null&tags=text HTTP/1.1
Host: https:/.decisionrules.io
Authorization: text
Accept: */*
[
{
"name": "Rule Name",
"description": "",
"inputSchema": {
"Input attribute": {}
},
"outputSchema": {
"Output Attribute": {}
},
"decisionTable": {
"columns": [
{
"condition": {
"type": "simple",
"inputVariable": "Input attribute",
"name": "New Condition"
},
"columnId": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"type": "input"
},
{
"columnOutput": {
"type": "simple",
"outputVariable": "Output Attribute",
"name": "New Result"
},
"columnId": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"type": "output"
}
],
"rows": [
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"value": "",
"operator": "anything"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": "Hello from Solver"
},
"type": "output"
}
]
}
]
},
"type": "decision-table",
"status": "published",
"ruleId": "4ea...",
"version": 1,
"createdIn": "2021-09-03T06:35:42.663Z",
"lastUpdate": "2021-09-03T06:35:42.663Z",
"tags": [
"tag1",
"tag2"
]
},
{
"name": "Rule Name",
"description": "",
"inputSchema": {
"Input attribute": {}
},
"outputSchema": {
"Output Attribute": {}
},
"decisionTable": {
"columns": [
{
"condition": {
"type": "simple",
"inputVariable": "Input attribute",
"name": "New Condition"
},
"columnId": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"type": "input"
},
{
"columnOutput": {
"type": "simple",
"outputVariable": "Output Attribute",
"name": "New Result"
},
"columnId": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"type": "output"
}
],
"rows": [
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"value": "",
"operator": "anything"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": "Hello from Solver"
},
"type": "output"
}
]
}
]
},
"type": "decision-table",
"status": "published",
"ruleId": "4ea...",
"version": 2,
"createdIn": "2021-09-03T06:35:42.663Z",
"lastUpdate": "2021-09-03T06:35:42.663Z",
"tags": [
"tag1",
"tag2"
]
}
]If you specify the version, the tag/tags will be added to the specified version. If the version is not specified, the tag/tags will be added to all the versions with given ID.
The ID or alias of the rule.
The version of the rule.
Bearer
application/json
OK
[{"tagName":"yourTagName","color":"green"}]PATCH /api/tags/{identifier}/{version} HTTP/1.1
Host: https:/.decisionrules.io
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 43
[
{
"tagName": "yourTagName",
"color": "green"
}
][
{
"tagName": "yourTagName",
"color": "green"
}
]If you specify the version, the tag/tags will be deleted from the specified version. If the version is not specified, the tag/tags will be deleted from all the versions with given ID.
The ID or alias of the rule.
The version of the rule.
Comma separated list of tags. The query at the end of the url address should look like this: ?tags=tag1,tag2
Bearer
application/json
OK
No content
DELETE /api/tags/{identifier}/{version}?Tags=text HTTP/1.1
Host: https:/.decisionrules.io
Authorization: text
Accept: */*
No content
Folders
Retrieve folder structure either by node ID or by navigating through path. Returns a JSON with a tree like structure containing the descendant folders and rules of the target node.
Bearer
application/json
OK
{"type":"FOLDER","name":"Example Folder","children":[{"type":"FOLDER","name":"Example Sub-Folder","id":"B456","children":[{"type":"RULE","name":"Sample Table","baseId":"xxx-yyy-zzz","version":1},{"type":"RULE","name":"Production Table","ruleAlias":"calcuation-rule"}]}]}GET /api/folder/{nodeId} HTTP/1.1
Host: https:/.decisionrules.io
Authorization: text
Accept: */*
{
"type": "FOLDER",
"name": "Example Folder",
"children": [
{
"type": "FOLDER",
"name": "Example Sub-Folder",
"id": "B456",
"children": [
{
"type": "RULE",
"name": "Sample Table",
"baseId": "xxx-yyy-zzz",
"version": 1
},
{
"type": "RULE",
"name": "Production Table",
"ruleAlias": "calcuation-rule"
}
]
}
]
}Creates folders under a specified target, moves rules into the new structure by baseId or ruleAlias. Define which folder's structure to update by either inputting it's id as a parameter or by navigating to it using the ?path=/ query parameter. Appends the Folder Structure specified in the request body as a child of the target node.
OK
No content
POST /api/folder/{nodeId} HTTP/1.1
Host: https:/.decisionrules.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 270
{
"type": "FOLDER",
"name": "Example Folder",
"children": [
{
"type": "FOLDER",
"name": "Example Sub-Folder",
"id": "B456",
"children": [
{
"type": "RULE",
"name": "Sample Table",
"baseId": "xxx-yyy-zzz",
"version": 1
},
{
"type": "RULE",
"name": "Production Table",
"ruleAlias": "calcuation-rule"
}
]
}
]
}No content
Define which folder's structure to overwrite by either inputting it's id as a parameter or by navigating to it using the ?path=/ query parameter. Moves rules into the new structure by baseId or ruleAlias. Overwrites the Folder Structure specified in the request body as a child of the target node.
Path of folder names
OK
{"type":"FOLDER","name":"Example Folder","children":[{"type":"FOLDER","name":"Example Sub-Folder","id":"B456","children":[{"type":"RULE","name":"Sample Table","baseId":"xxx-yyy-zzz","version":1},{"type":"RULE","name":"Production Table","ruleAlias":"calcuation-rule"}]}]}PUT /api/folder/{nodeId}?path=text HTTP/1.1
Host: https:/.decisionrules.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 270
{
"type": "FOLDER",
"name": "Example Folder",
"children": [
{
"type": "FOLDER",
"name": "Example Sub-Folder",
"id": "B456",
"children": [
{
"type": "RULE",
"name": "Sample Table",
"baseId": "xxx-yyy-zzz",
"version": 1
},
{
"type": "RULE",
"name": "Production Table",
"ruleAlias": "calcuation-rule"
}
]
}
]
}{
"type": "FOLDER",
"name": "Example Folder",
"children": [
{
"type": "FOLDER",
"name": "Example Sub-Folder",
"id": "B456",
"children": [
{
"type": "RULE",
"name": "Sample Table",
"baseId": "xxx-yyy-zzz",
"version": 1
},
{
"type": "RULE",
"name": "Production Table",
"ruleAlias": "calcuation-rule"
}
]
}
]
}Any existing Folder children of the target node will be deleted. (Rules, which aren't part of the request body will be moved to the root)
Delete a folder (Including it's rules) either by node ID or by navigating through path. If you want to delete the contents of the entire space target the 'root' by Id and include the optional query parameter ?deleteAll=true
Path of folder names
Confirmation to delete everything in Space
OK
No content
DELETE /api/folder/{nodeId} HTTP/1.1
Host: https:/.decisionrules.io
Authorization: YOUR_API_KEY
Accept: */*
No content
Data removal is permanent and cannot be undone.
Export folder with all rules. If no nodeId is set, then will be exported root directory.
If you know your folder id, you can export it. Otherwise you export root directory
If you know your folder id, you can export it. Otherwise you export root directory
Bearer
application/json
OK
{"export":{"exportType":"FOLDER","version":1,"createdAt":"2021-09-03T06:35:42.663Z","data":{"structure":{"type":"RULE","name":"My rule","id":"e72a23a2-0838-c52b-a284-baac28bc41b8","baseId":"e72a23a2-0838-c52b-a284-baac28bc41b8","ruleAlias":"Alias","version":1,"children":[]},"rules":[]}}}GET /api/folder/export/{nodeId} HTTP/1.1
Host: https:/.decisionrules.io
Authorization: text
Accept: */*
{
"export": {
"exportType": "FOLDER",
"version": 1,
"createdAt": "2021-09-03T06:35:42.663Z",
"data": {
"structure": {
"type": "RULE",
"name": "My rule",
"id": "e72a23a2-0838-c52b-a284-baac28bc41b8",
"baseId": "e72a23a2-0838-c52b-a284-baac28bc41b8",
"ruleAlias": "Alias",
"version": 1,
"children": []
},
"rules": []
}
}
}Import folder with all rules into specific folder. If no targetNodeId is set, then will be imported into root directory.
If you know you targetNodeId, you can import it. Otherwise you import folder into root directory.
The unique folder path leading to the rule. Use this OR the 'identifier' parameter.
Optional. The specific version of the business rule.
Bearer
application/json
OK
{"folderNode":"4b261bbe2069"}POST /api/folder/import/{nodeId} HTTP/1.1
Host: https:/.decisionrules.io
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 288
{
"export": {
"exportType": "FOLDER",
"version": 1,
"createdAt": "2021-09-03T06:35:42.663Z",
"data": {
"structure": {
"type": "RULE",
"name": "My rule",
"id": "e72a23a2-0838-c52b-a284-baac28bc41b8",
"baseId": "e72a23a2-0838-c52b-a284-baac28bc41b8",
"ruleAlias": "Alias",
"version": 1,
"children": []
},
"rules": []
}
}
}{
"folderNode": "4b261bbe2069"
}Moves folders (including descendants) and/or rules under the parent specified by targetId or targetPath attribute in the request body.
Optional target ID
Optional target path
OK
No content
PUT /api/folder/move HTTP/1.1
Host: https:/.decisionrules.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 214
{
"targetId": "target-123",
"targetPath": "/root/folderA",
"nodes": [
{
"type": "FOLDER",
"id": "folder-001",
"baseId": "base-001",
"ruleAlias": "alias1"
},
{
"type": "RULE",
"id": "rule-001",
"baseId": "base-002",
"ruleAlias": "alias2"
}
]
}No content
Define which folder to rename by either inputting it's id as a parameter or by navigating to it using the ?path=/ query parameter. Set a new name for a Folder in the request body with the 'name' attribute.
Path of folder names
{"name":"Renamed Folder"}OK
No content
PATCH /api/folder/rename/{nodeId} HTTP/1.1
Host: https:/.decisionrules.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 25
{
"name": "Renamed Folder"
}No content
Finds Folders and Rules which satisfy all of the criteria from the request body. Use any of the attributes listed below or their combination to find folders and rules.
Searchable attributes:
name - Name of the Folder or Rule
Note: this attribute searches for a RegExp match by default. If you wish to find nodes which match the input exactly, prepend the input with '^' and append with '$'. Example: '^ClientA$'
id - ID of the Folder
ruleAlias - Rule-Alias
Note: this attribute searches for a RegExp match by default. To match exactly: '^ClientA$'
baseId - RuleId of the Rule or Rule Flow
'decision-table' - Decision Table
'decision-tree' - Decision Tree
'complex-rule' - Scripting Rule
'composition' - Rule Flow
tags - Tags on a Rule
type - Type of Node in Folder Structure
FOLDER
RULE
ROOT
version - Version of the rule
ruleStatus
published
pending
Optional name of the rule
Optional identifier
Optional base identifier
Optional alias for the rule
Type of rule
Optional list of tags
Current state of the rule
Version number of the rule
OK
{"name":"Important table","baseId":"f30df343-e22d-4f39-d40f-ad5c946034f0","version":2,"ruleAlias":"big-production-table","ruleStatus":"published","type":"decision-table","tags":[],"description":"Sample Pricing Rule","parentId":"61a17c3d-2a32-f03a-1c41-64fd4f540d30","path":"/ClientA/production"}POST /api/folder/find HTTP/1.1
Host: https:/.decisionrules.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 166
{
"name": "Example Rule",
"id": "abc123",
"baseId": "base-001",
"ruleAlias": "my-rule",
"type": "decision-table",
"tags": [
"finance",
"approval"
],
"status": "published",
"version": 1
}{
"name": "Important table",
"baseId": "f30df343-e22d-4f39-d40f-ad5c946034f0",
"version": 2,
"ruleAlias": "big-production-table",
"ruleStatus": "published",
"type": "decision-table",
"tags": [],
"description": "Sample Pricing Rule",
"parentId": "61a17c3d-2a32-f03a-1c41-64fd4f540d30",
"path": "/ClientA/production"
}Tools
Look for decision table by id and optionally version. If the decision table is found, it is returned together with an array of duplicates.
OK
{"rule":{"_id":"6305ec5a42a45d1591c40767","name":"Simple Sample","description":"","inputSchema":{"input":{}},"outputSchema":{"output":{}},"decisionTable":{"columns":[{"condition":{"type":"simple","inputVariable":"input","name":"New Condition"},"columnId":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","type":"input"},{"columnOutput":{"type":"simple","outputVariable":"output","name":"New Result"},"columnId":"2e46eb73-de05-51bc-5913-4b261bbe2069","type":"output"}],"rows":[{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"0","type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"type":"common","value":"A"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"1","type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"type":"common","value":"B"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"1","type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"type":"common","value":"BB"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"2","type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"type":"common","value":"C"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"1","type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"type":"common","value":"BBB"},"type":"output"}],"active":true}]},"type":"decision-table","status":"published","auditLog":{"active":false,"debug":{"active":false},"ttl":14},"ruleId":"3ea681e8-256a-7ddf-9fd2-e79fac231d60","version":1,"tags":[],"baseId":"3ea681e8-256a-7ddf-9fd2-e79fac231d60","createdIn":"2022-08-24T09:16:10.142Z","lastUpdate":"2022-08-24T09:17:56.036Z"},"duplicates":[{"indices":[1,2,4],"rows":[{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"1","type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"type":"common","value":"B"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"1","type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"type":"common","value":"BB"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"1","type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"type":"common","value":"BBB"},"type":"output"}],"active":true}]}]}GET /api/tools/duplicates/{identifier}/{version}? HTTP/1.1
Host: https:/.decisionrules.io
Authorization: YOUR_API_KEY
Accept: */*
{
"rule": {
"_id": "6305ec5a42a45d1591c40767",
"name": "Simple Sample",
"description": "",
"inputSchema": {
"input": {}
},
"outputSchema": {
"output": {}
},
"decisionTable": {
"columns": [
{
"condition": {
"type": "simple",
"inputVariable": "input",
"name": "New Condition"
},
"columnId": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"type": "input"
},
{
"columnOutput": {
"type": "simple",
"outputVariable": "output",
"name": "New Result"
},
"columnId": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"type": "output"
}
],
"rows": [
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "0",
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"type": "common",
"value": "A"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "1",
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"type": "common",
"value": "B"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "1",
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"type": "common",
"value": "BB"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "2",
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"type": "common",
"value": "C"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "1",
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"type": "common",
"value": "BBB"
},
"type": "output"
}
],
"active": true
}
]
},
"type": "decision-table",
"status": "published",
"auditLog": {
"active": false,
"debug": {
"active": false
},
"ttl": 14
},
"ruleId": "3ea681e8-256a-7ddf-9fd2-e79fac231d60",
"version": 1,
"tags": [],
"baseId": "3ea681e8-256a-7ddf-9fd2-e79fac231d60",
"createdIn": "2022-08-24T09:16:10.142Z",
"lastUpdate": "2022-08-24T09:17:56.036Z"
},
"duplicates": [
{
"indices": [
1,
2,
4
],
"rows": [
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "1",
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"type": "common",
"value": "B"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "1",
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"type": "common",
"value": "BB"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "1",
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"type": "common",
"value": "BBB"
},
"type": "output"
}
],
"active": true
}
]
}
]
}Look for dependencies by id or alias and optionally version. If the rule is found, it is returned together with an array of dependencies.
OK
{"rule":{"baseId":"8803df20-b515-0c2f-d916-c1621456a350","version":1,"ruleAlias":"handsome-rhinoceros","name":"Import Rule","type":"composition","status":"published"},"dependencies":[{"baseId":"6c75221b-3d00-6665-a229-852ada5a921c","version":1,"ruleAlias":"blonde-wolf","name":"Import Rule","type":"decision-table","status":"published","parent":{"baseId":"8803df20-b515-0c2f-d916-c1621456a350","version":1,"ruleAlias":"handsome-rhinoceros","name":"Import Rule","type":"composition","status":"published"}}]}GET /api/tools/dependencies/{identifier}/{version}? HTTP/1.1
Host: https:/.decisionrules.io
Authorization: YOUR_API_KEY
Accept: */*
{
"rule": {
"baseId": "8803df20-b515-0c2f-d916-c1621456a350",
"version": 1,
"ruleAlias": "handsome-rhinoceros",
"name": "Import Rule",
"type": "composition",
"status": "published"
},
"dependencies": [
{
"baseId": "6c75221b-3d00-6665-a229-852ada5a921c",
"version": 1,
"ruleAlias": "blonde-wolf",
"name": "Import Rule",
"type": "decision-table",
"status": "published",
"parent": {
"baseId": "8803df20-b515-0c2f-d916-c1621456a350",
"version": 1,
"ruleAlias": "handsome-rhinoceros",
"name": "Import Rule",
"type": "composition",
"status": "published"
}
}
]
}RuleFlow Export/Import
Following endpoints can be used only to export and import Rule Flows. For managing Workflows, please store your Workflows with dependent rules in folders, then use folder API endpoints.
Export Rule Flow with all rules. If the version is not specified, exports the latest version.
Unique rule flow ID or alias which is common to all versions.
Version of the Rule Flow.
Bearer token
Content type
OK
[{"_id":"62627b2ac0fc11362331185e","name":"Sample Rule Flow","description":"This is sample description","inputSchema":{"period":{},"productType":{},"promoCode":{}},"outputSchema":{"finalPrice":{},"crudePrice":{},"message":{}},"type":"composition","status":"pending","visualEditorData":{"drawflow":{"Home":{"data":{"1":{"id":1,"data":{"type":"start"},"inputs":{},"outputs":{"output_1":{"connections":[{"node":"2","output":"input_1"}]}},"pos_x":57,"pos_y":218},"2":{"id":2,"data":{"type":"node","baseId":"f36bf7cf-bef4-1f4c-d756-c0b6f2f814ff","globalVariable":"Rule_1"},"inputs":{"input_1":{"connections":[{"node":"1","input":"output_1"}]}},"outputs":{"output_1":{"connections":[{"node":"3","output":"input_1"}]}},"pos_x":400,"pos_y":150},"3":{"id":3,"data":{"type":"end"},"inputs":{"input_1":{"connections":[{"node":"2","input":"output_1"}]}},"outputs":{},"pos_x":785,"pos_y":212}}}}},"dataTree":{"children":[{"baseId":"f36bf7cf-bef4-1f4c-d756-c0b6f2f814ff","children":[{"children":[null],"globalVariable":"end","mapping":[{"key":"finalPrice","source":"Rule_1","sourceVariable":"prices.finalPrice"},{"key":"crudePrice","source":"Rule_1","sourceVariable":"prices.crudePrice"},{"key":"message","source":"Rule_1","sourceVariable":"message"}]}],"globalVariable":"Rule_1","mapping":[{"key":"period","source":"start","sourceVariable":"period"},{"key":"productType","source":"start","sourceVariable":"productType"},{"key":"promoCode","source":"start","sourceVariable":"promoCode"}]}],"globalVariable":"start","mapping":[]},"compositionId":"94c5ef08-d609-ef88-066a-fbeda7d1e537","version":1,"createdIn":"2022-04-22T09:53:46.744Z","lastUpdate":"2022-04-22T09:53:46.744Z"},{"_id":"62627b2ac0fc11362331185d","name":"Sample Rule Flow","description":"This rule is a part of Sample Rule Flow.","inputSchema":{"period":{},"productType":{},"promoCode":{}},"outputSchema":{"prices":{"finalPrice":{},"crudePrice":{}},"message":{}},"decisionTable":{"columns":[{"condition":{"type":"simple","inputVariable":"productType","name":"Product type"},"columnId":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","type":"input"},{"condition":{"type":"simple","inputVariable":"period","name":"Subscription period"},"columnId":"ac44d6bf-ddd6-3778-7486-483c4bed53fd","type":"input"},{"condition":{"type":"simple","inputVariable":"promoCode","name":"New Condition"},"columnId":"13b20cae-2d6f-0183-e970-b1c0fed5558f","type":"input"},{"columnOutput":{"type":"simple","outputVariable":"prices.crudePrice","name":"Price without discounts"},"columnId":"2e46eb73-de05-51bc-5913-4b261bbe2069","type":"output"},{"columnOutput":{"type":"simple","outputVariable":"prices.finalPrice","name":"Final price"},"columnId":"92d6a186-702b-32f3-8d5d-ad1ab6b1c025","type":"output"},{"columnOutput":{"type":"simple","outputVariable":"message","name":"New Result"},"columnId":"9fcb15be-aa42-9380-2145-4d2ff831aa34","type":"output"}],"rows":[{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"basic","type":"general"},"type":"input"},{"column":"ac44d6bf-ddd6-3778-7486-483c4bed53fd","scalarCondition":{"operator":"=","value":"month","type":"general"},"type":"input"},{"column":"13b20cae-2d6f-0183-e970-b1c0fed5558f","scalarCondition":{"operator":"=","value":"{PromoCode}","type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"type":"common","value":"8"},"type":"output"},{"column":"92d6a186-702b-32f3-8d5d-ad1ab6b1c025","outputScalarValue":{"value":{"functionName":"TIMES","parameters":["{prices.crudePrice}",{"functionName":"DIVIDED","parameters":[{"functionName":"MINUS","parameters":[100,"{PromoDiscount}"]},100]}]},"type":"function"},"type":"output"},{"column":"9fcb15be-aa42-9380-2145-4d2ff831aa34","outputScalarValue":{"value":{"functionName":"CONCAT","parameters":["\"{PromoDiscount}\"","\"% discount\""]},"type":"function"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"basic","type":"general"},"type":"input"},{"column":"ac44d6bf-ddd6-3778-7486-483c4bed53fd","scalarCondition":{"operator":"=","value":"month","type":"general"},"type":"input"},{"column":"13b20cae-2d6f-0183-e970-b1c0fed5558f","scalarCondition":{"operator":"<>","value":"{PromoCode}","type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"type":"common","value":"8"},"type":"output"},{"column":"92d6a186-702b-32f3-8d5d-ad1ab6b1c025","outputScalarValue":{"value":"{prices.crudePrice}","type":"function"},"type":"output"},{"column":"9fcb15be-aa42-9380-2145-4d2ff831aa34","outputScalarValue":{"value":"\"no matching promo code\"","type":"common"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"basic","type":"general"},"type":"input"},{"column":"ac44d6bf-ddd6-3778-7486-483c4bed53fd","scalarCondition":{"operator":"=","value":"year","type":"general"},"type":"input"},{"column":"13b20cae-2d6f-0183-e970-b1c0fed5558f","scalarCondition":{"operator":"=","value":"{PromoCode}","type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"type":"function","value":{"functionName":"TIMES","parameters":[6,12]}},"type":"output"},{"column":"92d6a186-702b-32f3-8d5d-ad1ab6b1c025","outputScalarValue":{"value":{"functionName":"TIMES","parameters":["{prices.crudePrice}",{"functionName":"DIVIDED","parameters":[{"functionName":"MINUS","parameters":[100,"{PromoDiscount}"]},100]}]},"type":"function"},"type":"output"},{"column":"9fcb15be-aa42-9380-2145-4d2ff831aa34","outputScalarValue":{"value":{"functionName":"CONCAT","parameters":["\"{PromoDiscount}\"","\"% discount\""]},"type":"function"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"basic","type":"general"},"type":"input"},{"column":"ac44d6bf-ddd6-3778-7486-483c4bed53fd","scalarCondition":{"operator":"=","value":"year","type":"general"},"type":"input"},{"column":"13b20cae-2d6f-0183-e970-b1c0fed5558f","scalarCondition":{"operator":"<>","value":"{PromoCode}","type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"type":"function","value":{"functionName":"TIMES","parameters":[6,12]}},"type":"output"},{"column":"92d6a186-702b-32f3-8d5d-ad1ab6b1c025","outputScalarValue":{"value":"{prices.crudePrice}","type":"function"},"type":"output"},{"column":"9fcb15be-aa42-9380-2145-4d2ff831aa34","outputScalarValue":{"value":"\"no matching promo code\"","type":"common"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"medium","type":"general"},"type":"input"},{"column":"ac44d6bf-ddd6-3778-7486-483c4bed53fd","scalarCondition":{"operator":"=","value":"month","type":"general"},"type":"input"},{"column":"13b20cae-2d6f-0183-e970-b1c0fed5558f","scalarCondition":{"operator":"IN","value":["{PromoCode}","BUSINESS SALE"],"type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"value":"15","type":"common"},"type":"output"},{"column":"92d6a186-702b-32f3-8d5d-ad1ab6b1c025","outputScalarValue":{"value":{"functionName":"TIMES","parameters":["{prices.crudePrice}",{"functionName":"DIVIDED","parameters":[{"functionName":"MINUS","parameters":[100,"{PromoDiscount}"]},100]}]},"type":"function"},"type":"output"},{"column":"9fcb15be-aa42-9380-2145-4d2ff831aa34","outputScalarValue":{"value":{"functionName":"CONCAT","parameters":["\"{PromoDiscount}\"","\"% discount\""]},"type":"function"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"medium","type":"general"},"type":"input"},{"column":"ac44d6bf-ddd6-3778-7486-483c4bed53fd","scalarCondition":{"operator":"=","value":"month","type":"general"},"type":"input"},{"column":"13b20cae-2d6f-0183-e970-b1c0fed5558f","scalarCondition":{"operator":"NOT IN","value":["{PromoCode}","BUSINESS SALE"],"type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"value":"15","type":"common"},"type":"output"},{"column":"92d6a186-702b-32f3-8d5d-ad1ab6b1c025","outputScalarValue":{"value":"{prices.crudePrice}","type":"function"},"type":"output"},{"column":"9fcb15be-aa42-9380-2145-4d2ff831aa34","outputScalarValue":{"value":"\"no matching promo code\"","type":"common"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"medium","type":"general"},"type":"input"},{"column":"ac44d6bf-ddd6-3778-7486-483c4bed53fd","scalarCondition":{"operator":"=","value":"year","type":"general"},"type":"input"},{"column":"13b20cae-2d6f-0183-e970-b1c0fed5558f","scalarCondition":{"operator":"IN","value":["{PromoCode}","BUSINESS SALE"],"type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"value":{"functionName":"TIMES","parameters":[12,12]},"type":"function"},"type":"output"},{"column":"92d6a186-702b-32f3-8d5d-ad1ab6b1c025","outputScalarValue":{"value":{"functionName":"TIMES","parameters":["{prices.crudePrice}",{"functionName":"DIVIDED","parameters":[{"functionName":"MINUS","parameters":[100,"{PromoDiscount}"]},100]}]},"type":"function"},"type":"output"},{"column":"9fcb15be-aa42-9380-2145-4d2ff831aa34","outputScalarValue":{"value":{"functionName":"CONCAT","parameters":["\"{PromoDiscount}\"","\"% discount\""]},"type":"function"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"medium","type":"general"},"type":"input"},{"column":"ac44d6bf-ddd6-3778-7486-483c4bed53fd","scalarCondition":{"operator":"=","value":"year","type":"general"},"type":"input"},{"column":"13b20cae-2d6f-0183-e970-b1c0fed5558f","scalarCondition":{"operator":"NOT IN","value":["{PromoCode}","BUSINESS SALE"],"type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"value":{"functionName":"TIMES","parameters":[12,12]},"type":"function"},"type":"output"},{"column":"92d6a186-702b-32f3-8d5d-ad1ab6b1c025","outputScalarValue":{"value":"{prices.crudePrice}","type":"function"},"type":"output"},{"column":"9fcb15be-aa42-9380-2145-4d2ff831aa34","outputScalarValue":{"value":"\"no matching promo code\"","type":"common"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"premium","type":"general"},"type":"input"},{"column":"ac44d6bf-ddd6-3778-7486-483c4bed53fd","scalarCondition":{"operator":"=","value":"month","type":"general"},"type":"input"},{"column":"13b20cae-2d6f-0183-e970-b1c0fed5558f","scalarCondition":{"operator":"IN","value":["{PromoCode}","DIAMOND SALE"],"type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"value":"25","type":"common"},"type":"output"},{"column":"92d6a186-702b-32f3-8d5d-ad1ab6b1c025","outputScalarValue":{"value":{"functionName":"TIMES","parameters":["{prices.crudePrice}",{"functionName":"DIVIDED","parameters":[{"functionName":"MINUS","parameters":[100,"{PromoDiscount}"]},100]}]},"type":"function"},"type":"output"},{"column":"9fcb15be-aa42-9380-2145-4d2ff831aa34","outputScalarValue":{"value":{"functionName":"CONCAT","parameters":["\"{PromoDiscount}\"","\"% discount\""]},"type":"function"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"premium","type":"general"},"type":"input"},{"column":"ac44d6bf-ddd6-3778-7486-483c4bed53fd","scalarCondition":{"operator":"=","value":"month","type":"general"},"type":"input"},{"column":"13b20cae-2d6f-0183-e970-b1c0fed5558f","scalarCondition":{"operator":"NOT IN","value":["{PromoCode}","DIAMOND SALE"],"type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"value":"25","type":"common"},"type":"output"},{"column":"92d6a186-702b-32f3-8d5d-ad1ab6b1c025","outputScalarValue":{"value":"{prices.crudePrice}","type":"function"},"type":"output"},{"column":"9fcb15be-aa42-9380-2145-4d2ff831aa34","outputScalarValue":{"value":"\"no matching promo code\"","type":"common"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"premium","type":"general"},"type":"input"},{"column":"ac44d6bf-ddd6-3778-7486-483c4bed53fd","scalarCondition":{"operator":"=","value":"year","type":"general"},"type":"input"},{"column":"13b20cae-2d6f-0183-e970-b1c0fed5558f","scalarCondition":{"operator":"IN","value":["{PromoCode}","DIAMOND SALE"],"type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"value":{"functionName":"TIMES","parameters":[21,12]},"type":"function"},"type":"output"},{"column":"92d6a186-702b-32f3-8d5d-ad1ab6b1c025","outputScalarValue":{"value":{"functionName":"TIMES","parameters":["{prices.crudePrice}",{"functionName":"DIVIDED","parameters":[{"functionName":"MINUS","parameters":[100,"{PromoDiscount}"]},100]}]},"type":"function"},"type":"output"},{"column":"9fcb15be-aa42-9380-2145-4d2ff831aa34","outputScalarValue":{"value":{"functionName":"CONCAT","parameters":["\"{PromoDiscount}\"","\"% discount\""]},"type":"function"},"type":"output"}],"active":true},{"cells":[{"column":"ec57bb7c-8e90-4aee-da49-17b607a6b09a","scalarCondition":{"operator":"=","value":"premium","type":"general"},"type":"input"},{"column":"ac44d6bf-ddd6-3778-7486-483c4bed53fd","scalarCondition":{"operator":"=","value":"year","type":"general"},"type":"input"},{"column":"13b20cae-2d6f-0183-e970-b1c0fed5558f","scalarCondition":{"operator":"NOT IN","value":["{PromoCode}","DIAMOND SALE"],"type":"general"},"type":"input"},{"column":"2e46eb73-de05-51bc-5913-4b261bbe2069","outputScalarValue":{"value":{"functionName":"TIMES","parameters":[21,12]},"type":"function"},"type":"output"},{"column":"92d6a186-702b-32f3-8d5d-ad1ab6b1c025","outputScalarValue":{"value":"{prices.crudePrice}","type":"function"},"type":"output"},{"column":"9fcb15be-aa42-9380-2145-4d2ff831aa34","outputScalarValue":{"value":"\"no matching promo code\"","type":"common"},"type":"output"}],"active":true}]},"type":"decision-table","status":"published","tags":[],"userVariables":[{"name":"PromoCode","value":"SUMMER SALE","saved":true,"editMode":true},{"name":"PromoDiscount","value":30,"saved":true,"editMode":true},{}],"ruleId":"f36bf7cf-bef4-1f4c-d756-c0b6f2f814ff","version":1,"createdIn":"2022-04-22T09:53:46.586Z","lastUpdate":"2022-04-22T09:53:46.586Z"}]Bad Request: Invalid API key or ruleFlowId
Upgrade Required: Operation not allowed
GET /api/api/rule-flow/export/{ruleFlowId}/{version} HTTP/1.1
Host: https:/.decisionrules.io
Authorization: text
Content-Type: application/json
Accept: */*
[
{
"_id": "62627b2ac0fc11362331185e",
"name": "Sample Rule Flow",
"description": "This is sample description",
"inputSchema": {
"period": {},
"productType": {},
"promoCode": {}
},
"outputSchema": {
"finalPrice": {},
"crudePrice": {},
"message": {}
},
"type": "composition",
"status": "pending",
"visualEditorData": {
"drawflow": {
"Home": {
"data": {
"1": {
"id": 1,
"data": {
"type": "start"
},
"inputs": {},
"outputs": {
"output_1": {
"connections": [
{
"node": "2",
"output": "input_1"
}
]
}
},
"pos_x": 57,
"pos_y": 218
},
"2": {
"id": 2,
"data": {
"type": "node",
"baseId": "f36bf7cf-bef4-1f4c-d756-c0b6f2f814ff",
"globalVariable": "Rule_1"
},
"inputs": {
"input_1": {
"connections": [
{
"node": "1",
"input": "output_1"
}
]
}
},
"outputs": {
"output_1": {
"connections": [
{
"node": "3",
"output": "input_1"
}
]
}
},
"pos_x": 400,
"pos_y": 150
},
"3": {
"id": 3,
"data": {
"type": "end"
},
"inputs": {
"input_1": {
"connections": [
{
"node": "2",
"input": "output_1"
}
]
}
},
"outputs": {},
"pos_x": 785,
"pos_y": 212
}
}
}
}
},
"dataTree": {
"children": [
{
"baseId": "f36bf7cf-bef4-1f4c-d756-c0b6f2f814ff",
"children": [
{
"children": [
null
],
"globalVariable": "end",
"mapping": [
{
"key": "finalPrice",
"source": "Rule_1",
"sourceVariable": "prices.finalPrice"
},
{
"key": "crudePrice",
"source": "Rule_1",
"sourceVariable": "prices.crudePrice"
},
{
"key": "message",
"source": "Rule_1",
"sourceVariable": "message"
}
]
}
],
"globalVariable": "Rule_1",
"mapping": [
{
"key": "period",
"source": "start",
"sourceVariable": "period"
},
{
"key": "productType",
"source": "start",
"sourceVariable": "productType"
},
{
"key": "promoCode",
"source": "start",
"sourceVariable": "promoCode"
}
]
}
],
"globalVariable": "start",
"mapping": []
},
"compositionId": "94c5ef08-d609-ef88-066a-fbeda7d1e537",
"version": 1,
"createdIn": "2022-04-22T09:53:46.744Z",
"lastUpdate": "2022-04-22T09:53:46.744Z"
},
{
"_id": "62627b2ac0fc11362331185d",
"name": "Sample Rule Flow",
"description": "This rule is a part of Sample Rule Flow.",
"inputSchema": {
"period": {},
"productType": {},
"promoCode": {}
},
"outputSchema": {
"prices": {
"finalPrice": {},
"crudePrice": {}
},
"message": {}
},
"decisionTable": {
"columns": [
{
"condition": {
"type": "simple",
"inputVariable": "productType",
"name": "Product type"
},
"columnId": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"type": "input"
},
{
"condition": {
"type": "simple",
"inputVariable": "period",
"name": "Subscription period"
},
"columnId": "ac44d6bf-ddd6-3778-7486-483c4bed53fd",
"type": "input"
},
{
"condition": {
"type": "simple",
"inputVariable": "promoCode",
"name": "New Condition"
},
"columnId": "13b20cae-2d6f-0183-e970-b1c0fed5558f",
"type": "input"
},
{
"columnOutput": {
"type": "simple",
"outputVariable": "prices.crudePrice",
"name": "Price without discounts"
},
"columnId": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"type": "output"
},
{
"columnOutput": {
"type": "simple",
"outputVariable": "prices.finalPrice",
"name": "Final price"
},
"columnId": "92d6a186-702b-32f3-8d5d-ad1ab6b1c025",
"type": "output"
},
{
"columnOutput": {
"type": "simple",
"outputVariable": "message",
"name": "New Result"
},
"columnId": "9fcb15be-aa42-9380-2145-4d2ff831aa34",
"type": "output"
}
],
"rows": [
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "basic",
"type": "general"
},
"type": "input"
},
{
"column": "ac44d6bf-ddd6-3778-7486-483c4bed53fd",
"scalarCondition": {
"operator": "=",
"value": "month",
"type": "general"
},
"type": "input"
},
{
"column": "13b20cae-2d6f-0183-e970-b1c0fed5558f",
"scalarCondition": {
"operator": "=",
"value": "{PromoCode}",
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"type": "common",
"value": "8"
},
"type": "output"
},
{
"column": "92d6a186-702b-32f3-8d5d-ad1ab6b1c025",
"outputScalarValue": {
"value": {
"functionName": "TIMES",
"parameters": [
"{prices.crudePrice}",
{
"functionName": "DIVIDED",
"parameters": [
{
"functionName": "MINUS",
"parameters": [
100,
"{PromoDiscount}"
]
},
100
]
}
]
},
"type": "function"
},
"type": "output"
},
{
"column": "9fcb15be-aa42-9380-2145-4d2ff831aa34",
"outputScalarValue": {
"value": {
"functionName": "CONCAT",
"parameters": [
"\"{PromoDiscount}\"",
"\"% discount\""
]
},
"type": "function"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "basic",
"type": "general"
},
"type": "input"
},
{
"column": "ac44d6bf-ddd6-3778-7486-483c4bed53fd",
"scalarCondition": {
"operator": "=",
"value": "month",
"type": "general"
},
"type": "input"
},
{
"column": "13b20cae-2d6f-0183-e970-b1c0fed5558f",
"scalarCondition": {
"operator": "<>",
"value": "{PromoCode}",
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"type": "common",
"value": "8"
},
"type": "output"
},
{
"column": "92d6a186-702b-32f3-8d5d-ad1ab6b1c025",
"outputScalarValue": {
"value": "{prices.crudePrice}",
"type": "function"
},
"type": "output"
},
{
"column": "9fcb15be-aa42-9380-2145-4d2ff831aa34",
"outputScalarValue": {
"value": "\"no matching promo code\"",
"type": "common"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "basic",
"type": "general"
},
"type": "input"
},
{
"column": "ac44d6bf-ddd6-3778-7486-483c4bed53fd",
"scalarCondition": {
"operator": "=",
"value": "year",
"type": "general"
},
"type": "input"
},
{
"column": "13b20cae-2d6f-0183-e970-b1c0fed5558f",
"scalarCondition": {
"operator": "=",
"value": "{PromoCode}",
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"type": "function",
"value": {
"functionName": "TIMES",
"parameters": [
6,
12
]
}
},
"type": "output"
},
{
"column": "92d6a186-702b-32f3-8d5d-ad1ab6b1c025",
"outputScalarValue": {
"value": {
"functionName": "TIMES",
"parameters": [
"{prices.crudePrice}",
{
"functionName": "DIVIDED",
"parameters": [
{
"functionName": "MINUS",
"parameters": [
100,
"{PromoDiscount}"
]
},
100
]
}
]
},
"type": "function"
},
"type": "output"
},
{
"column": "9fcb15be-aa42-9380-2145-4d2ff831aa34",
"outputScalarValue": {
"value": {
"functionName": "CONCAT",
"parameters": [
"\"{PromoDiscount}\"",
"\"% discount\""
]
},
"type": "function"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "basic",
"type": "general"
},
"type": "input"
},
{
"column": "ac44d6bf-ddd6-3778-7486-483c4bed53fd",
"scalarCondition": {
"operator": "=",
"value": "year",
"type": "general"
},
"type": "input"
},
{
"column": "13b20cae-2d6f-0183-e970-b1c0fed5558f",
"scalarCondition": {
"operator": "<>",
"value": "{PromoCode}",
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"type": "function",
"value": {
"functionName": "TIMES",
"parameters": [
6,
12
]
}
},
"type": "output"
},
{
"column": "92d6a186-702b-32f3-8d5d-ad1ab6b1c025",
"outputScalarValue": {
"value": "{prices.crudePrice}",
"type": "function"
},
"type": "output"
},
{
"column": "9fcb15be-aa42-9380-2145-4d2ff831aa34",
"outputScalarValue": {
"value": "\"no matching promo code\"",
"type": "common"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "medium",
"type": "general"
},
"type": "input"
},
{
"column": "ac44d6bf-ddd6-3778-7486-483c4bed53fd",
"scalarCondition": {
"operator": "=",
"value": "month",
"type": "general"
},
"type": "input"
},
{
"column": "13b20cae-2d6f-0183-e970-b1c0fed5558f",
"scalarCondition": {
"operator": "IN",
"value": [
"{PromoCode}",
"BUSINESS SALE"
],
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": "15",
"type": "common"
},
"type": "output"
},
{
"column": "92d6a186-702b-32f3-8d5d-ad1ab6b1c025",
"outputScalarValue": {
"value": {
"functionName": "TIMES",
"parameters": [
"{prices.crudePrice}",
{
"functionName": "DIVIDED",
"parameters": [
{
"functionName": "MINUS",
"parameters": [
100,
"{PromoDiscount}"
]
},
100
]
}
]
},
"type": "function"
},
"type": "output"
},
{
"column": "9fcb15be-aa42-9380-2145-4d2ff831aa34",
"outputScalarValue": {
"value": {
"functionName": "CONCAT",
"parameters": [
"\"{PromoDiscount}\"",
"\"% discount\""
]
},
"type": "function"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "medium",
"type": "general"
},
"type": "input"
},
{
"column": "ac44d6bf-ddd6-3778-7486-483c4bed53fd",
"scalarCondition": {
"operator": "=",
"value": "month",
"type": "general"
},
"type": "input"
},
{
"column": "13b20cae-2d6f-0183-e970-b1c0fed5558f",
"scalarCondition": {
"operator": "NOT IN",
"value": [
"{PromoCode}",
"BUSINESS SALE"
],
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": "15",
"type": "common"
},
"type": "output"
},
{
"column": "92d6a186-702b-32f3-8d5d-ad1ab6b1c025",
"outputScalarValue": {
"value": "{prices.crudePrice}",
"type": "function"
},
"type": "output"
},
{
"column": "9fcb15be-aa42-9380-2145-4d2ff831aa34",
"outputScalarValue": {
"value": "\"no matching promo code\"",
"type": "common"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "medium",
"type": "general"
},
"type": "input"
},
{
"column": "ac44d6bf-ddd6-3778-7486-483c4bed53fd",
"scalarCondition": {
"operator": "=",
"value": "year",
"type": "general"
},
"type": "input"
},
{
"column": "13b20cae-2d6f-0183-e970-b1c0fed5558f",
"scalarCondition": {
"operator": "IN",
"value": [
"{PromoCode}",
"BUSINESS SALE"
],
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": {
"functionName": "TIMES",
"parameters": [
12,
12
]
},
"type": "function"
},
"type": "output"
},
{
"column": "92d6a186-702b-32f3-8d5d-ad1ab6b1c025",
"outputScalarValue": {
"value": {
"functionName": "TIMES",
"parameters": [
"{prices.crudePrice}",
{
"functionName": "DIVIDED",
"parameters": [
{
"functionName": "MINUS",
"parameters": [
100,
"{PromoDiscount}"
]
},
100
]
}
]
},
"type": "function"
},
"type": "output"
},
{
"column": "9fcb15be-aa42-9380-2145-4d2ff831aa34",
"outputScalarValue": {
"value": {
"functionName": "CONCAT",
"parameters": [
"\"{PromoDiscount}\"",
"\"% discount\""
]
},
"type": "function"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "medium",
"type": "general"
},
"type": "input"
},
{
"column": "ac44d6bf-ddd6-3778-7486-483c4bed53fd",
"scalarCondition": {
"operator": "=",
"value": "year",
"type": "general"
},
"type": "input"
},
{
"column": "13b20cae-2d6f-0183-e970-b1c0fed5558f",
"scalarCondition": {
"operator": "NOT IN",
"value": [
"{PromoCode}",
"BUSINESS SALE"
],
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": {
"functionName": "TIMES",
"parameters": [
12,
12
]
},
"type": "function"
},
"type": "output"
},
{
"column": "92d6a186-702b-32f3-8d5d-ad1ab6b1c025",
"outputScalarValue": {
"value": "{prices.crudePrice}",
"type": "function"
},
"type": "output"
},
{
"column": "9fcb15be-aa42-9380-2145-4d2ff831aa34",
"outputScalarValue": {
"value": "\"no matching promo code\"",
"type": "common"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "premium",
"type": "general"
},
"type": "input"
},
{
"column": "ac44d6bf-ddd6-3778-7486-483c4bed53fd",
"scalarCondition": {
"operator": "=",
"value": "month",
"type": "general"
},
"type": "input"
},
{
"column": "13b20cae-2d6f-0183-e970-b1c0fed5558f",
"scalarCondition": {
"operator": "IN",
"value": [
"{PromoCode}",
"DIAMOND SALE"
],
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": "25",
"type": "common"
},
"type": "output"
},
{
"column": "92d6a186-702b-32f3-8d5d-ad1ab6b1c025",
"outputScalarValue": {
"value": {
"functionName": "TIMES",
"parameters": [
"{prices.crudePrice}",
{
"functionName": "DIVIDED",
"parameters": [
{
"functionName": "MINUS",
"parameters": [
100,
"{PromoDiscount}"
]
},
100
]
}
]
},
"type": "function"
},
"type": "output"
},
{
"column": "9fcb15be-aa42-9380-2145-4d2ff831aa34",
"outputScalarValue": {
"value": {
"functionName": "CONCAT",
"parameters": [
"\"{PromoDiscount}\"",
"\"% discount\""
]
},
"type": "function"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "premium",
"type": "general"
},
"type": "input"
},
{
"column": "ac44d6bf-ddd6-3778-7486-483c4bed53fd",
"scalarCondition": {
"operator": "=",
"value": "month",
"type": "general"
},
"type": "input"
},
{
"column": "13b20cae-2d6f-0183-e970-b1c0fed5558f",
"scalarCondition": {
"operator": "NOT IN",
"value": [
"{PromoCode}",
"DIAMOND SALE"
],
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": "25",
"type": "common"
},
"type": "output"
},
{
"column": "92d6a186-702b-32f3-8d5d-ad1ab6b1c025",
"outputScalarValue": {
"value": "{prices.crudePrice}",
"type": "function"
},
"type": "output"
},
{
"column": "9fcb15be-aa42-9380-2145-4d2ff831aa34",
"outputScalarValue": {
"value": "\"no matching promo code\"",
"type": "common"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "premium",
"type": "general"
},
"type": "input"
},
{
"column": "ac44d6bf-ddd6-3778-7486-483c4bed53fd",
"scalarCondition": {
"operator": "=",
"value": "year",
"type": "general"
},
"type": "input"
},
{
"column": "13b20cae-2d6f-0183-e970-b1c0fed5558f",
"scalarCondition": {
"operator": "IN",
"value": [
"{PromoCode}",
"DIAMOND SALE"
],
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": {
"functionName": "TIMES",
"parameters": [
21,
12
]
},
"type": "function"
},
"type": "output"
},
{
"column": "92d6a186-702b-32f3-8d5d-ad1ab6b1c025",
"outputScalarValue": {
"value": {
"functionName": "TIMES",
"parameters": [
"{prices.crudePrice}",
{
"functionName": "DIVIDED",
"parameters": [
{
"functionName": "MINUS",
"parameters": [
100,
"{PromoDiscount}"
]
},
100
]
}
]
},
"type": "function"
},
"type": "output"
},
{
"column": "9fcb15be-aa42-9380-2145-4d2ff831aa34",
"outputScalarValue": {
"value": {
"functionName": "CONCAT",
"parameters": [
"\"{PromoDiscount}\"",
"\"% discount\""
]
},
"type": "function"
},
"type": "output"
}
],
"active": true
},
{
"cells": [
{
"column": "ec57bb7c-8e90-4aee-da49-17b607a6b09a",
"scalarCondition": {
"operator": "=",
"value": "premium",
"type": "general"
},
"type": "input"
},
{
"column": "ac44d6bf-ddd6-3778-7486-483c4bed53fd",
"scalarCondition": {
"operator": "=",
"value": "year",
"type": "general"
},
"type": "input"
},
{
"column": "13b20cae-2d6f-0183-e970-b1c0fed5558f",
"scalarCondition": {
"operator": "NOT IN",
"value": [
"{PromoCode}",
"DIAMOND SALE"
],
"type": "general"
},
"type": "input"
},
{
"column": "2e46eb73-de05-51bc-5913-4b261bbe2069",
"outputScalarValue": {
"value": {
"functionName": "TIMES",
"parameters": [
21,
12
]
},
"type": "function"
},
"type": "output"
},
{
"column": "92d6a186-702b-32f3-8d5d-ad1ab6b1c025",
"outputScalarValue": {
"value": "{prices.crudePrice}",
"type": "function"
},
"type": "output"
},
{
"column": "9fcb15be-aa42-9380-2145-4d2ff831aa34",
"outputScalarValue": {
"value": "\"no matching promo code\"",
"type": "common"
},
"type": "output"
}
],
"active": true
}
]
},
"type": "decision-table",
"status": "published",
"tags": [],
"userVariables": [
{
"name": "PromoCode",
"value": "SUMMER SALE",
"saved": true,
"editMode": true
},
{
"name": "PromoDiscount",
"value": 30,
"saved": true,
"editMode": true
},
{}
],
"ruleId": "f36bf7cf-bef4-1f4c-d756-c0b6f2f814ff",
"version": 1,
"createdIn": "2022-04-22T09:53:46.586Z",
"lastUpdate": "2022-04-22T09:53:46.586Z"
}
]Importing a rule flow with rules included can overwrite previously created or imported rules having the same ruleId. If no query parameters are set, a new Rule Flow is created. If new-version and version are set, a new version of the targeted Rule Flow is created. If overwrite and version are set, a specific version of the target rule flow is overwritten.
ID or alias of the target Rule Flow for creating a new version
ID or alias of the target Rule Flow for overwriting
Version of target Rule Flow
Bearer token
Content type
Name of the rule
Optional alias
Audit log TTL, must be positive
Rule type
Rule state
Input schema
Output schema
OK
No content
Bad Request: Invalid API key
Not Acceptable: Wrong Rule Flow format
Upgrade Required: Operation not allowed
POST /api/api/rule-flow/import HTTP/1.1
Host: https:/.decisionrules.io
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 176
{
"name": "My Rule Flow",
"ruleAlias": "Alias",
"auditLog": 30,
"type": "decision-table",
"status": "published",
"inputSchema": {
"InputAttribute": {}
},
"outputSchema": {
"OutputAttribute": {}
}
}No content
Importing rule flow with rules included can overwrite previously created or imported rules having the same ruleId.
Last updated