skip to main content
Corticon Server: Integration & Deployment Guide : Corticon API reference : REST Management API : Summary of REST methods for management of Decision Services : API Set Server Properties
 

Try Corticon Now
API Set Server Properties
<base>/server/setProperties
HTTP POST
Sets properties on the server using a JSON object. The object contains a key/value format system of the form key: property name value: value intended to be set for this property.
{
<Property name> : <Property's intended value>,
...
}
An example of a request is:
{
"serverExecutionTimesIntervalTime" : 10000
}
The response contains a JSON object similar to what returns in getProperties. There is a list of key/value pairs representing the properties that were attempted to be set. The pairs are key: property name value: object representing success/failure of setting the property value.
{
"errors" : [ <A list of the property field names that have errors>
...
]
<Property name> : {
"error" : {...} <This field will only exist if the property did not get successfully set for any reason, this will be a standard error object as defined in the section "error objects".>
},
...
}
For example, if the following object was sent:
{
"serverExecutionTimesIntervalTime" : 10000,
"versionNumber" : 1.1
}
You would get the following response woth an HTTP status code of BAD REQUEST (400):
{
"errors" : [ "versionNumber" ],
"serverExecutionTimesIntervalTime":{},
"versionNumber":{
"error":{
"message":"Property: \"versionNumber\" is read only, value not applied",
"type":"com.corticon.eclipse.rest.delegates.CcRestDelegatePropertyRequestErrorException",
"stackTrace":[
"com.corticon.eclipse.rest.delegates.RestDelegate.
setServerPropertyValue(RestDelegate.java:1539)",
"com.corticon.eclipse.rest.delegates.RestDelegate.
setServerProperties(RestDelegate.java:1071)",
...
...
"java.util.concurrent.ThreadPoolExecutor$Worker.
run(ThreadPoolExecutor.java:603)",
"java.lang.Thread.run(Thread.java:722)"
]
}
}
}
Success status code: 200 OK
Error status codes: 400 Bad Request