Content types
The
Content-Type field in HTTP headers
indicates in which format the data is sent to, or returned by, the
HTTP methods of the Rule Execution Server REST
service.
The REST service for ruleset execution supports the application/xml and the
application/json content types. XML is the default content type of the response.
You can also find the object definitions by retrieving the Web Application Description Language
(WADL).
For OpenAPI service definitions, only the application/json content type is
supported. See the consumes and produces sections in the OpenAPI
definition file.
- application/xml
- XML is the default content type of the response. For details about the format of each returned object, see the XML schema specifications for each operation. You can also find the object definitions by retrieving the WADL (Web Application Description Language) file.
- application/json
- As an alternative to setting the Content-Type HTTP headers, you can include the format in the
URI path, after the version number. Example:
POST /api/v1/json/ruleapps?...
If the content type is not expressed correctly, you get an error message:
406 Not Acceptable: The request contains an unsupported content type or content code.