Multiple revisions deployed in an environment

Not applicable

This is more of a conceptual question.

I can deploy multiple revisions of the same API to the same environment through the deployment APIs.

Say I have revisions 3 and 4 of the same API say weatherapi deployed to the same environment, say test.

Q1. Conceptually why does the system allow me to do this?

Q2. While calling the API from a client, can I specify the revision? If I don't which revision will service the request?

0 8 575
8 REPLIES 8

Hi @ritwik_chatterjee,

Just to clarify- you cannot deploy different revisions of the same API in the same environment -- unless, you have different base paths for different revisions, which itself is not a good practice

So in ideal situations, where your revisions have same basepath.

>>Q1. Conceptually why does the system allow me to do this?

System will not allow this - it will give an error saying 'conflicting base path'

>>Q2. While calling the API from a client, can I specify the revision? If I don't which revision will service the request?

No, revisions are transparent to the clients. For reasons stated above, this is not required, since its not possible

Hope this helps

Thanks,

Not applicable

@Mukundha Madhavan

I would have thought so. However, interestingly I already have 2 revisions of my API deployed to the same base path. I was able to do it by firing the Deployment APIs.

Here are some excerpts from the output from a call to the Apigee deployment API. I do see that the base path is different for both - something I have not done explicitly. I can provide you the complete output if you need it. The UI also shows me that both the revisions are deployed in the test environment.

<APIProxyDeployment name="weatherxml"> <Organization>zzz</Organization> <Environment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="environmentStatusForRevision" name="test"> <Revision xsi:type="revisionStatusInEnvironment" name="3"> <Configuration> <BasePath>\/v1/weatherxml</BasePath> </Configuration> <State>deployed</State> </Revision> <Revision xsi:type="revisionStatusInEnvironment" name="4"> <Configuration> <BasePath>/</BasePath> </Configuration> <State>deployed</State> </Revision> </Environment> </APIProxyDeployment>

Is this a product issue?

Your basepaths don't look same to me..

Not applicable
My posted issue.

I am also seeing the same issue but on a free organization. Here's snapshot of the development statuses when this happened:

1827-screen-shot-2016-01-22-at-33901-pm.png

Hi @Nguyen_Nguyen Can you show the config of your proxy basepath (default.xml) for both the revisions?

This is not possible in private cloud.

Not applicable

Yo can use different BasePath to deploy different versions of the same API in same envirionment.