How to create copy of an API in API Gateway

Hello Community
I would like to know how can you create a “COPY” or exact replica of any existing API (but under a new API name) in API Gateway v10.11?

I know how to create a new version of any existing API in API Gateway but that approach doesn’t create a copy with a different/new API name (and also the new version remains linked to previous version which is not the case I am inquiring about currently)

I know how to export or import an existing API in API Gateway but that approach doesn’t allow you to change API name during import process

What I am exactly interested to know is how to create an exact ‘copy’ of any existing API in API gateway but under a totally different API name (and version).

Example:
Suppose I have an existing API named as “MyFirstAPI” v1.0 in API Gateway and at some point in time, I may decide to create an exact replica of existing MyFirstAPI under a new API name such as “MySecondAPI” v1.0 and I don’t want new replica/copy to be linked with existing MyFirstAPI or any of its version, then how can I do it in API gateway v10.11?

Hi Mubarak,

Try to get the API using /rest/apigateway/apis/ and use the response body as the request body to the POST /rest/apigateway/apis/

You can find the example in the API service management swagger file

Thanks,
Mohammed Rizwan

I don’t have specific steps but you’ll want to proceed with caution. API GW connects elements together using internal IDs. Be sure whatever process you follow that references to other elements in the API copy are what you really want. (This reliance on internal artificial keys is one of the API GW’s biggest weaknesses, IMO.)

Go to API Documentation menu, from there download the API spec/definition file (ex Swagger).
Then create fresh new API by import the downloaded API spec.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.