Migrating managed Developer portal between APIM services

The developer portal supports programmatic access to content. It allows you to extract the data from or upload it to your API Management service through the content management REST API

To simplify automation of this process, a script has been prepared for that purpose which is available here scripts.v2/migrate.js.

It exports the content of the developer portal from one API Management service and imports it into the developer portal of another API Management service - for example, exports from a test environment and imports into the production environment.

Let’s get started!

Link referenced

In order to initiate the migration process, you need to:

2. `npm install` in the root of the project.

3. Change directory (cd) into the scripts folder.

3. Then run the script with a valid combination of arguments

Managed portal command example:

Managed portal command

Pre — Execution

You need to provide the required parameters to run the script: source management API endpoints, destination management API endpoints, destination developer portal URL, source SAS token, destination SAS token.

Source Management API endpoint & Source SAS Token
Destination Management API endpoint & Destination SAS Token
Destination Developer Portal URL

Input all the required parameters in the managed portal command on a note pad.


The script performs the following steps:

Clone the repository which contains the source code of the developer portal locally.

From your command prompt, now cd into the cloned folder

run npm install

NPM Install

Once all the dependencies have been installed.

Then run the managed portal command with a valid combination of arguments as seen below

With that, be rest assured all contents (including media) have been migrated to the destination portal.

Post — Execution

After the script is successfully executed, the destination developer portal should contain the same content as the source developer portal.

Source Developer Portal

Although you’ll be able to see it as an administrator, the script doesn’t publish the portal of the target service to external visitors.

You need to publish the portal through its administrative user interface bounded in red box. You can find instructions to do so here.

Destination Developer Portal only visible as administrator

Now Click on Operations > Publish Website

Voila! The published target APIM service developer portal publicly available to external visitors.

Target APIM Service Developer Portal Publicly available to external visitors.


We have been able to successfully export the content of the developer portal from one API Management service and imports it into another API Management service with this guide.

Feel free to let me know if this guide was helpful. I am available on Twitter.



Enterprise Cloud Solutions / Dev Ops Enthusiast.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store