0
votes

In the Azure APIM, when I need to update the content part of the developer portal, I need to go on the Publication Portal and the in Developer Portal/Content and then create/edit/upload content via the UI.

Is it possible to manage the content in a programmatic way (via git, or the REST API) ? If not, it makes it impossible to have any kind of automation in deploying new APIs with their documentation (and other developer portal content not managed by the templates)

A related question is Is it possible to automate customization of the "Developer Portal" in Azure API Management?. However the answer given to the other question ("You best bet is git integration, but that might not be quite convenient.") is not working for me as I do not get in the git the content part of the dev portal, only the gateway configuration and the templates

enter image description here

3

3 Answers

1
votes

In Azure didn't have a straight forward solution to automate the developer portal Content.

  1. there is no API available update for any of the portal artifacts.
  2. Git configuration is the only option but it doesn’t cover artifacts which created via CMS UI, the static content like such as welcome page, etc.

FYI, And the Git base solution requires that the instance becomes read-only (or locked to a single-user) during operation.

Please vote this wish in APIM

0
votes

You can use the migrate.js script in the Developer Portal source code in the official Azure GitHub Repo.

You will need to take the migrate, capture, cleanup, and generate scripts... put it in a new Node project with its own package.json with the following dependencies:

  • azure-storage
  • child_process
  • crypto
  • fs
  • https
  • moment
  • yargs

Create package.json

npm init

Add dependency to package.json

npm install <dependency> --save

Gather the information from the source and destination, also make sure to enable the REST API enter image description here

Then you can run the script

npm install
node migrate --sourceEndpoint <sourceName>.management.azure-api.net --sourceId <sourceCredentialsIdentifier> --sourceKey <sourceCredentialsPrimaryKey> --destEndpoint <destName>.management.azure-api.net --destId <destCredentialsIdentifier> --destKey <sdestCredentialsPrimaryKey> --publishEndpoint <destName>.developer.azure-api.net

The above allows you to not have to worry about generating a token. If you read the migrate.js file, there is documentation at the top, you will see their example as:

node migrate --sourceEndpoint from.management.azure-api.net --destEndpoint to.management.azure-api.net --publishEndpoint to.developer.azure-api.net --sourceToken "SharedAccessSignature integration&2020..." --destToken "SharedAccessSignature integration&2020..."
-1
votes

enter image description here

you can view these links. Azure API management Launch new git code management. Yes, you can show the Iframe on the developer portal and that Iframe can be deployed on the azure and that page you can write your logic.

I did it one of the portals but there is only one problem the design problem and also the authentication problem you have to authenticate service every time you open the IFrame.

https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/api-management/api-management-faq.md

https://www.codit.eu/blog/2016/03/10/git-integration-with-azure-api-management/

https://docs.microsoft.com/en-us/azure/api-management/api-management-configuration-repository-git