How can I configure the interceptors' execution order?

The execution of the interceptors respects the order they appear in the incoming and outgoing flows. For incoming requests (from client to server), the order of execution is from left to right. For responses (return from server to client), the order is from right to left.

This order is set during the configuration of the flow and it can be easily edited.

To edit the order of interceptors in a flow, first access the API card and on the Your API Overview screen, click the EDIT button next to Flows. Drag and drop the interceptor to the desired position, as illustrated in the example below.

Example:

In the illustration below, we have moved the IP Filtering interceptor and placed it before the OAuth interceptor.

The idea was to optimize the process so that only the requests that passed through IP filtering would have their credentials validated. The way it was set before, all requests would have to pass through validation to only then be filtered by IP.

Animation showing the dragging and dropping of interceptors in a flow in order to change their order
Editing the order of interceptors

If you are unable to change the order of the interceptors, check if there is another flow that originated it. The interceptors inherited from another flow appear in gray and cannot be edited. See more on Inheritance of flows here.

Note that some interceptors can only be added to the incoming or to the outgoing flow.

You can check the execution order of the interceptors in a call that already took place. Access the GATEWAY TRACE tab on the Call Details page, either from API Trace or General Trace.

Thanks for your feedback!
EDIT

Share your suggestions with us!
Click here and then [+ Submit idea]