< Back
Print

Response Handler Field Plugin

The Response Handler only works in the “DynamicJSON-Connector” with the “SC::JSON – Default HTTP Transmitter”


Response Handler Configuration

The response handler is configured in the “Node Mappings”
Screenshot of the Response Handler Configuration
There are three response handlers available. All of them can only process responses in JSON-Format.

All handlers except the legacy handler have similar configuration fields like the “HTTP Code” and the “Path to result in JSON”.

In the “HTTP Code”-Field you can either configure the behavior for every code or use regex to use the same behavior for e.g. all success codes (200-299)

The following table gives some examples:

HTTP-Code Explanation
200 Only applies to an exact match of the HTTP Code 200
2[0-9][0-9] Every HTTP-Success Code (Range 200-299)
20[0-9] Only HTTP-Codes from 200-209
[4-5][0-9][0-9] All Client and Server Error HTTP-Codes (Range 400-599)

 
The “Path to result in JSON” points to a specific value in the response. To navigate through the JSON use a pipe. (|)
With the 1.21. we released three different response handlers:
 
Response Handler Selection
 

JSON Response: Log Handler

Example Configuration:
Screenshot of Log Handler Configuration
 
When using this type, “Path to result JSON” can also be a custom log message like “Item up to date”. There is also the option to log the response in the log details. It is also possible to set the log level.
 

JSON Response: Item Update Handler

The update handler also includes the log handler
Example configuration:
Response Handler Configuration
 
Path to result in JSON” needs to point directly to a value in the response. Otherwise no value will be saved.
If the response code matches the configuration, the value will be saved in the current item.
 

JSON Response: Legacy Handler

This is the old handler that checks the following format:

{"code":"","message":""}

If the expected response has a different format, please use the Log Handler or Item Update Handler

 

Was this article helpful?
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Table of Contents