skip to main content
Corticon Server: Integration & Deployment Guide : Invoking Corticon Server : REST call
 

Try Corticon Now

REST call

Corticon supplies a REST API that lets client applications execute against remote Decision Service. The endpoint to this REST API is:
http://<base>/axis/corticon
where <base> is the Corticon Server's IP or DNS-resolvable name and port.
The payload set to the REST API is a JSON object that contains the Decision Service and related data to execute against. The format of the JSON object is:
{
"name": <string>,
"majorVersion":<number - optional>,
"minorVersion": <number - optional>,
"Objects": <JSONArray of JSONObjects>
}
where name, majorVersion, and minorVersion values specify which Decision Service will be used for the execution, and the Objects value is the payload of the data to be processed.

Success and error responses

The response returned by the server has two parts:
*A HTTP status code
*An HTTP header containing message execution info
Success response - In addition to the processed request, when execution is successful, the response message's body contains the updated JSON string. A successful execution's status and header are, for example:
200 The Decision Service executed
{
"date": "Thu, 07 Jun 2018 19:50:52 GMT",
"content-encoding": "gzip",
"vary": "Accept-Encoding",
"server": "Apache-Coyote/1.1",
"transfer-encoding": "chunked",
"content-type": "application/json"
}

Error behavior

For all REST executions, an error (HTTP status code other than 200) provides messages in the response body.