{"swagger":"2.0","info":{"description":"DecisionRules Solver API for executing decision tables, scripting rules, rule flows, workflows, and lookup tables.","version":"1.27.1","title":"DecisionRules.io Rule Solver API","termsOfService":"https://docs.decisionrules.io/docs/terms-and-conditions/terms-and-conditions","contact":{"email":"support@decisionrules.io"}},"host":"api.decisionrules.io","basePath":"/","securityDefinitions":{"bearerAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Please insert Solver API Key: \"Bearer <API_KEY>\""}},"security":[{"bearerAuth":[]}],"tags":["Solve Rule"],"schemes":["https","http"],"paths":{"/rule/v2/solve/{ruleId}/{version}":{"post":{"tags":["Solve Rule"],"produces":["application/json"],"parameters":[{"name":"X-Strategy","in":"header","description":"Execution Strategy: STANDARD, FIRST_MATCH, ARRAY or EVALUATE_ALL","required":false,"type":"string"},{"name":"X-Correlation-Id","in":"header","description":"Correlation ID, in case you would like to set it manually. If not present, correlation ID will be generated automatically. In any case, the correlation ID is returned in the same header of the response.","required":false,"type":"string"},{"name":"X-Debug","in":"header","description":"Allows to switch on the debug mode, which is by default off. Set this header to \"true\" if you want to activate it.","required":false,"type":"string"},{"name":"X-Audit","in":"header","description":"Decides whether an audit of the solve should be created and saved. In case you want the audit to be created and saved, input \"true\".","required":false,"type":"string"},{"name":"X-Audit-Ttl","in":"header","description":"A number that dictates after how many days the audit will be deleted. Set to 14 days by default.","required":false,"type":"number"},{"name":"X-Lookup-Method","in":"header","description":"Header used with the Lookup Table Rule. Specifies the method to use: either 'LOOKUP_EXISTS' or 'LOOKUP_VALUE'.","required":false,"schema":{"type":"string","enum":["LOOKUP_EXISTS","LOOKUP_VALUE"]}},{"name":"ruleId","in":"path","description":"Rule ID or alias","required":true,"type":"string"},{"name":"version","in":"path","description":"Rule Version","required":false,"type":"number"},{"in":"body","name":"body","description":"Input data","required":true,"schema":{"$ref":"#/definitions/SolveBody"}}],"responses":{"200":{"description":"Rule solved"},"400":{"description":"Unknown rule or rule version"},"401":{"description":"Authentication token missing"}},"summary":"Solve Rule v2 (AERO)","description":"Execute a rule by ID or alias through the v2 solver.","operationId":"solveRuleV2"}},"/rule/v1/solve/{ruleId}/{version}":{"post":{"tags":["Solve Rule"],"produces":["application/json"],"parameters":[{"name":"X-Strategy","in":"header","description":"Execution Strategy: STANDARD, FIRST_MATCH, ARRAY or EVALUATE_ALL","required":false,"type":"string"},{"name":"X-Correlation-Id","in":"header","description":"Correlation ID, in case you would like to set it manually. If not present, correlation ID will be generated automatically. In any case, the correlation ID is returned in the same header of the response.","required":false,"type":"string"},{"name":"X-Debug","in":"header","description":"Allows to switch on the debug mode, which is by default off. Set this header to \"true\" if you want to activate it.","required":false,"type":"string"},{"name":"X-Audit","in":"header","description":"Decides whether an audit of the solve should be created and saved. In case you want the audit to be created and saved, input \"true\".","required":false,"type":"string"},{"name":"X-Audit-Ttl","in":"header","description":"A number that dictates after how many days the audit will be deleted. Set to 14 days by default.","required":false,"type":"number"},{"name":"X-Lookup-Method","in":"header","description":"Header used with the Lookup Table Rule. Specifies the method to use: either 'LOOKUP_EXISTS' or 'LOOKUP_VALUE'.","required":false,"schema":{"type":"string","enum":["LOOKUP_EXISTS","LOOKUP_VALUE"]}},{"name":"ruleId","in":"path","description":"Rule ID or alias","required":true,"type":"string"},{"name":"version","in":"path","description":"Rule Version","required":false,"type":"number"},{"in":"body","name":"body","description":"Input data","required":true,"schema":{"$ref":"#/definitions/SolveBody"}}],"responses":{"200":{"description":"Rule solved"},"400":{"description":"Unknown rule or rule version"},"401":{"description":"Authentication token missing"}},"summary":"Solve Rule v1 (GAIA)","description":"Execute a rule by ID or alias through the v1 solver.","operationId":"solveRuleV1"}},"/rule/solve/{ruleId}/{version}":{"post":{"tags":["Solve Rule"],"produces":["application/json"],"parameters":[{"name":"X-Strategy","in":"header","description":"Execution Strategy: STANDARD, FIRST_MATCH, ARRAY or EVALUATE_ALL","required":false,"type":"string"},{"name":"X-Correlation-Id","in":"header","description":"Correlation ID, in case you would like to set it manually. If not present, correlation ID will be generated automatically. In any case, the correlation ID is returned in the same header of the response.","required":false,"type":"string"},{"name":"X-Debug","in":"header","description":"Allows to switch on the debug mode, which is by default off. Set this header to \"true\" if you want to activate it.","required":false,"type":"string"},{"name":"X-Audit","in":"header","description":"Decides whether an audit of the solve should be created and saved. In case you want the audit to be created and saved, input \"true\".","required":false,"type":"string"},{"name":"X-Audit-Ttl","in":"header","description":"A number that dictates after how many days the audit will be deleted. Set to 14 days by default.","required":false,"type":"number"},{"name":"X-Lookup-Method","in":"header","description":"Header used with the Lookup Table Rule. Specifies the method to use: either 'LOOKUP_EXISTS' or 'LOOKUP_VALUE'.","required":false,"schema":{"type":"string","enum":["LOOKUP_EXISTS","LOOKUP_VALUE"]}},{"name":"ruleId","in":"path","description":"Rule ID or alias","required":true,"type":"string"},{"name":"version","in":"path","description":"Rule Version","required":false,"type":"number"},{"in":"body","name":"body","description":"Input data","required":true,"schema":{"$ref":"#/definitions/SolveBody"}}],"responses":{"200":{"description":"Rule solved"},"400":{"description":"Unknown rule or rule version"},"401":{"description":"Authentication token missing"}},"x-mcp":{"name":"solve_rule","title":"Solve Rule","description":"Execute an already saved DecisionRules rule by ID or alias with supplied input data and return its runtime output. This evaluates a rule; it does not create or modify one. Supply version only for an exact version, and use optional headers for execution strategy, debug mode, audit settings, correlation ID, or lookup method.","openWorldHint":true},"summary":"Solve Rule v1 (GAIA)","description":"Execute a rule by ID or alias through the v1 solver.","operationId":"solveRule"}},"/job/start/{identifier}/{version}":{"post":{"tags":["Solve Rule"],"summary":"Start Integration Flow Job","description":"Start an asynchronous Integration Flow job using an explicit lowercase v1 or v2 solver selection. Missing solverVersion defaults to v1.","operationId":"startJob","x-mcp":{"name":"start_job","title":"Start Integration Flow Job","description":"Start an asynchronous Integration Flow job by ID or alias. Choose lowercase solverVersion v1 or v2 for this execution; omit it to use v1. The response contains a job ID and initial status.","strictBodySchema":true,"openWorldHint":true},"produces":["application/json"],"parameters":[{"name":"X-Correlation-Id","in":"header","description":"Optional correlation ID. A new value is generated when omitted.","required":false,"type":"string"},{"name":"identifier","in":"path","description":"Integration Flow ID or alias","required":true,"type":"string"},{"name":"version","in":"path","description":"Integration Flow version. The latest published version is used when omitted.","required":false,"type":"number"},{"in":"body","name":"body","description":"Job input and execution-time solver selection.","required":true,"schema":{"$ref":"#/definitions/StartJobBody"}}],"responses":{"200":{"description":"Job started","schema":{"$ref":"#/definitions/StartJobResponse"}},"400":{"description":"Invalid Integration Flow, version, input, or solverVersion"},"401":{"description":"Authentication token missing"}}}},"/testRun/start":{"post":{"tags":["Solve Rule"],"summary":"Start Test Run","description":"Start selected tests or test suites using an explicit lowercase v1 or v2 solver selection. Missing solverVersion defaults to v1.","operationId":"startTestRun","x-mcp":{"name":"start_test_run","title":"Start Test Run","description":"Start an asynchronous test run for selected test or test-suite IDs. Choose lowercase solverVersion v1 or v2 for this run; omit it to use v1. The response contains a test-run ID and initial status.","strictBodySchema":true,"openWorldHint":true},"produces":["application/json"],"parameters":[{"name":"X-Correlation-Id","in":"header","description":"Optional correlation ID. A new value is generated when omitted.","required":false,"type":"string"},{"in":"body","name":"body","description":"Test selections and execution-time solver selection.","required":true,"schema":{"$ref":"#/definitions/StartTestRunBody"}}],"responses":{"200":{"description":"Test run started","schema":{"$ref":"#/definitions/StartTestRunResponse"}},"400":{"description":"Invalid test selection or solverVersion"},"401":{"description":"Authentication token missing"}}}}},"definitions":{"SolveBody":{"type":"object","required":["data"],"properties":{"data":{"type":"object"},"options":{"type":"object","$ref":"#/definitions/SolverOptions"}},"example":{"data":{"price":12,"code":"service-a"},"options":{"includedConditionCols":["price","code"]}}},"SolverOptions":{"type":"object","required":[],"properties":{"includedConditionCols":{"type":"array"},"excludedConditionCols":{"type":"array"},"quitSolveOnFail":{"type":"boolean"}},"example":{"data":{"price":12,"code":"service-a"},"options":{"includedConditionCols":["price","code"]}}},"StartJobBody":{"type":"object","additionalProperties":false,"properties":{"inputData":{"type":"object","description":"Input object passed to the Integration Flow.","additionalProperties":true},"solverVersion":{"type":"string","description":"Lowercase solver selected for this job. Defaults to v1 when omitted.","enum":["v1","v2"]}}},"StartTestRunBody":{"type":"object","additionalProperties":false,"properties":{"testIds":{"type":"array","description":"IDs of individual tests to run.","items":{"type":"string"}},"testSuiteIds":{"type":"array","description":"IDs of complete test suites to run.","items":{"type":"string"}},"solverVersion":{"type":"string","description":"Lowercase solver selected for this test run. Defaults to v1 when omitted.","enum":["v1","v2"]}}},"JobStatus":{"type":"object","required":["state","code","message"],"properties":{"state":{"type":"string","enum":["WAITING","RUNNING","COMPLETED","CANCELING","CANCELED","ERROR"]},"code":{"type":"string"},"message":{"type":"string"}}},"StartJobResponse":{"type":"object","required":["jobId","status"],"properties":{"jobId":{"type":"string"},"status":{"$ref":"#/definitions/JobStatus"}}},"StartTestRunResponse":{"type":"object","required":["testRunId","status"],"properties":{"testRunId":{"type":"string"},"status":{"type":"string","enum":["WAITING","RUNNING","COMPLETED","CANCELING","CANCELED","ERROR"]}}}}}