Configuring v5 compatibility options

You can configure settings to ensure compatibility with API Connect Version 5.0 compatible APIs that are converted for use with the DataPower API Gateway.

About this task

Note: This task relates to configuring an OpenAPI 2.0 API definition. For details on how to configure an OpenAPI 3.0 API definition, see Editing an OpenAPI 3.0 API definition.

You can complete this task either by using the API Designer UI application, or by using the browser-based API Manager UI.

At any time, you can switch directly to the underlying OpenAPI YAML source by clicking the Source icon OpenAPI Source icon. To return to the design form, click the Form icon Form icon.

Procedure

  1. Open the API for editing, as described in Editing an OpenAPI 2.0 API definition.
  2. Select the Gateway tab, expand Gateway and portal settings, then click Compatibility.
  3. Select from the following options as required:
    • Return V5 Responses: Return v5-compatible responses, such as OAuth and client security error responses.
    • Copy Id Headers to Message: Copy security headers to the message context for retrieval by the invoke back-end service.
    • Enforce Required Params: Check the request for required parameters during API routing. When enabled, a request that does not provide a required parameter is rejected.
    • Allow Chunked Uploads: Allow the assembly invoke policy to send documents to the server with Transfer-Encoding: chunked. This setting applies only to the invoke 1.5.0 wrapper policy deployed from API Connect using the migration utility. It does not apply to the native API Gateway assembly invoke policy.
  4. Use the YAML source to set the following options as required:
    Option Valid values Description
    allow-trailing-slash true / false Specify whether to allow the request URL to end with a / character. The default value is false.
    get-raw-body-value true / false Specify whether the GatewayScript apim.getvariable() API returns the raw body instead of parsing. This setting applies only when the context is other than message. The default value is false.
    request-headers true / false Specify whether to populate v5-compatible headers such as X-Client-IP and X-Global-Transaction-ID in the request.headers context variable. The default value is false.
  5. Click Save to save your changes.