3
votes

Is there a way by exporting the PRODUCT it gives the full definition of it including the with API's and policies associated with that PRODUCT.

That way i can make only two calls to export the complete product and import the complete product somewhere else.

Is there any other best practices to minimize below number of calls to export and import

  1. Make GET call(s) to REST Management API to export the different API’s from one subscription.
  2. Make GET call(s) to REST Management API to export the policies from API’s. (Unfortunately, Exporting API’s will not export policies associated with it).
  3. Make PUT call(s) to REST Management API to import the different API’s to another subscription.
  4. Make PUT call(s) to REST Management API to set the policies associated to API’s.
  5. Make GET call(s) to REST Management API to export the different Product’s from one subscription.
  6. Make GET call(s) to REST Management API to get the list of API’s associated with PRODUCT.
  7. Make PUT call(s) to REST Management API to create the Product in another subscription.
  8. Make PUT call(s) to REST Management API to add the API’s to Product.
2
What is the "PRODUCT"?Gaurav Mantri
The product is the "group" to which an api can be added, there is a starter and an unlimited product default in api management, each product can have different policiesErik Oppedijk
A product contains one or more APIs. For example Starter and unlimited are the PRODUCTS that come with the initial subscription.Srav

2 Answers

0
votes

Well if you just want to clone your second service with the first one, you can use backup restore https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-disaster-recovery-backup-restore/ What it does essentially is copy all your metadata (Apis/Products/Subscriptions) to another service.

Or

You can create scripts to export your apis using the Azure Powershell commandlets https://msdn.microsoft.com/en-us/library/mt613477.aspx and then add it to the second service using the Import commandlets https://msdn.microsoft.com/en-us/library/mt613484.aspx

0
votes

NO Recommendation or any other way to reduce the above effort at this time.