Can you use an updated API Spec document to generate a new revision of an existing Proxy?

Not applicable

I am fairly new to Apigee - have looked for an answer to this in the docs but can't find one.

I have created a simple API Spec and have used that to generate a working API Proxy - it's a proof of concept, just a couple of endpoints, but everything is working the way I wanted it to.

I now want to expand my proof of concept so I will add a few more endpoints to my API Spec swagger document.

Can I somehow import the new version of the spec into my Proxy as a new Revision using the web management interface? Or do I have to delete the Proxy and start again? It seems like there must be a process for taking changes in a Spec and updating a Proxy - but I can't work out how to do it.

Thanks - any advice appreciated

0 2 612
2 REPLIES 2

Hello @Charlie Perrins.

If you have not modified the proxy by adding policies to the request flows, then you would delete the proxy and create it again with the updated Open API specification.

If you already modified the proxy by adding policies, then you should save that proxy as a new revision and then manually update the proxy according to the new Open API specification.

You can also import the updated Open API specification as a new revision using the openapi2apigee Node.js tool, but this assumes that you have not modified the current proxy revision.

The openapi2apigee Node.js tool performs the following:

  • It creates a proxy bundle locally based on the Open API spec and it will upload and deploy that proxy to Apigee Edge.
  • if the proxy already exists in Edge, then it will import the proxy as a new revision and deploy it if the appropriate command line arg is specified.

@Charlie Perrins

Here are the instructions to update the proxy based on an updated OpenAPI spec from the UI.

1) Here is my Pet store proxy in Apigee Edge

6052-screen-shot-2017-12-01-at-33426-pm.png

2) Update the OpenAPI spec with the spec editor.

6053-screen-shot-2017-12-01-at-33643-pm.png

3) Go back to the proxy and save it as a new revision.

4) Click the Develop tab.

6054-screen-shot-2017-12-01-at-33841-pm.png

5) Click the + button next to default in the Proxy Endpoints section. Select the new path and click the Add button.

6055-screen-shot-2017-12-01-at-34043-pm.png

6) Save the proxy bundle.

6056-screen-shot-2017-12-01-at-34230-pm.png

Thanks @Sai Saran Vaidyanathan!