All Products
Search
Document Center

API Gateway:API Synchronization Across Groups

Last Updated:Mar 05, 2024

The API group synchronization feature helps you quickly synchronize API definitions between API groups. Before you start synchronizing, we recommend that you familiarize yourself with the information to be and not to be synchronized and the preparations that you must complete.

1. Synchronization scope

The following information is synchronized:

  • The configuration of selected APIs in an API group

The following information is not synchronized:

  • API group information that is displayed on the API Groups page, including the public second-level domain name, private domain name, HTTPS security policy, custom domain name, and environment variables

  • The following API information: authorization information, bound plug-ins, version history, monitoring information, security information, and API configurations in Alibaba Cloud Marketplace

  • Authentication information of APIs that use OpenID Connect

  • Model configurations

    • During API configuration comparison, the system checks whether the API definitions are consistent based on the names of the referenced models, rather than based on the definitions of the referenced models.

    • If an API in the source group references a model and this model is not referenced in the destination group, the definition of the model is automatically synchronized to the destination group.

    • If an API in the destination group references a model with the same name as a model that is referenced by an API in the source group, the definition of the model in the source group is not synchronized to the destination group.

  • Environment variables defined in the source group are not synchronized to the destination group.

  • To synchronize information of APIs from an existing group to a new group, you must create the new group first. To create a group, click Create Group on the API Groups page.

Important

To avoid errors, we recommend that you do not modify the definitions of the APIs that are being synchronized.

2. Synchronize an API group

  1. Log on to the API Gateway console. In the left-side navigation pane, choose Manage APIs > API Groups. On the page that appears, click Sync Configurations of API Groups.

  2. In the Prepare for Synchronization step, read the notes, select I have read and agree to the content, and click Next. For more information about the preparation, see section 1 of this topic.

  3. Select the source API group, destination API group, and version of the APIs that you want to synchronize. Currently, the version of the APIs that can be synchronized can be the current version or the latest version deployed in the test environment, the staging environment, or the production environment.

Note

The current version refers to the latest definition of an API in the group, regardless of whether the API is published.

  1. Compare the APIs. The system compares the APIs based on the following metrics:

  • New APIs: APIs that exist in the source group but not in the destination group.

  • APIs with Different VPC Backend Service Information: APIs that differ only in VPC backend configuration.

  • APIs with Different Definitions: APIs that have different definitions. APIs that differ only in VPC backend configuration are not included.

  • Missing APIs: APIs that exist in the destination group but not in the source group. Such APIs are not synchronized.

  • APIs with Same Definitions: APIs that have the same definitions. These APIs are not synchronized.

Note
  • If there are many APIs to be synchronized, select Select All on Each Page to select APIs at a time.

  • The environment variables displayed on the page are for reference only. They will not be synchronized.

  1. Change the VPC name. You can change the VPC name for multiple APIs at a time by selecting a value from the Change Value of Vpc Name for Selected APIs To drop-down list. Then, click Start Sync.

Note

You can select only APIs whose backend service type is VPC.

  1. The system starts to synchronize the APIs. You can view the synchronization result.

3. View the synchronization history

Log on to the API Gateway console. In the left-side navigation pane, choose Manage APIs > API Groups. On the API Groups page, click Sync Records to view the group synchronization history. You can also click View Details in the Actions column to view the details of each migration record.