Search…
SDK and Frameworks
Management API
The Management API is a secure REST API that provides read/write access to your rules and spaces.

Swagger

You can check out these endpoints and call them right away using swagger.

Rule

get
https://api.decisionrules.io
/api/rule/:ruleId/:version?
Get rule
put
https://api.decisionrules.io
/api/rule/:ruleId/:version
Update rule

Request example

Request
{
"name": "Test from Tutorial",
"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 Tutorial"
},
"type": "output"
}
],
"active": true
}
]
},
"type": "decision-table",
"status": "published",
"createdIn": "2021-09-08T11:40:32.542Z",
"lastUpdate": "2021-09-08T11:40:59.398Z",
"tags": ["newTagName"]
}
put
https://api.decisionrules.io
/api/rule/status/:ruleId/:status/:version?
Update rule status
delete
https://api.decisionrules.io
/api/rule/:ruleId/:version
Delete rule
post
https://api.decisionrules.io
/api/rule
Create rule

Request example

Request
{
"name": "Test from Tutorial",
"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 Tutorial"
},
"type": "output"
}
],
"active": true
}
]
},
"type": "decision-table",
"status": "published",
"createdIn": "2021-09-08T11:40:32.542Z",
"lastUpdate": "2021-09-08T11:40:59.398Z",
"tags": ["tagName"]
}
​

Space

get
https://api.decisionrules.io
/api/space/items
Gets all types of rules and ruleflows in space

Tag

get
https://api.decisionrules.io
/api/tags/items
Get Rules/Rule Flows by tags
patch
https://api.decisionrules.io
/api/tags/:id/:version?
Add tags to Rule/Rule Flow

Request example:

[
{
"tagName": "yourTagName",
"color": "green"
}
]
​
// tagName is required
// No special characters other than: "()?!_.: -" are allowed
​
// color is optional
// you can select one of these colors: gray, violet, yellow, green, red, white
// if you don't input color field, default color will be inserted automatically
delete
https://api.decisionrules.io
/api/tags/:id/:version?
Delete tags from Rule/Rule Flow

Rule Flow

​
get
https://api.decisionrules.io
/api/rule-flow/:ruleFlowId/:version?
Get Rule Flow
​
put
https://api.decisionrules.io
/api/rule-flow/:ruleFlowId/version
Update Rule Flow

Request example

{
"_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"
}
put
https://api.decisionrules.io
/api/rule-flow/status/:ruleId/:status/:version
Update Rule Flow Status
delete
https://api.decisionrules.io
/api/rule-flow/:ruleFlowId/:version
Delete Rule Flow
​
post
https://api.decisionrules.io
/api/rule-flow
Create Rule Flow

Request example

{
"_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"
}
get
https://api.decisionrules.io
/api/rule-flow/export/:ruleFlowId/:version?
Export Rule Flow with all rules
post
https://api.decisionrules.io
/rule-flow/import
Import Rule Flow with all rules

Request example

[
{
"_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"