How to Validate API version in apigee?

Not applicable

As i have an API which have two versions and whenever request for that API comes i want to validate that if API support that version then only it will serve the request,But if API does not support the version then it will throw an error.

So I just wanted to know does Apigee provides any mechanism to validate API version?

0 2 269
2 REPLIES 2

Hi @Raveena Garg, can you provide some more info like,

When you say 2 versions I assume there are two separate HTTP calls. How are you calling these two APIs any sample request details?

  • In Apigee we can use Target Servers to define both the APIs.
  • In API proxy based on some request parameter condition, we can route the request call to either one of the API version.

Kindly provide some more info, for a concrete answer.

You need to add a lot more details:

  1. How are you versioning ? (HTTP Headers? URL ? )
  2. How are you deploying multiple API Versions? ( Same deployment artifact ?, new deployment artifact?)
  3. Do you have special versioning guidelines for backward compatible changes vs backward incompatible changes

All of the above questions help decide how apigee "sees" the api requests . In certain combinations of the above questions, it is certainly possible for Apigee to be a simple pass through and just forward the request to the Target API. In such a case, Apigee would have no role in validating versions.

Bottomline, Apigee can do a lot of things you want it to do but you would have to lay out the operating assumptions around your API's . It's not a blanket answer.