Skip to content

restClientConfig object description

When connection is established, JSON object restClientConfig is delivered in 200 OK response to the connect method. This object defines behavior for all subsequent calls concerning error handling, parameters overwriting and set of transmitted fields forming. If restClientConfig was not delevered, default values are used.

The below table lists all fields of the restClientConfig object and how the WCS server interprets them.

Parameter Description Default value
clientExclude The list of fields to exclude from sending to a client (comma separated) empty
restExclude The list of fields to exclude from sending to backend (comma separated) empty
restOnError Reaction to errors or 4xx codes:
LOG - Just log the error and continue
FAIL - Fail the operation and send the error
LOG
restPolicy Ability to redefine fields:
OVERWRITE - Overwrite fields listed in restOverwrite
NOTIFY - Do not overwrite fields
DISABLE - Do not send fields to backend
NOTIFY
restOverwrite The list of fields to overwrite if restPolicy is set to OVERWRITE (comma separated) empty

This is restClientConfig example. This object contains only ConnectionStatusEvent method. Other methods can be described same way:

"restClientConfig":
{
    "ConnectionStatusEvent":
    {
        "restExclude":"",
        "clientExclude":"",
        "restOnError":"LOG",
        "restPolicy":"NOTIFY",
        "restOverwrite":""
    }
}

Example interpretation:

  • The following options are defined for ConnectionStatusEvent method: restExclude, clientExclude, restOnError, restPolicy, restOverwrite.
  • When the method is called, all fields will be delivered to the backend server because restExclude: "".
  • When the method is called, all fields will be delivered to the client because clientExclude: "".
  • If error occures when accessing to the backend server, this error will be logged but will not be delivered to the client. In this case, the client receives normal ConnectionStatusEvent event.
  • Even if the backend server returns new parameters, the parameters will not be overwritten because restPolicy: "NOTIFY".
  • restOverwrite field will not work because restPolicy: "NOTIFY".

restClientConfig object may describe another calls configuration such as: call, OnCallEvent, CallStatusEvent, sendMessage, OnMessageEvent, MessageStatusEvent etc