How do I Define API-specific Gateway Endpoints?
About this task
This use case explains how to define custom gateway endpoints specific to an API. You can define more than one custom gateway endpoint to an API. Custom gateway endpoints can be added for all types of APIs such as REST, SOAP, OData, and WebSocket.
The use case starts when you want to define API specific gateway endpoint and ends when you have created the API specific gateway endpoint.
Here are some points that you need to consider, when you define API specific gateway endpoint:
- Custom gateway endpoints cannot be created for the APIs that have blank space or special characters in API name or API version.
- Gateway endpoint is case-sensitive.
- Gateway endpoint cannot start with pre-defined prefixes such as rest or invoke .
- URL path of one custom gateway endpoint cannot start with the URL path of the another custom gateway endpoint or default gateway endpoint. For example, if any of the API has a custom endpoint with URL path abc/custom, you cannot have another custom gateway endpoint with URL path abc/customendpoint. Similarly, if any of the API has a default gateway endpoint gateway/myAPI/v1, you cannot have custom endpoint with URL path gateway/myAPI. However, it is possible to have two valid custom gateway endpoints with URL paths abc/custom1 and abc/custom2, because here one of the URL path is not the extension of another URL path.
- In order to use the gateway endpoints feature, the watt.server.url.alias.partialMatching property needs to be true . By default, this property is set to true .
- API Gateway internally creates the URL aliases, when you create a custom gateway endpoint. These internal URL aliases are hidden from the API Gateway users, and are displayed only in the Integration Server. Software AG recommends that you do not modify any URL alias through Integration Server.
- A gateway endpoint can use
following variables, which are resolved dynamically:
- ${defaultPrefix} - resolves based on API type. For REST and OData the defaultPrefix is gateway, SOAP the defaultPrefix is ws, and Websockets the defaultPrefix is websocket.
- ${apiName} - replaces
with the API name value.
For example, when a gateway endpoint uses ${apiName} variable, and if you change the API name, it automatically gets reflected in the gateway endpoint.
- ${apiVersion} -
replaces with the API version value.
Note: If you want to use a gateway endpoint across all versions of an API, Software AG recommends you to use the ${apiVersion} variable so that the gateway endpoint becomes unique across different versions.
Before you begin
Ensure that you have:
- Manage APIs functional privilege.
- Activated the API.
To define API-specific gateway endpoints