Management API
The Management API is a secure REST API that provides read/write access to your rules and spaces.
Last updated
Was this helpful?
The Management API is a secure REST API that provides read/write access to your rules and spaces.
Last updated
Was this helpful?
API Request methods cheat sheet:
NEW in v1.16.0! The Management API now fully support use of Rule Aliases when making requests.
You can check out these endpoints and call them right away using swagger.
Swagger UI:
Swagger JSON File:
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.
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:
To access the entire "Important" Folder the request could now look like this:
Request 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
GET
https://api.decisionrules.io/api/rule/:ruleId/:version?
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.
ruleId
string
Unique rule ID or alias which is common to all rule versions.
version
integer
Business rule version.
path
string
Unique folder path leading to the rule.
version
integer
Business rule version.
Authorization*
string
Bearer
Content-Type*
string
application/json
ruleId*
string
gM6RzkIZ2Yoa
version
integer
kwk9EqWFZN7S
Authorization*
string
LgWcKwwM0JXy
Content-Type*
string
RycZjvfN2via
PUT
https://api.decisionrules.io/api/rule/status/:ruleId/:status/:version?
Changes rule status from pending to published and vice versa. If the version is not specified, the latest version will be used.
ruleId*
String
Unique rule ID or alias which is common to all rule versions.
status*
String
pending XOR published
version
Number
rule version
Authorization*
String
Bearer MANAGEMENT_API_KEY
Content-Type*
String
application/json
Returns updated rule.
PUT
https://api.decisionrules.io/api/rule/:ruleId/:version
Changes the rule according to the body of the request.
ruleId
string
Unique rule ID or alias which is common to all rule versions.
version
integer
Version of Rule
path
string
Unique folder path leading to the rule.
version
integer
Business rule version.
Authorization*
string
Bearer
Content-Type*
String
application/json
body*
object
A complete rule in JSON format
ruleId*
string
9yrSPizz7lb5
version*
integer
TJzLrOP1EINh
Authorization*
string
6M4q9gDafPGp
Content-Type*
String
OpsT3twTFJRe
body*
object
wo4gaGQFjC7p
Note that there are a few attributes of the rule that cannot be updated by the PUT
endpoint. Namely, you cannot use PUT
to change the rule ID, version and rule alias. Also, you cannot change the date of last update, since it gets updated automatically.
POST
https://api.decisionrules.io/api/rule
Creates rule based on the body of the request. The body must be formatted according to the example below.
path
string
Unique folder path leading to the rule.
version
integer
Business rule version.
Authorization*
string
Bearer <MANAGEMENT_API_KEY>
Content-Type*
String
application/json
This example serves as a template for request bodies when creating rules with POST Create rule.
When updating rules with PUT Update rule, the body of the request must have the same format as well.
DELETE
https://api.decisionrules.io/api/rule/:ruleId/:version
Deletes the rule.
ruleId*
string
Unique rule ID or alias which is common to all rule versions.
version
integer
Version of Rule. If not specified, all versions will be deleted!
path
string
Unique folder path leading to the rule.
version
integer
Business rule version.
Authorization*
string
Bearer
Content-Type*
String
application/json
ruleId*
string
CfMUHelZSIU2
version
integer
zwf3bIA5cDgU
Authorization*
string
kBQr0rNvibyK
Content-Type*
String
T9sgNzzO4IF2
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.
PATCH
https://api.decisionrules.io/api/lock/:ruleId/:version
Locks / Unlocks the rule.
ruleId
string
Unique rule ID or alias which is common to all rule versions.
version
integer
Version of Rule.
path
string
Unique folder path leading to the rule.
version
integer
Business rule version.
Headers
Authorization*
string
Bearer
Content-Type*
String
application/json
GET
https://api.decisionrules.io/api/rule-flow/export/:ruleFlowId/:version?
Export Rule Flow with all rules. If the version is not specified, export Rule Flow with the latest version.
ruleFlowId*
String
Unique rule flow ID or alias which is common to all versions.
version
Number
Authorization*
String
Bearer
Content-Type*
String
application/json
POST
https://api.decisionrules.io/api/rule-flow/import
Import Rule Flow with all rules. If no query parameters are set, a new Rule Flow will be created. If the new-version
and version
query parameter are set, a new version of the targeted Rule Flow will be created. If the overwrite
and version
query parameters are set, a specific version of the target rule flow will be overwritten.
new-version
String
ID or alias of the target Rule Flow.
overwrite
String
ID or alias of the target Rule Flow.
version
Number
Version of target Rule Flow
Authorization*
String
Bearer
Content-Type*
String
application/json
GET
https://api.decisionrules.io/api/space/items
The desired space is determined by Management API Key. This endpoint also gets set of rules used in every ruleflow.
Authorizaion*
String
Bearer <API_KEY>
Content-Type
String
application/json
Authorizaion*
String
lf2RvZVYAbHB
Content-Type
String
jRB25nYzcToa
GET
https://api.decisionrules.io/api/tags/items
This endpoint allows you to get all rules/rule flows with certain tags. Desired space is derived from Management API Key.
tags*
string
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
Authorization*
String
Bearer <API_KEY>
Content-Type*
String
application/json
PATCH
https://api.decisionrules.io/api/tags/:id/:version?
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.
id*
string
Unique rule ID or alias which is common to all rule versions. You can also use rule alias.
version
string
version of Rule/Rule Flow
Authorization*
string
Bearer <API_KEY>
Content-Type*
String
application/json
body*
array
array of tags to add i JSON format
DELETE
https://api.decisionrules.io/api/tags/:id/:version?
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.
id*
string
Unique rule ID or alias which is common to all rule versions. You can also use rule alias.
version
string
version of Rule/Rule Flow
tags*
string
Comma separated list of tags. The query at the end of the url address should look like this: ?tags=tag1,tag2
Authorization*
string
Bearer <API_KEY>
Content-Type*
String
application/json
GET
https://api.decisionrules.io/api/rule-flow/export/:ruleFlowId/:version?
Export Rule Flow with all rules. If the version is not specified, export Rule Flow with the latest version.
ruleFlowId*
String
Unique rule flow ID or alias which is common to all versions.
version
Number
Authorization*
String
Bearer
Content-Type*
String
application/json
POST
https://api.decisionrules.io/api/rule-flow/import
Import Rule Flow with all rules. If no query parameters are set, a new Rule Flow will be created. If the new-version
and version
query parameter are set, a new version of the targeted Rule Flow will be created. If the overwrite
and version
query parameters are set, a specific version of the target rule flow will be overwritten.
new-version
String
ID or alias of the target Rule Flow.
overwrite
String
ID or alias of the target Rule Flow.
version
Number
Version of target Rule Flow
Authorization*
String
Bearer
Content-Type*
String
application/json
GET
https://api.decisionrules.io/api/folder/export/{nodeId}
Export folder with all rules. If no nodeId is set, then will be exported root directory.
nodeId
String
If you know your folder id, you can export it. Otherwise you export root directory
Content-Type*
String
application/json
Authorization*
String
Bearer
Use the endpoints listed below to manage the folder structure of your space.
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)
Data removal is permanent and cannot be undone.
Searchable attribues:
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 "$". For example if you want to find items which are named exactly "ClientA", try searching "^ClientA$"
id - ID of the Folder
ruleAlias - Rule-Alias
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 "$". For example if you want to find rules the exact alias "ClientA", try searching "^ClientA$"
baseId - RuleId of the Rule or Rule Flow
ruleType - type of rule
"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
GET
https://api.decisionrules.io/api/folder/export/{nodeId}
nodeId
String
CVAEjOf71DAP
path
string
Unique folder path leading to the rule.
version
integer
Business rule version.
Content-Type*
String
RGr6dnzLvhJy
Authorization*
String
2DWTCHKmYqZj
POST
https://api.decisionrules.io/api/folder/import/{targetNodeId}
Import folder with all rules into specific folder. If no targetNodeId is set, then will be imported into root directory.
targetNodeId
String
If you know you targetNodeId, you can import it. Otherwise you import folder into root directory.
path
string
Unique folder path leading to the rule.
version
integer
Business rule version.
Content-Type*
String
application/json
Authorization*
String
Bearer
export
object
exportType
string
version
number
createdAt
Date
data
object
There are some additional tools for individual rules that can be taken advantage of. Their description can be found below.
GET
https://api.decisionrules.io/api/tools/duplicates/{ruleId}/{version}
Look for decision table by id and optionally version. If the decision table is found, it is returned together with an array of duplicates.
ruleId*
String
version
String
rule version
GET
https://api.decisionrules.io/api/tools/dependencies/{identifier}/{version}
Look for dependencies by id or alias and optionally version. If the rule is found, it is returned together with an array of dependencies.
identifier*
String
Id or Alias of the rule, you want to find out dependencies of.
version
String
You can target the rule using instead of the :ruleId and :version parameters.
You can target the rule using instead of the :ruleId and :version parameters.
You can create the rule in a specific folder by utilizing .
You can target the rule using instead of the :ruleId and :version parameters.
You can target the rule using instead of the :ruleId and :version parameters.
All Folder endpoints make use of for convenience.
You can target the rule using instead of the :ruleId and :version parameters.
You can target the rule using instead of the :ruleId and :version parameters.
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.
ID of the folder
Path of folder names
{"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"}]}]}
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
ID of the folder
Path of folder names
Confirmation to delete everything in Space
No content
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.
ID of the folder
Path of folder names
{"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.
ID of the folder
Path of folder names
{"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 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.
ID of the folder
Path of folder names
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.
{"name":"Important table","baseId":"f30df343-e22d-4f39-d40f-ad5c946034f0","version":2,"ruleAlias":"big-production-table","ruleType":"decision-table","ruleStatus":"published","type":"RULE","tags":[],"description":"Sample Pricing Rule","parentId":"61a17c3d-2a32-f03a-1c41-64fd4f540d30","path":"/ClientA/production"}