Is there alternative way to copy the Azure APIM APIs Policies into the Azure DevOps Wiki Pages?

krishna572 886 Reputation points
2023-06-20T03:15:41.9466667+00:00

[enter image description here

](https://i.stack.imgur.com/ZngzE.png)

I have 4 APIM Instances where each instance has around 50 APIs and each API has approximately 20 to 25 API Operations. Each operation has different policies defined in it.

For configuring the same policies in new Environment Setups and informative purpose, I need to copy all the policies in operational level to the Azure DevOps wiki Pages.

As of now, I am doing the below following way/approach:

  1. Copy the Policy code of each operation to the text file and Save with the Operation Name.
  2. Upload that file to Wiki Pages in the below format:

[enter image description here

](https://i.stack.imgur.com/jVVmf.png)

I tried to export API into YAML or JSON format but it is showing the data of API without policies.

Do we have option to export each API Polices? So that I can reduce the Step 1 in above process of Copying policies to Azure DevOps Wiki Pages?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,453 questions
{count} votes

2 answers

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 22,441 Reputation points Moderator
    2023-06-20T15:02:15.63+00:00

    hasher0 Thanks for posting your question in Microsoft Q&A. Based on your description, you are looking to extract APIs along with operation policies to DevOps wiki pages.

    You can use Extractor tool in azure-api-management-devops-resource-kit repo to extract all or some APIs, and also operation polices to ARM templates. The argument policyXMLBaseUrl generates policies folders with xml files which is pushed to remote location and refer Extractor Parameter File Example for different scenarios. Or you can simply check API templates generated which contains policies and refer https://techcommunity.microsoft.com/t5/azure-paas-blog/working-with-api-management-devops-resource-kit/ba-p/3621532 for the detailed guide as well as common questions and answers.

    I hope this helps with your questions and let me know if any other or face issues.


    If you found the answer to your question helpful, please take a moment to mark it as "Yes" for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions.

    1 person found this answer helpful.
    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.