Add a custom filter to API Gateway

You can extend the capability of API Gateway by adding a custom filter. There are several options for adding a custom filter:

  • Write your custom requirement in Java and invoke it using the Scripting Language filter. You can use this approach to develop your business logic in a standard IDE and debug and test it in standalone mode before integrating with API Gateway. See Use JavaScript to call existing Java code.
  • Write your custom requirement using the Scripting Language filter alone. See Use JavaScript for custom requirements.
  • Write your custom filter using the API Gateway developer extension kit. Using this approach, a fully integrated filter is created that has the API Gateway runtime capability and appears in the filter palette in Policy Studio. See Write a custom filter using the extension kit.

The following examples all use different approaches to extend API Gateway by adding a custom filter.

The following table summarizes the different approaches for adding a custom filter:

Scripting Writing a Java Filter

Quick way to reuse some functionality exposed in Java

Enterprise integration

No major development skills required

Development skills required

Does not appear in filter palette in Policy Studio

Filter appears in filter palette in Policy Studio

Possible approaches:

Possible approaches:

Related Links