-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate portal between 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, we've prepared the scripts/migrate.bat
script. It exports the content of the portal from one API Management service and imports it into another API Management service - for example, exports from a test environment and imports into the production environment.
The subsections below describe how to setup the script, what actions it performs, and what to do after it's executed.
You need to provide the required parameters to run the script: management API endpoints, SAS tokens, and Storage Account connection strings for both source and target API Management services.
If a portal is self-hosted, provide the connection string of the Storage Account specified in the config.design.json
file. If a portal is managed, refer to this article for instructions on retrieving the connection string.
WARNING: consider performing a backup of the target service's content before running the script. The script removes all the content from the target service.
The script performs the following steps:
- Capture the content of the source portal (excl. media)
- Remove all the content of the target portal (incl. media)
- Upload the content of the source portal to the target portal (excl. media)
- Download the media files from the source portal
- Upload the media files to the target portal
After the script is successfully executed, the target API Management service should contain the same portal content as the source service. 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.
If the portal of the target service is managed, you need to publish the portal through its administrative user interface. You can find the instructions in the Azure documentation - Access and customize the managed developer portal in Azure API Management tutorial.
If the portal of the target service is self-hosted, you need to follow the publishing and hosting instructions from the general self-hosted portal tutorial.