Specifying the gateway type for an API definition

An API definition is specific to one or other of the gateway types, DataPower® API Gateway or DataPower Gateway (v5 compatible). A default gateway type is set when you create an API definition, but you can edit the API configuration to specify a different gateway type.

About this task

Note: This task relates only to an OpenAPI 2.0 API definition. An OpenAPI 3.0 API is supported only on the DataPower API Gateway.

DataPower Gateway (v5 compatible) has been available with IBM® API Connect for a number of years. The DataPower API Gateway is a new gateway that has been designed with APIs in mind, and with the same security focus as DataPower Gateway (v5 compatible).

For more information on how to choose which gateway type to use, see API Connect gateway types.

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

You must specify which type of gateway each API uses. APIs can use only one type of gateway.

When you create a new API definition, or import an API definition that has no gateway type configured, the gateway type defaults according to the gateway types of the gateway services that are enabled in your Sandbox Catalog, as indicated in the following table.

Table 1. Default gateway type for a new API definition
Gateway Service enablement in Sandbox Catalog Default gateway type for new API definition
No gateway services enabled DataPower API Gateway
At least one gateway service of each type enabled DataPower API Gateway
One or more gateway services only of type DataPower API Gateway enabled DataPower API Gateway
One or more gateway services only of type DataPower Gateway (v5 compatible) enabled DataPower Gateway (v5 compatible)
If you import an API definition that already has a gateway type configured, that gateway type is retained.

Note that when you modify your API definitions to use a specific gateway type, you must ensure that each policy and policy version in the API are supported by the gateway type. DataPower Gateway (v5 compatible) and DataPower API Gateway each support policies that the other gateway type does not. In some cases, the same policy is supported by both gateway types, but with a different version number.

For example, DataPower Gateway (v5 compatible) supports version 1.0.0 of the invoke policy, but DataPower API Gateway requires version 2.0.0.

For information on policies, see execute.

For information on policy versions, see the documentation for each individual policy. For example, to review the invoke policy, see invoke.

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. Click the title of the API you want to update.
  3. Select the Gateway tab, then click Gateway and portal settings.
  4. Select the type:
    • datapower-gateway for the DataPower Gateway (v5 compatible)
    • datapower-api-gateway for the DataPower API Gateway.
    Note: The Gateway Type selection is not applicable if the Enforced option is disabled, because an unenforced API is not managed on an API Connect gateway.
  5. Click Save to retain the changes.
  6. In the navigation pane, select Policies to ensure that your API uses policies that are supported by the gateway type you selected.

    Policies in an existing API that are not supported by the new gateway type are grayed out and flagged with a red exclamation point: red exclamation point for unsupported policy.

    Some policies are supported by only one gateway type. Some policies are supported by both gateway types, but require a different version of the policy for each gateway type.