How does it work if there are multiple API Proxies having a part of the basepath to be same ?

We have 2 API proxies with basepaths as shown below for each of them :

API Proxy Basepath
Proxy1 something/*
Proxy2 something/else

We would like to understand

  • How does Apigee Edge determine which API Proxy should handle requests to "something/else" ?
  • If we make an API request with the path "something/else", is there a guarantee that API request will always hit "something/else", and not "something/*" ?
Solved Solved
2 2 686
1 ACCEPTED SOLUTION

The Edge (Message Processor component) maintains classification tree which contains the api name, revisions, basepaths, environment etc. Using this the API request gets routed to an appropriate API Proxy.

If two APIs have a part of the basepath same, then Edge will first check if there's a specific path.

  1. If available, then the API request is routed to that API Proxy.
  2. If the specific path is not available, then the request is routed to the other API.

So in the example provide in the question, this is how it works:

  1. If the request has the path "something/else", then
    1. The request will be routed to API Proxy with the basepath "something/else", if the API Proxy with basepath "something/else" exists and is available (deployed).
    2. The request will be routed to API Proxy with the basepath "something/*", if the API Proxy with basepath "something/else" doesn't and/or is not available (undeployed).
  2. If the request has the path "something/123", then the request will be routed to API Proxy with the basepath "something/*".


Please note, if the API with the basepath "something/else" is undeployed for some reason. And during this time, if an API request comes with the path "something/else", then the request is routed to API with the basepath "something/*".

View solution in original post

2 REPLIES 2

The Edge (Message Processor component) maintains classification tree which contains the api name, revisions, basepaths, environment etc. Using this the API request gets routed to an appropriate API Proxy.

If two APIs have a part of the basepath same, then Edge will first check if there's a specific path.

  1. If available, then the API request is routed to that API Proxy.
  2. If the specific path is not available, then the request is routed to the other API.

So in the example provide in the question, this is how it works:

  1. If the request has the path "something/else", then
    1. The request will be routed to API Proxy with the basepath "something/else", if the API Proxy with basepath "something/else" exists and is available (deployed).
    2. The request will be routed to API Proxy with the basepath "something/*", if the API Proxy with basepath "something/else" doesn't and/or is not available (undeployed).
  2. If the request has the path "something/123", then the request will be routed to API Proxy with the basepath "something/*".


Please note, if the API with the basepath "something/else" is undeployed for some reason. And during this time, if an API request comes with the path "something/else", then the request is routed to API with the basepath "something/*".

GREAT question!