Region Specific API URLs

Making API calls on Region Cloud accounts

The process of calling the Rule Solver, Managment API or BI API is the same for region-locked accounts and Global Cloud accounts. The only difference is the endpoint URL.

With the Regional Cloud accounts having to prepend the URL with their respective regional shortcut.

LocationShortcut API call URL example

us

https://us.api.decisionrules.io/:PATH

eu

https://eu.api.decisionrules.io/:PATH

au

https://au.api.decisionrules.io/:PATH

A few examples

Solving a rule through the Solver API

Solve Rule

POST https://us.api.decisionrules.io/rule/solve/:ruleId/:version

Path Parameters

NameTypeDescription

ruleId*

string

Unique identifier rule that is common to all rule versions. Instead of rule ID, it is possible to use rule alias.

version

integer

Business rule version. If the parameter is not filled in, the last published version will be used automatically. See more on versioning.

Headers

NameTypeDescription

Authorization*

string

Bearer <Solver API Key>

Content-Type

string

application/json

X-Strategy

string

STANDARD or ARRAY or FIRST_MATCH.

More in execution strategies

X-Correlation-Id

string

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.

X-Audit

string

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".

X-Audit-Ttl

string

A number that dictates after how many days the audit will be deleted. Set to 14 days by default.

X-Debug

string

Allows to switch on the debug mode, which is by default off. Set this header to "true" if you want to activate it.

Request Body

NameTypeDescription

data

object

JSON object that describes the input json data.

options

object

Object specifying solver options.

[
    {
        "car": {
            "price": "666666",
            "seats": {},
            "discount": {
                "low": "2",
                "high": "33"
            }
        }
    },
    {
        "car": {
            "price": "8888888",
            "seats": {},
            "discount": {
                "low": "8",
                "high": "33"
            }
        }
    }
]

Updating a rule through the Managment API

Update rule

PUT https://eu.api.decisionrules.io/api/rule/:ruleId/:version

Path Parameters

NameTypeDescription

rule Id

string

Unique rule ID which is common to all rule versions. You can also use rule alias.

version

integer

Version of Rule

Headers

NameTypeDescription

Authorization

string

Bearer

Request Body

NameTypeDescription

body

object

JSON format of a rule

Getting Console Logs for a rule solve through the Console Logs API

Get Console Logs for a solve

GET https://au.api.decisionrules.io/consoleLogs/:correlationId

Query Parameters

NameTypeDescription

correlationId*

String

CorrelationId of specific solve

Headers

NameTypeDescription

Authorization*

String

Bearer <Solver API Key>

Last updated