Response Format
Rule Response Content Type
By default, when triggering a rule—whether it's a SimpleRule, DecisionTable, or Ruleset—via API, the response is returned in JSON format. This is the standard for the Test Result tabs inside the Nected platform, where rule responses are displayed as formatted JSON for easy inspection and debugging.
However, when rules are called via API (either from an external system or another Nected rule/workflow), the response format and input format can both be fully controlled using standard HTTP headers:
Set Response Format Using Accept
Header
Accept
HeaderTo receive the rule response in a format other than JSON, set the Accept
header in your API call accordingly:
JSON
application/json
(default)
XML
application/xml
HTML
text/html
Text
text/plain
FORM
multipart/form-data
FORM URL Encoded
application/x-www-form-urlencoded
Example for XML Response:
This will return the same rule response structure in XML format, for example:
Set Input Format Using Content-Type
Header
Content-Type
HeaderSimilarly, rule input can be submitted in alternative formats (e.g., XML or form-encoded), as long as the correct Content-Type
header is set in the request. Internally, Nected will parse the request based on this type and evaluate it as intended.
JSON
application/json
(default)
XML
application/xml
HTML
text/html
Text
text/plain
FORM
multipart/form-data
FORM URL Encoded
application/x-www-form-urlencoded
Example for XML Input Payload:
Sent via:
Nected will parse this XML input, process the rule logic, and return the response in the requested format (e.g., XML).
<aside> ⚙
Even though you can set custom content types for input and output in live API calls, the Test Result tabs in Nected (for rules, workflows, or connectors) always render results in JSON for consistent visual formatting. However, this does not affect the actual runtime behavior of your API calls.
</aside>
Use the Accept
and Content-Type
headers to handle XML, plain text, or other formats externally when integrating with legacy systems, ERP platforms, or custom frontends.
Workflow Response Content Type
By default, when invoking a workflow via API, Nected returns the output in JSON format. This format is displayed in the Test Result tab within the platform to ensure consistent and clear output visualization during testing.
However, you can customize both the response format and input format when executing a workflow externally (from another system or service) by specifying standard HTTP headers.
Set Workflow Response Format Using Accept
Header
Accept
HeaderTo receive the workflow execution result in a specific format, you can set the Accept
header in your API request. This allows seamless integration with systems that require XML, plain text, or other response formats.
JSON
application/json
(default)
XML
application/xml
HTML
text/html
Text
text/plain
FORM
multipart/form-data
FORM URL Encoded
application/x-www-form-urlencoded
Example API Call for XML Response:
Sample XML Response:
Set Workflow Input Format Using Content-Type
Header
Content-Type
HeaderJust like with rule execution, you can post input in formats other than JSON, such as XML or form-encoded strings, by setting the Content-Type
header accordingly.
JSON
application/json
(default)
XML
application/xml
HTML
text/html
Text
text/plain
FORM
multipart/form-data
FORM URL Encoded
application/x-www-form-urlencoded
Example XML Input:
Sent via:
Use Accept
and Content-Type
headers as needed to ensure your workflows can interact seamlessly with systems requiring specific input or response formats, such as enterprise backends, legacy software, or third-party API consumers.
Last updated