For the complete documentation index, see llms.txt. This page is also available as Markdown.

Rule Testing API

The Rule Testing API runs your saved tests and returns their results.

Authentication

Every request needs a Solver API key in the Authorization header:

Authorization: Bearer <YOUR_SOLVER_API_KEY>

Start a Test Run

post

Starts a new test run job for the specified test suites or individual tests. You must provide either an array of testSuiteIds, an array of testIds, or both.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Header parameters
x-correlation-idstringOptional

A custom correlation ID to track the job execution. If not provided, a GUID will be automatically generated.

Body
testSuiteIdsstring[]Optional

A list of Test Suite IDs to be executed.

testIdsstring[]Optional

A list of individual Test IDs to be executed.

solverVersionstring · enumOptional

Solver version for this test run. Defaults to v1 when omitted.

Possible values:
Responses
200

The test run job has been successfully created and queued.

application/json
post/start
POST /testRun/start HTTP/1.1
Host: api.decisionrules.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 57

{
  "testSuiteIds": [
    "<TEST_SUITE_ID>"
  ],
  "solverVersion": "v2"
}
{
  "testRunId": "text",
  "status": "WAITING"
}

Get Test Run Job

get

Retrieves test run job details for a specific test run, including its overall execution state and timing context. The job must belong to the requesting space.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
testRunIdstringRequired

The ID of the test run job to retrieve details for.

Responses
200

Job details retrieved successfully.

application/json
jobIdstringOptional
correlationIdstringOptional
createdAtstring · date-timeOptional
updatedAtstring · date-timeOptional
claimedAtstring · date-timeOptional
endedAtstring · date-time · nullableOptional
solverVersionstring · enumOptional

Solver version the test run uses.

Possible values:
get/{testRunId}
GET /testRun/{testRunId} HTTP/1.1
Host: api.decisionrules.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "jobId": "text",
  "correlationId": "text",
  "inputData": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "output": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "status": {
    "state": "WAITING",
    "code": "text",
    "message": "text"
  },
  "createdAt": "2026-01-01T00:00:00.000Z",
  "updatedAt": "2026-01-01T00:00:00.000Z",
  "claimedAt": "2026-01-01T00:00:00.000Z",
  "endedAt": "2026-01-01T00:00:00.000Z",
  "solverVersion": "v1"
}

Get Test Run Results Detail

get

Retrieves detailed information about a specific test run execution, including the evaluation status of individual tests and test suites.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
testRunIdstringRequired

The Test Run ID to retrieve results for.

Responses
200

Test run details retrieved successfully. Returns an array of evaluated rules, grouped by test suites and their nested test executions.

application/json
baseIdstringOptional
baseTypestring · enumOptionalPossible values:
statusstring · enumOptionalPossible values:
ruleNamestringOptional
ruleAliasstringOptional
ruleVersionnumberOptional
get/detail/{testRunId}
GET /testRun/detail/{testRunId} HTTP/1.1
Host: api.decisionrules.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "baseId": "text",
    "baseType": "decision-table",
    "status": "published",
    "ruleName": "text",
    "ruleAlias": "text",
    "ruleVersion": 1,
    "testSuiteRuns": [
      {
        "id": "text",
        "userId": "text",
        "spaceId": "text",
        "ruleAlias": "text",
        "ruleVersion": 1,
        "name": "text",
        "testSuiteId": "text",
        "status": "WAITING",
        "tests": [
          {
            "id": "text",
            "testId": "text",
            "name": "text",
            "strategy": "STANDARD",
            "input": null,
            "expectedOutput": null,
            "ignoredOutputs": [
              "text"
            ],
            "sortedInputHash": "text",
            "lastRunAt": "2026-01-01T00:00:00.000Z",
            "updatedAt": "2026-01-01T00:00:00.000Z",
            "resultStatus": "PASSED",
            "result": null,
            "error": null
          }
        ],
        "jobId": "text",
        "createdAt": "2026-01-01T00:00:00.000Z",
        "updatedAt": "2026-01-01T00:00:00.000Z",
        "claimedAt": "2026-01-01T00:00:00.000Z",
        "endedAt": "2026-01-01T00:00:00.000Z"
      }
    ]
  }
]

Solver version

Each test run uses one solver version. Set it with solverVersion in the request body:

It takes v1 or v2. If you leave it out, the tests run on v1. The test run detail shows the version it used, in solverVersion.

The same tests can run on either version. See Rule Solver API Migration.


Last updated

Was this helpful?