{"swagger":"2.0","info":{"description":"An updated version of the DecisionRules.io Management API, incorporating new and revised endpoints.","version":"1.25.0","title":"DecisionRules.io Management API","termsOfService":"https://docs.decisionrules.io/docs/terms-and-conditions/terms-and-conditions","contact":{"email":"support@decisionrules.io"}},"host":"api.decisionrules.io","basePath":"/api","securityDefinitions":{"bearerAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Please insert: \"Bearer <MANAGEMENT_API_KEY>\" into Authorization header."}},"security":[{"bearerAuth":[]}],"tags":[{"name":"Rule"},{"name":"Space"},{"name":"Tag"},{"name":"Rule Flow"},{"name":"Folder"},{"name":"Tools"},{"name":"Test"},{"name":"Test Suite"}],"schemes":["https","http"],"consumes":["application/json"],"produces":["application/json"],"paths":{"/rule/{identifier}":{"get":{"tags":["Rule"],"summary":"Get rule","description":"Gets all of the information stored about the rule, including its content, version or input and output schemas. - Gets the latest published version.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string","description":"The ID or alias of the rule."},{"name":"path","in":"query","description":"The unique folder path leading to the rule. Use this OR the 'identifier' parameter.","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{"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"]}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}},"put":{"tags":["Rule"],"summary":"Update rule","description":"Changes the rule according to the body of the request.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string","description":"The ID or alias of the rule."},{"name":"path","in":"query","description":"The unique folder path leading to the rule. Use this OR the 'identifier' parameter.","required":false,"type":"string"},{"name":"body","in":"body","required":true,"schema":{"type":"object","properties":{"name":{"type":"string","description":"Optional name of the rule"},"id":{"type":"string","description":"Optional identifier"},"baseId":{"type":"string","description":"Optional base identifier"},"ruleAlias":{"type":"string","description":"Optional alias for the rule"},"ruleType":{"type":"string","enum":["decision-table","complex-rule","composition","decision-tree"],"description":"Type of rule"},"tags":{"type":"array","items":{"type":"string"},"description":"Optional list of tags"},"ruleState":{"type":"string","enum":["published","pending"],"description":"Current state of the rule"},"type":{"type":"string","enum":["FOLDER","RULE","ROOT"],"description":"Type of object"},"version":{"type":"number","description":"Version number of the rule"},"description":{"type":"string","description":"Description of the rule"},"inputSchema":{"type":"object","description":"Schema for input attributes","additionalProperties":{}},"outputSchema":{"type":"object","description":"Schema for output attributes","additionalProperties":{}},"decisionTable":{"type":"object","description":"Definition of the decision table","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"condition":{"type":"object","properties":{"type":{"type":"string"},"inputVariable":{"type":"string"},"name":{"type":"string"}}},"columnOutput":{"type":"object","properties":{"type":{"type":"string"},"outputVariable":{"type":"string"},"name":{"type":"string"}}},"columnId":{"type":"string"},"type":{"type":"string"}}}},"rows":{"type":"array","items":{"type":"object","properties":{"cells":{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"scalarCondition":{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}}},"outputScalarValue":{"type":"object","properties":{"value":{"type":"string"}}},"type":{"type":"string"}}}}}}}}},"ruleId":{"type":"string","description":"Unique identifier of the rule"},"createdIn":{"type":"string","format":"date-time","description":"Creation timestamp"},"lastUpdate":{"type":"string","format":"date-time","description":"Last update timestamp"}},"example":{"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","ruleState":"published","ruleType":"decision-table","ruleId":"4ea...","version":1,"createdIn":"2021-09-03T06:35:42.663Z","lastUpdate":"2021-09-03T06:35:42.663Z","tags":["tagName","anotherTagName"]}}}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{"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"]}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}},"delete":{"tags":["Rule"],"summary":"Delete rule","description":"Deletes the rule.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string","description":"The ID or alias of the rule."},{"name":"path","in":"query","description":"The unique folder path leading to the rule. Use this OR the 'identifier' parameter.","required":false,"type":"string"}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/rule/{identifier}/{version}":{"get":{"tags":["Rule"],"summary":"Get rule","description":"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.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string","description":"The ID or alias of the rule."},{"name":"version","in":"path","required":true,"type":"string","description":"The version of the rule."},{"name":"path","in":"query","description":"The unique folder path leading to the rule. Use this OR the 'identifier' parameter.","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{"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"]}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}},"put":{"tags":["Rule"],"summary":"Update rule","description":"Changes the rule according to the body of the request.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string","description":"The ID or alias of the rule."},{"name":"version","in":"path","required":true,"type":"string","description":"The version of the rule."},{"name":"path","in":"query","description":"The unique folder path leading to the rule. Use this OR the 'identifier' parameter.","required":false,"type":"string"},{"name":"body","in":"body","required":true,"schema":{"type":"object","properties":{"name":{"type":"string","description":"Optional name of the rule"},"id":{"type":"string","description":"Optional identifier"},"baseId":{"type":"string","description":"Optional base identifier"},"ruleAlias":{"type":"string","description":"Optional alias for the rule"},"ruleType":{"type":"string","enum":["decision-table","complex-rule","composition","decision-tree"],"description":"Type of rule"},"tags":{"type":"array","items":{"type":"string"},"description":"Optional list of tags"},"ruleState":{"type":"string","enum":["published","pending"],"description":"Current state of the rule"},"type":{"type":"string","enum":["FOLDER","RULE","ROOT"],"description":"Type of object"},"version":{"type":"number","description":"Version number of the rule"},"description":{"type":"string","description":"Description of the rule"},"inputSchema":{"type":"object","description":"Schema for input attributes","additionalProperties":{}},"outputSchema":{"type":"object","description":"Schema for output attributes","additionalProperties":{}},"decisionTable":{"type":"object","description":"Definition of the decision table","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"condition":{"type":"object","properties":{"type":{"type":"string"},"inputVariable":{"type":"string"},"name":{"type":"string"}}},"columnOutput":{"type":"object","properties":{"type":{"type":"string"},"outputVariable":{"type":"string"},"name":{"type":"string"}}},"columnId":{"type":"string"},"type":{"type":"string"}}}},"rows":{"type":"array","items":{"type":"object","properties":{"cells":{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"scalarCondition":{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}}},"outputScalarValue":{"type":"object","properties":{"value":{"type":"string"}}},"type":{"type":"string"}}}}}}}}},"ruleId":{"type":"string","description":"Unique identifier of the rule"},"createdIn":{"type":"string","format":"date-time","description":"Creation timestamp"},"lastUpdate":{"type":"string","format":"date-time","description":"Last update timestamp"}},"example":{"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","ruleState":"published","ruleType":"decision-table","ruleId":"4ea...","version":1,"createdIn":"2021-09-03T06:35:42.663Z","lastUpdate":"2021-09-03T06:35:42.663Z","tags":["tagName","anotherTagName"]}}}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{"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"]}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}},"delete":{"tags":["Rule"],"summary":"Delete rule","description":"Deletes the rule.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string","description":"The ID or alias of the rule."},{"name":"version","in":"path","required":true,"type":"string","description":"The version of the rule."},{"name":"path","in":"query","description":"The unique folder path leading to the rule. Use this OR the 'identifier' parameter.","required":false,"type":"string"}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/rule/status/{identifier}/{status}":{"put":{"tags":["Rule"],"summary":"Update rule status","description":"Changes rule status from pending to published and vice versa for the latest version.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string","description":"The ID or alias of the rule."},{"name":"status","in":"path","required":true,"type":"string","description":"pending XOR published."}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{"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"]}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/rule/status/{identifier}/{status}/{version}":{"put":{"tags":["Rule"],"summary":"Update rule status","description":"Changes rule status from pending to published and vice versa.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string","description":"The ID or alias of the rule."},{"name":"status","in":"path","required":true,"type":"string","description":"pending XOR published."},{"name":"version","in":"path","required":true,"type":"string","description":"The version of the rule."}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{"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"]}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/rule":{"post":{"tags":["Rule"],"summary":"Create rule","description":"Creates rule based on the body of the request. The body must be formatted according to the example below.","parameters":[{"name":"body","in":"body","required":true,"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the rule"},"description":{"type":"string","description":"Description of the rule"},"inputSchema":{"type":"object","description":"Schema for input attributes","additionalProperties":{}},"outputSchema":{"type":"object","description":"Schema for output attributes","additionalProperties":{}},"decisionTable":{"type":"object","description":"Definition of the decision table","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"condition":{"type":"object","properties":{"type":{"type":"string"},"inputVariable":{"type":"string"},"name":{"type":"string"}}},"columnOutput":{"type":"object","properties":{"type":{"type":"string"},"outputVariable":{"type":"string"},"name":{"type":"string"}}},"columnId":{"type":"string"},"type":{"type":"string"}}}},"rows":{"type":"array","items":{"type":"object","properties":{"cells":{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"scalarCondition":{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}}},"outputScalarValue":{"type":"object","properties":{"value":{"type":"string"}}},"type":{"type":"string"}}}}}}}}},"type":{"type":"string","enum":["decision-table","complex-rule","composition","decision-tree"],"description":"Type of rule"},"status":{"type":"string","enum":["published","pending"],"description":"Current state of the rule"},"ruleId":{"type":"string","description":"Unique identifier of the rule"},"version":{"type":"number","description":"Version number of the rule"},"createdIn":{"type":"string","format":"date-time","description":"Creation timestamp"},"lastUpdate":{"type":"string","format":"date-time","description":"Last update timestamp"},"tags":{"type":"array","items":{"type":"string"},"description":"Optional list of tags"}},"example":{"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"]}}}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{"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"]}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/rule/{spaceId}":{"post":{"deprecated":true,"tags":["Rule"],"summary":"Create rule for Space","description":"","operationId":"createRuleForSpace","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"spaceId","in":"path","description":"ID of Space","required":true,"type":"string"},{"in":"body","name":"body","description":"Rule to save","required":true,"schema":{"$ref":"#/definitions/Rule"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid API key or ruleId"},"406":{"description":"Wrong rule format"},"426":{"description":"Operation not allowed"}}}},"/rule/{identifier}/new-version":{"post":{"tags":["Rule"],"summary":"Create new rule version","description":"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.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string","description":"Unique rule ID or alias which is common to all rule versions."},{"name":"body","in":"body","required":true,"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the rule"},"description":{"type":"string","description":"Description of the rule"},"inputSchema":{"type":"object","description":"Schema for input attributes","additionalProperties":{}},"outputSchema":{"type":"object","description":"Schema for output attributes","additionalProperties":{}},"decisionTable":{"type":"object","description":"Definition of the decision table","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"condition":{"type":"object","properties":{"type":{"type":"string"},"inputVariable":{"type":"string"},"name":{"type":"string"}}},"columnOutput":{"type":"object","properties":{"type":{"type":"string"},"outputVariable":{"type":"string"},"name":{"type":"string"}}},"columnId":{"type":"string"},"type":{"type":"string"}}}},"rows":{"type":"array","items":{"type":"object","properties":{"cells":{"type":"array","items":{"type":"object","properties":{"column":{"type":"string"},"scalarCondition":{"type":"object","properties":{"value":{"type":"string"},"operator":{"type":"string"}}},"outputScalarValue":{"type":"object","properties":{"value":{"type":"string"}}},"type":{"type":"string"}}}}}}}}},"type":{"type":"string","enum":["decision-table","complex-rule","composition","decision-tree"],"description":"Type of rule"},"status":{"type":"string","enum":["published","pending"],"description":"Current state of the rule"},"ruleId":{"type":"string","description":"Unique identifier of the rule"},"version":{"type":"number","description":"Version number of the rule"},"createdIn":{"type":"string","format":"date-time","description":"Creation timestamp"},"lastUpdate":{"type":"string","format":"date-time","description":"Last update timestamp"},"tags":{"type":"array","items":{"type":"string"},"description":"Optional list of tags"}},"example":{"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"]}}}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{"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"]}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/rule/lock/{identifier}":{"patch":{"tags":["Rule"],"summary":"Locks / Unlocks the rule.","description":"Sets a lock on a rule's latest version to prevent edits.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string","description":"The ID or alias of the rule."},{"name":"Body","in":"body","required":true,"description":"Object that defines if rule should be locked.","schema":{"type":"object","properties":{"locked":{"type":"boolean"}},"example":{"locked":true}}},{"name":"path","in":"query","description":"The unique folder path leading to the rule. Use this OR the 'identifier' parameter.","required":false,"type":"string"}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/rule/lock/{identifier}/{version}":{"patch":{"tags":["Rule"],"summary":"Locks / Unlocks the rule.","description":"Sets a lock on a rule version to prevent edits.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string","description":"The ID or alias of the rule."},{"name":"version","in":"path","required":true,"type":"string","description":"The version of the rule."},{"name":"Body","in":"body","required":true,"description":"Object that defines if rule should be locked.","schema":{"type":"object","properties":{"locked":{"type":"boolean"}},"example":{"locked":true}}},{"name":"path","in":"query","description":"The unique folder path leading to the rule. Use this OR the 'identifier' parameter.","required":false,"type":"string"}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/space/items":{"get":{"tags":["Space"],"summary":"Gets all types of rules in space","description":"The desired space is determined by Management API Key. This endpoint also gets set of rules used in every ruleflow.","parameters":[],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"type":"object"},"example":[{"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"}]}]}}}}},"/space/{spaceId}":{"get":{"deprecated":true,"tags":["Space"],"summary":"Get rules for Space","description":"","operationId":"getRulesForSpace","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"spaceId","in":"path","description":"ID of Space","required":true,"type":"string"}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid API key"}}}},"/tags/rules/{spaceId}/":{"get":{"deprecated":true,"tags":["Tag"],"summary":"Get rules by tag/tags","description":"This endpoint allows you to get all rules with certain tags.","operationId":"getRulesByTags","produces":["application/json"],"parameters":[{"name":"spaceId","in":"path","description":"ID of Space","required":true,"type":"string"},{"name":"tags","in":"query","description":"Tags to search by as comma separated list","required":true,"type":"string"}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid API key or ruleId"},"401":{"description":"API key is missing"}}}},"/tags/rules/{spaceId}/{ruleId}":{"patch":{"deprecated":true,"tags":["Tag"],"summary":"Add tag/tags to all versions of rule","description":"This endpoint allows you to add one or multiple tags to all the versions of the given rule.","operationId":"addTagsToRule","produces":["application/json"],"parameters":[{"name":"spaceId","in":"path","description":"ID of Space","required":true,"type":"string"},{"name":"ruleId","in":"path","description":"ID of Rule","required":true,"type":"string"},{"in":"body","name":"body","description":"The only allowed special characters are \"() ? ! _ . &#58; -\"","required":true,"schema":{"$ref":"#/definitions/Tags"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid API key or ruleId"},"401":{"description":"API key is missing"}}}},"/tags/rules/{spaceId}/{ruleId}/{version}":{"patch":{"deprecated":true,"tags":["Tag"],"summary":"Add tag/tags to specified version of a rule","description":"This endpoint allows you to add one or multiple tags to a specific version of the given rule.","operationId":"addTagsToRuleWithVersion","produces":["application/json"],"parameters":[{"name":"spaceId","in":"path","description":"ID of Space","required":true,"type":"string"},{"name":"ruleId","in":"path","description":"ID of Rule","required":true,"type":"string"},{"name":"version","in":"path","description":"Version of Rule","required":true,"type":"string"},{"in":"body","name":"body","description":"The only allowed special characters are \"() ? ! _ . &#58; -\"","required":true,"schema":{"$ref":"#/definitions/Tags"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid API key or ruleId"},"401":{"description":"API key is missing"}}}},"/tags/rules/{spaceId}/{ruleId}/":{"delete":{"deprecated":true,"tags":["Tag"],"summary":"Add tag/tags to specified version of a rule","description":"This endpoint allows you to remove one or multiple tags from all the versions of the given rule.","operationId":"removeTagsFromRule","produces":["application/json"],"parameters":[{"name":"spaceId","in":"path","description":"ID of Space","required":true,"type":"string"},{"name":"ruleId","in":"path","description":"ID of Rule","required":true,"type":"string"},{"name":"tags","in":"query","description":"Tags to remove from the rule as comma separated list","required":true,"type":"string"}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid API key or ruleId"},"401":{"description":"API key is missing"}}}},"/tags/rules/{spaceId}/{ruleId}/{version}/":{"delete":{"deprecated":true,"tags":["Tag"],"summary":"Add tag/tags from all the versions of a rule","description":"This endpoint allows you to remove one or multiple tags from the specified version of the given rule.","operationId":"removeTagsFromRuleWithVersion","produces":["application/json"],"parameters":[{"name":"spaceId","in":"path","description":"ID of Space","required":true,"type":"string"},{"name":"ruleId","in":"path","description":"ID of Rule","required":true,"type":"string"},{"name":"version","in":"path","description":"Version of Rule","required":true,"type":"string"},{"name":"tags","in":"query","description":"Tags to remove from the rule as comma separated list","required":true,"type":"string"}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid API key or ruleId"},"401":{"description":"API key is missing"}}}},"/tags/items":{"get":{"tags":["Tag"],"summary":"Get rules by tags","description":"This endpoint allows you to get all ruless with certain tags. Desired space is derived from Management API Key.","parameters":[{"name":"tags","in":"query","type":"string","required":true,"description":"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"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"type":"object"},"example":[{"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"]}]}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/tags/{identifier}":{"patch":{"tags":["Tag"],"summary":"Add tags to a all versions of an item","description":"The tag/tags will be added to all the versions with given ID.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string","description":"The ID or alias of the rule."},{"name":"Body","in":"body","required":true,"description":"Array of tags to add in JSON format","schema":{"type":"array","items":{"$ref":"#/definitions/Tag"},"example":[{"tagName":"yourTagName","color":"green"}]}}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/Tag"},"example":[{"tagName":"yourTagName","color":"green"}]}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}},"delete":{"tags":["Tag"],"summary":"Remove tags from Rule","description":"The tag/tags will be deleted from all the versions with given ID.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string","description":"The ID or alias of the rule."},{"name":"tags","in":"query","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"csv","description":"Comma separated list of tags. The query at the end of the url address should look like this: ?tags=tag1,tag2"}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/tags/{identifier}/{version}":{"patch":{"tags":["Tag"],"summary":"Add tags to a specific item version","description":"The tag/tags will be added to the specified version.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string","description":"The ID or alias of the rule."},{"name":"version","in":"path","required":true,"type":"string","description":"The version of the rule."},{"name":"Body","in":"body","required":true,"description":"Array of tags to add in JSON format","schema":{"type":"array","items":{"$ref":"#/definitions/Tag"},"example":[{"tagName":"yourTagName","color":"green"}]}}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/Tag"},"example":[{"tagName":"yourTagName","color":"green"}]}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}},"delete":{"tags":["Tag"],"summary":"Remove tags from Rule","description":"The tag/tags will be deleted from the specified version.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string","description":"The ID or alias of the rule."},{"name":"version","in":"path","required":true,"type":"string","description":"The version of the rule."},{"name":"tags","in":"query","required":true,"type":"array","items":{"type":"string"},"collectionFormat":"csv","description":"Comma separated list of tags. The query at the end of the url address should look like this: ?tags=tag1,tag2"}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/folder/{nodeId}":{"get":{"tags":["Folder"],"summary":"Get folder structure of a node","description":"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.","parameters":[{"name":"nodeId","in":"path","required":true,"type":"string"},{"name":"path","in":"query","type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{"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"}]}]}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}},"post":{"tags":["Folder"],"summary":"Create folders","description":"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.","parameters":[{"name":"nodeId","in":"path","required":true,"type":"string"},{"name":"path","in":"query","type":"string"},{"in":"body","name":"body","description":"Example JSON body","required":true,"schema":{"$ref":"#/definitions/Child"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}},"put":{"tags":["Folder"],"summary":"Create or overwrite folder structure of a node","description":"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.","parameters":[{"name":"nodeId","in":"path","required":true,"type":"string"},{"name":"path","in":"query","required":false,"type":"string","description":"Path of folder names"},{"in":"body","name":"body","description":"Example JSON body","required":true,"schema":{"$ref":"#/definitions/Child"}}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{"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"}]}]}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}},"delete":{"tags":["Folder"],"summary":"Delete a folder and all of its descendants (Including it's rules!)","description":"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","parameters":[{"name":"nodeId","in":"path","required":true,"type":"string"},{"name":"path","in":"query","type":"string","description":"Path of folder names"},{"name":"deleteAll","in":"query","type":"boolean","description":"Confirmation to delete everything in Space"}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/folder/export/{nodeId}":{"get":{"tags":["Folder"],"summary":"Export folder with all rules","description":"Export folder with all rules. If no nodeId is set, then will be exported root directory.","parameters":[{"name":"nodeId","in":"path","required":true,"type":"string","description":"If you know your folder id, you can export it. Otherwise you export root directory"}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{"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":[]}}}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/folder/import/{nodeId}":{"post":{"tags":["Folder"],"summary":"Import folder and all rules","description":"Import folder with all rules into specific folder. If no targetNodeId is set, then will be imported into root directory.","parameters":[{"name":"nodeId","in":"path","required":true,"type":"string","description":"If you know you targetNodeId, you can import it. Otherwise you import folder into root directory."},{"name":"path","in":"query","description":"The unique folder path leading to the rule. Use this OR the 'identifier' parameter.","required":false,"type":"string"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/ImportFolder"}}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{"folderNode":"4b261bbe2069"}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/folder/find":{"post":{"tags":["Folder"],"summary":"Find a folder or rule by attribute","description":"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 $.","parameters":[{"in":"body","name":"body","required":true,"schema":{"type":"object","properties":{"name":{"type":"string","description":"Optional name of the rule"},"id":{"type":"string","description":"Optional identifier"},"baseId":{"type":"string","description":"Optional base identifier"},"ruleAlias":{"type":"string","description":"Optional alias for the rule"},"ruleType":{"type":"string","enum":["decision-table","complex-rule","composition","decision-tree"],"description":"Type of rule"},"tags":{"type":"array","items":{"type":"string"},"description":"Optional list of tags"},"ruleState":{"type":"string","enum":["published","pending"],"description":"Current state of the rule"},"type":{"type":"string","enum":["FOLDER","RULE","ROOT"],"description":"Type of object"},"version":{"type":"number","description":"Version number of the rule"}},"example":{"name":"Example Rule","id":"abc123","baseId":"base-001","ruleAlias":"my-rule","ruleType":"decision-table","tags":["finance","approval"],"ruleState":"published","type":"RULE","version":1}}}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{"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"}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/folder/move":{"put":{"tags":["Folder"],"summary":"Move Folders from their current position under a new parent","description":"Moves folders (including descendants) and/or rules under the parent specified by targetId or targetPath attribute in the request body.","parameters":[{"in":"body","name":"body","required":true,"schema":{"type":"object","properties":{"targetId":{"type":"string","description":"Optional target ID"},"targetPath":{"type":"string","description":"Optional target path"},"nodes":{"type":"array","description":"List of nodes","items":{"type":"object","properties":{"type":{"type":"string","enum":["FOLDER","RULE"],"description":"Type of node"},"id":{"type":"string","description":"Optional node ID"},"baseId":{"type":"string","description":"Optional base ID"},"ruleAlias":{"type":"string","description":"Optional rule alias"}},"required":["type"]}}},"example":{"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"}]}}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/folder/rename/{nodeId}":{"patch":{"tags":["Folder"],"summary":"Rename a folder","description":"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.","parameters":[{"name":"nodeId","in":"path","required":true,"type":"string"},{"name":"path","in":"query","required":false,"type":"string","description":"Path of folder names"},{"name":"body","in":"body","required":true,"description":"New name of folder","schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"example":{"name":"Renamed Folder"}}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/tools/duplicates/{identifier}":{"get":{"tags":["Tools"],"summary":"Find duplicates in a decision table","description":"Look for decision table by id. If the decision table is found, it is returned together with an array of duplicates.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/tools/duplicates/{identifier}/{version}":{"get":{"tags":["Tools"],"summary":"Find duplicates in a decision table","description":"Look for decision table by id and version. If the decision table is found, it is returned together with an array of duplicates.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string"},{"name":"version","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/tools/dependencies/{identifier}":{"get":{"tags":["Tools"],"summary":"Find all dependencies of a rule","description":"Look for dependencies by id or alias. If the rule is found, it is returned together with an array of dependencies.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/tools/dependencies/{identifier}/{version}":{"get":{"tags":["Tools"],"summary":"Find all dependencies of a rule","description":"Look for dependencies by id or alias and version. If the rule is found, it is returned together with an array of dependencies.","parameters":[{"name":"identifier","in":"path","required":true,"type":"string"},{"name":"version","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{}}},"400":{"description":"Bad Request","schema":{"type":"string","example":"Error: This rule belongs to another user OR rule not found"}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication token missing"}}}}}}},"/rule-flow/{ruleFlowId}":{"get":{"deprecated":true,"tags":["Rule Flow"],"summary":"Get Rule Flow by Id","description":"","operationId":"getRuleFlowById","produces":["application/json"],"parameters":[{"name":"ruleFlowId","in":"path","description":"ID of Rule Flow","required":true,"type":"string"}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid API key or ruleFlowId"}}}},"/rule-flow/{ruleFlowId}/{version}":{"get":{"deprecated":true,"tags":["Rule Flow"],"summary":"Get Rule Flow by Id and Version","description":"","operationId":"getRuleFlowByIdAndVersion","produces":["application/json"],"parameters":[{"name":"ruleFlowId","in":"path","description":"ID of Rule Flow","required":true,"type":"string"},{"name":"version","in":"path","description":"Version of Rule Flow","required":true,"type":"number"}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid API key or ruleFlowId"}}},"put":{"deprecated":true,"tags":["Rule Flow"],"summary":"Update Rule Flow","description":"","operationId":"patchRuleFlowByIdAndVersion","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ruleFlowId","in":"path","description":"ID of Rule Flow","required":true,"type":"string"},{"name":"version","in":"path","description":"Version of Rule Flow","required":true,"type":"number"},{"in":"body","name":"body","description":"Rule Flow to update","required":true,"schema":{"$ref":"#/definitions/RuleFlow"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid API key or ruleFlowId"},"406":{"description":"Wrong Rule Flow format"},"426":{"description":"Operation not allowed"}}},"delete":{"deprecated":true,"tags":["Rule Flow"],"summary":"Delete Rule Flow","description":"","operationId":"deleteRuleFlowByIdAndVersion","produces":["application/json"],"parameters":[{"name":"ruleFlowId","in":"path","description":"ID of Rule Flow","required":true,"type":"string"},{"name":"version","in":"path","description":"Version of Rule Flow","required":true,"type":"number"}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid API key or ruleFlowId"}}}},"/rule-flow":{"post":{"deprecated":true,"tags":["Rule Flow"],"summary":"Create Rule Flow","description":"","operationId":"createRuleFlowForSpace","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Rule Flow to save","required":true,"schema":{"$ref":"#/definitions/RuleFlow"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid API key or ruleFlowId"},"406":{"description":"Wrong Rule Flow format"},"426":{"description":"Operation not allowed"}}}},"/rule-flow/export/{ruleFlowId}":{"get":{"tags":["Rule Flow"],"summary":"Export Rule Flow with all rules","description":"Export the latest version of a Rule Flow with all rules.","parameters":[{"name":"ruleFlowId","in":"path","required":true,"type":"string","description":"Unique rule flow ID or alias which is common to all versions."}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"type":"object"}}},"400":{"description":"Bad Request: Invalid API key or ruleFlowId","schema":{"example":{"error":{"message":"Invalid API key"}}}},"426":{"description":"Upgrade Required: Operation not allowed"}}}},"/rule-flow/export/{ruleFlowId}/{version}":{"get":{"tags":["Rule Flow"],"summary":"Export Rule Flow with all rules","description":"Export a specific version of a Rule Flow with all rules.","parameters":[{"name":"ruleFlowId","in":"path","required":true,"type":"string","description":"Unique rule flow ID or alias which is common to all versions."},{"name":"version","in":"path","required":true,"type":"number","description":"Version of the Rule Flow."}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"type":"object"}}},"400":{"description":"Bad Request: Invalid API key or ruleFlowId","schema":{"example":{"error":{"message":"Invalid API key"}}}},"426":{"description":"Upgrade Required: Operation not allowed"}}}},"/rule-flow/import":{"post":{"tags":["Rule Flow"],"summary":"Import Rule Flow with all rules","description":"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.","parameters":[{"name":"new-version","in":"query","required":false,"type":"string","description":"ID or alias of the target Rule Flow for creating a new version"},{"name":"overwrite","in":"query","required":false,"type":"string","description":"ID or alias of the target Rule Flow for overwriting"},{"name":"version","in":"query","required":false,"type":"number","description":"Version of target Rule Flow"},{"in":"body","name":"body","required":true,"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"description":"Name of the rule"},"ruleAlias":{"type":"string","maxLength":100,"description":"Optional alias"},"auditLog":{"type":"number","description":"Audit log TTL, must be positive"},"type":{"type":"string","description":"Rule type","enum":["decision-table","decision-tree","complex-rule","composition"]},"status":{"type":"string","description":"Rule state","enum":["published","pending"]},"inputSchema":{"type":"object","description":"Input schema"},"outputSchema":{"type":"object","description":"Output schema"}},"required":["name","type","status","inputSchema","outputSchema"],"example":{"name":"My Rule Flow","ruleAlias":"Alias","auditLog":30,"type":"decision-table","status":"published","inputSchema":{"InputAttribute":{}},"outputSchema":{"OutputAttribute":{}}}}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request: Invalid API key","schema":{"example":{"error":{"message":"Invalid API key"}}}},"406":{"description":"Not Acceptable: Wrong Rule Flow format"},"426":{"description":"Upgrade Required: Operation not allowed"}}}},"/statistics/owner":{"get":{"tags":["Statistics"],"summary":"Get space owner statistics","description":"Get space owner statistics.","parameters":[],"responses":{"200":{"description":"OK","schema":{"type":"object","example":{"apiCalls":{"currentUsage":32,"limit":15000000},"items":{"currentUsage":55,"limit":100}}}},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication bearer token missing"}}}}}}},"/test/{testSuiteId}":{"post":{"tags":["Test"],"summary":"Create a new test","description":"Creates a new test in a specific space and test suite.","parameters":[{"name":"testSuiteId","in":"path","required":true,"type":"string","description":"The ID of the Test Suite"},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/CreateTest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Test"}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication bearer token missing"}}}}}},"put":{"tags":["Test"],"summary":"Update a test","description":"Updates an existing test.","parameters":[{"name":"testSuiteId","in":"path","required":true,"type":"string","description":"The ID of the Test Suite"},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/Test"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Test"}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication bearer token missing"}}}}}}},"/test/move":{"put":{"tags":["Test"],"summary":"Move tests","description":"Moves tests from their current suite into a new, automatically created suite for a specific rule.","parameters":[{"name":"body","in":"body","required":true,"schema":{"type":"object","required":["ids","ruleAlias","ruleVersion","name"],"properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Array of Test IDs to move"},"ruleAlias":{"type":"string"},"ruleVersion":{"type":"number"},"name":{"type":"string","description":"Name for the newly created test suite"}}}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication bearer token missing"}}}}}}},"/test":{"delete":{"tags":["Test"],"summary":"Delete tests","description":"Deletes one or multiple tests by ID.","parameters":[{"name":"ids","in":"query","required":true,"type":"string","description":"Comma-separated list of test IDs to delete"}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication bearer token missing"}}}}}}},"/testSuite/rule/{alias}/{version}":{"get":{"tags":["Test Suite"],"summary":"Get Test Suites for a Rule","description":"Retrieves test suites associated with a specific rule alias and version.","parameters":[{"name":"alias","in":"path","required":true,"type":"string","description":"The alias of the rule"},{"name":"version","in":"path","required":true,"type":"number","description":"The version of the rule"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/TestSuite"}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication bearer token missing"}}}}}}},"/testSuite":{"get":{"tags":["Test Suite"],"summary":"Get Test Suites for a Space","description":"Retrieves test suites grouped by rules within a specific space.","parameters":[{"name":"filter","in":"query","required":false,"type":"string","description":"Optional JSON string representation of a TestSuiteFilter object. \n\nAllowed properties:\n* `ruleAlias` (string): The alias of the rule.\n* `ruleVersion` (number): The version of the rule.\n* `id` (string): The specific test suite ID.\n\nExample: `{\"ruleAlias\": \"my-rule\", \"ruleVersion\": 1}`."}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/RuleTestSuite"}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication bearer token missing"}}}}}},"post":{"tags":["Test Suite"],"summary":"Create Test Suites","description":"Creates new test suites in a specific space.","parameters":[{"name":"body","in":"body","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/CreateTestSuite"}}}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/TestSuite"}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication bearer token missing"}}}}}},"put":{"tags":["Test Suite"],"summary":"Update Test Suite","description":"Updates an existing test suite.","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/UpdateTestSuite"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/TestSuite"}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication bearer token missing"}}}}}},"delete":{"tags":["Test Suite"],"summary":"Delete Test Suites","description":"Deletes one or multiple test suites in a specific space.","parameters":[{"name":"ids","in":"query","required":true,"type":"string","description":"Comma-separated list of test suite IDs to delete"}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication bearer token missing"}}}}}}},"/testSuite/move":{"put":{"tags":["Test Suite"],"summary":"Move Test Suites","description":"Moves test suites to a different rule alias and version.","parameters":[{"name":"body","in":"body","required":true,"schema":{"type":"object","required":["ids","ruleAlias","ruleVersion"],"properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Array of Test Suite IDs"},"ruleAlias":{"type":"string","description":"Target rule alias"},"ruleVersion":{"type":"number","description":"Target rule version"}}}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized","schema":{"type":"object","example":{"error":{"message":"Authentication bearer token missing"}}}}}}}},"definitions":{"Child":{"type":"object","properties":{"type":{"type":"string","enum":["FOLDER","RULE","ROOT"]},"name":{"type":"string"},"id":{"type":"string"},"baseId":{"type":"string"},"ruleAlias":{"type":"string"},"version":{"type":"number"},"children":{"type":"array","items":{"$ref":"#/definitions/Child"}}},"example":{"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}]}]}},"Rule":{"type":"object","required":["name","description","inputSchema","outputSchema","type","status"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"inputSchema":{"type":"object"},"outputSchema":{"type":"object"},"type":{"type":"string","description":"Type of the rule.","enum":["decision-table","complex-rule","composition"]},"decisionTable":{"$ref":"#/definitions/DecisionTable"},"script":{"type":"string"},"status":{"type":"string","enum":["published","pending"]},"tags":{"type":"array","items":{"type":"string"}},"lastUpdate":{"type":"string","format":"date-time"},"createdIn":{"type":"string","format":"date-time"},"baseId":{"type":"string"},"version":{"type":"number"},"userVariables":{"type":"array","items":{"$ref":"#/definitions/UserVariable"}},"auditLog":{"$ref":"#/definitions/AuditLog"},"nodes":{"type":"array","items":{"$ref":"#/definitions/TreeNode"}}}},"UserVariable":{"type":"object","properties":{"name":{"type":"string"},"value":{},"saved":{"type":"boolean"},"editMode":{"type":"boolean"}}},"AuditLog":{"type":"object","properties":{"active":{"type":"boolean"},"debug":{"type":"object","properties":{"active":{"type":"boolean"}}},"ttl":{"type":"number"}}},"DecisionTable":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/definitions/Column"}},"rows":{"type":"array","items":{"$ref":"#/definitions/Row"}}}},"TreeNode":{"type":"object","required":["id","type","nodes"],"properties":{"id":{"type":"string"},"type":{"type":"string","description":"Type of the node.","enum":["if","then","result","else","logic_group","logic_or"]},"operandText":{"type":"string","description":"Node text."},"nodes":{"type":"array","items":{"$ref":"#/definitions/TreeNode"}},"outputScalarValue":{"$ref":"#/definitions/OutputScalarValue"},"modelVariablePath":{"type":"string"},"scalarCondition":{"$ref":"#/definitions/ScalarCondition"}}},"Column":{"type":"object","required":["columnId","type"],"properties":{"columnId":{"type":"string"},"type":{"description":"If input, then condition is required. If output, then columnOutput is required.","type":"string","enum":["input","output"]},"condition":{"$ref":"#/definitions/Condition"},"columnOutput":{"$ref":"#/definitions/ColumnOutput"},"validValues":{"type":"array","items":{"$ref":"#/definitions/ValidValue"}}}},"Row":{"type":"object","properties":{"cells":{"type":"array","items":{"$ref":"#/definitions/Cell"}},"active":{"type":"boolean"}}},"Cell":{"type":"object","properties":{"column":{"type":"string","description":"Id of specific Column"},"type":{"type":"string","description":"If input, then scalarCondition is required. If output, then outputScalarValue is required.","enum":["input","output"]},"scalarCondition":{"$ref":"#/definitions/ScalarCondition"},"outputScalarValue":{"$ref":"#/definitions/OutputScalarValue"}}},"Condition":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"inputVariable":{"type":"string"}}},"ColumnOutput":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"outputVariable":{"type":"string"}}},"ScalarCondition":{"type":"object","properties":{"operator":{"type":"string"},"type":{"type":"string","enum":["general","date","function"]},"value":{"type":"string"}}},"OutputScalarValue":{"type":"object","properties":{"value":{"type":"string"},"type":{"type":"string","enum":["common","function"]}}},"ValidValue":{"type":"object","properties":{"type":{"type":"string","enum":["GENERAL","DATE"]},"value":{"type":"object","properties":{"display":{"type":"string"},"value":{"type":"string"},"date":{"type":"string"},"time":{"type":"string"},"timezone":{"type":"string"}}}}},"Tags":{"type":"array","items":{"$ref":"#/definitions/Tag"}},"Tag":{"type":"object","required":["tagName"],"properties":{"tagName":{"type":"string"},"color":{"type":"string","enum":["default","red","gray","yellow","white","violet","green"]}}},"RuleFlow":{"type":"object","required":["name","inputSchema","description","outputSchema","type","status"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"inputSchema":{"type":"object"},"outputSchema":{"type":"object"},"type":{"type":"string"},"visualEditorData":{"type":"object","description":"Graphics model of Rule Flow"},"dataTree":{"type":"object","description":"Data model of Rule Flow"},"status":{"type":"string","enum":["published","pending"]},"zoomOptions":{"type":"object","properties":{"canvas_x":{"type":"number"},"canvas_y":{"type":"number"},"pos_x":{"type":"number"},"pos_y":{"type":"number"},"zoom":{"type":"number"}}},"compositionId":{"type":"string"},"baseId":{"type":"string"}}},"ImportFolder":{"type":"object","properties":{"export":{"type":"object","properties":{"exportType":{"type":"string"},"version":{"type":"number"},"createdAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"structure":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"children":{"type":"array","items":{"type":"object"}}}},"rules":{"type":"array","items":{"type":"object"}}}}}}}},"CreateTest":{"type":"object","required":["name","strategy","input","expectedOutput","ignoredOutputs"],"properties":{"name":{"type":"string","maxLength":80},"strategy":{"type":"string","enum":["STANDARD","ARRAY","FIRST_MATCH","EVALUATE_ALL"],"description":"SolverStrategyEnum value"},"input":{"type":"object","description":"Input data for the rule"},"expectedOutput":{"type":"object","description":"Expected output from the rule"},"ignoredOutputs":{"type":"array","items":{"type":"string"},"description":"List of object properties to ignore in the output comparison"}}},"Test":{"type":"object","required":["name","strategy","input","expectedOutput","ignoredOutputs"],"properties":{"id":{"type":"string"},"name":{"type":"string","maxLength":80},"strategy":{"type":"string","enum":["STANDARD","ARRAY","FIRST_MATCH","EVALUATE_ALL"]},"input":{"type":"object"},"expectedOutput":{"type":"object"},"ignoredOutputs":{"type":"array","items":{"type":"string"}},"sortedInputHash":{"type":"string"},"lastRunAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CreateTestSuite":{"type":"object","required":["spaceId","ruleAlias","ruleVersion","name","tests"],"properties":{"spaceId":{"type":"string"},"ruleAlias":{"type":"string"},"ruleVersion":{"type":"number"},"name":{"type":"string","maxLength":80},"tests":{"type":"array","items":{"$ref":"#/definitions/Test"}}}},"UpdateTestSuite":{"type":"object","required":["id","spaceId","ruleAlias","ruleVersion","name","tests","createdAt"],"properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"ruleAlias":{"type":"string"},"ruleVersion":{"type":"number"},"name":{"type":"string","maxLength":80},"createdAt":{"type":"string","format":"date-time"},"tests":{"type":"array","items":{"$ref":"#/definitions/Test"},"description":"Array of tests. Existing tests must include 'id' and 'createdAt'. New tests being added during the update can omit these."}}},"TestSuite":{"type":"object","required":["id","spaceId","ruleAlias","ruleVersion","name","tests","createdAt"],"properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"ruleAlias":{"type":"string"},"ruleVersion":{"type":"number"},"name":{"type":"string","maxLength":80},"createdAt":{"type":"string","format":"date-time"},"tests":{"type":"array","items":{"$ref":"#/definitions/Test"}}}},"RuleTestSuite":{"type":"object","properties":{"baseId":{"type":"string"},"baseType":{"type":"string","enum":["decision-table","complex-rule","composition","decision-tree","workflow","integration-flow","lookup-table"]},"status":{"type":"string","enum":["published","pending"]},"ruleName":{"type":"string"},"ruleAlias":{"type":"string"},"ruleVersion":{"type":"number"},"suites":{"type":"array","items":{"$ref":"#/definitions/TestSuite"}}}},"TestExecution":{"type":"object","properties":{"id":{"type":"string"},"testId":{"type":"string"},"name":{"type":"string"},"strategy":{"type":"string","enum":["STANDARD","ARRAY","FIRST_MATCH","EVALUATE_ALL"]},"input":{"type":"object"},"expectedOutput":{"type":"object"},"ignoredOutputs":{"type":"array","items":{"type":"string"}},"sortedInputHash":{"type":"string"},"lastRunAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"resultStatus":{"type":"string","enum":["PASSED","FAILED","ERROR"]},"result":{"type":"object"}}},"TestSuiteRun":{"type":"object","properties":{"id":{"type":"string"},"testSuiteId":{"type":"string"},"spaceId":{"type":"string"},"ruleAlias":{"type":"string"},"ruleVersion":{"type":"number"},"name":{"type":"string"},"status":{"type":"string","enum":["WAITING","RUNNING","COMPLETED","CANCELED","ERROR"]},"tests":{"type":"array","items":{"$ref":"#/definitions/TestExecution"}},"jobId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"claimedAt":{"type":"string","format":"date-time"},"endedAt":{"type":"string","format":"date-time"}}}}}