API Gateway 10.5 | Using API Gateway | Usage Scenarios | Custom Policy Extension
 
Custom Policy Extension
 
How Do I Invoke a Service through HTTP/HTTPS using Custom Extension?
How Do I Invoke an IS Service using a Custom Extension?
How Do I Invoke an AWS Lambda Function using Custom Extension?
How Do I Invoke a Service Asynchronously through JMS/AMQP using a Custom Extension?
Custom Extension Properties
Data Objects and Variables Available in API Gateway
API Gateway provides a range of out-of-the-box policies to address common API management requirements like security, transformation, validation, error processing, and so on. In addition, API Gateway provides an option to add custom extensions. You can add these custom extensions into API Gateway policy stages to handle a requirement that might not be handled by any of the existing policies. You can use custom extensions in conjunction with the existing policies across stages. For example, if you want to invoke a third-party API or call an external endpoint during any stage of API processing, you can add custom logic in the corresponding policy stage and use it as required.
API Gateway supports the following custom extension types:
*External endpoint
Use this custom extension when you have an external endpoint exposed, which can be configured and invoked during any stage in API processing.
For example, if a native API expects the request in a certain format and the client application sends the request in a different format, you can add a custom extension to modify the incoming request to the required format before sending it to the native API.
*webMethods IS service
Use this custom extension when you want to invoke the webMethods IS policy.
*AWS Lambda
Use this custom extension to invoke an Amazon Web Services (AWS) Lambda function and use the business logic built-in the Lambda function in any stage of API processing.
*Messaging
Use this custom extension when you want to send some data to a queue or topic during any stage in API processing and a system can read the message from the queue or topic and process it asynchronously.
Custom extensions are applicable to the REST, SOAP and OData API types. Custom extensions are supported at all levels such as, API, Scope, Global and can be added in any or all policy enforcement stages except the transport policy and the traffic monitoring policy stages.
The figure depicts a sample workflow for custom extension support in the request and response processing stages in API Gateway.