Software AG Products 10.7 | Using API Gateway | API Gateway Administration | General Configuration | Custom Content-types
 
Custom Content-types
 
Configure Custom Content-types
An API Provider can configure custom content-types based on how the payloads in the incoming or outgoing requests have to be processed. If the native API consumes some custom content-type, the API Provider can configure a mapping between this custom content-type and a base content-type so that the schema validation, and identification in the policies are performed based on the base type.
For example, a native API consumes application/xyz content-type. The API provider creates an API for this native API and enforces the Validate API Specification policy and the API definition has schema mapping for application/json. When the request reaches API Gateway and as there is no content-type schema mapping for application/xyz, the schema validation is skipped. In such scenarios, if the API provider creates a custom content-type mapping in the API Gateway UI with the content type as application/xyz and base type as JSON, then the payload in the incoming request is validated against the JSON schema.
The following table explains the different identifiers and payload validation criteria that can be used for various content types that you can use to configure your custom content-types.
Content-type
Identifier
Payload validation
application/xml
XPath
XML schema
text/xml
text/html
multipart/form-data
multipart/mixed
application/json
JSONPath
JSON schema
application/json/badgerfish
text/plain
Regex
Regex
Note:
The custom content-type feature is not supported for the SOAP to REST transformed APIs.