All Products
Search
Document Center

API Gateway:Synchronize an API group

Last Updated:Dec 14, 2022

This 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. Learn the information to be and not to be synchronized

The following information is synchronized:

  • The configuration of selected APIs in the API group

The following information is not synchronized:

  • API group information that is displayed on the API Groups page, including the Internet Subdomain, VPC Intranet Subdomain, HTTPS Security Policy, Custom Domain Name settings, and environment variables

  • API information that is displayed on the Authorization, Plugin tied, Deployment History, Monitoring Info, Security Info, and Marketplace APIs pages

  • Authorization information of APIs that use OpenID Connect

  • Configuration of models

    • 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 OpenAPI > API Groups. On the API Groups page, click Sync Configurations of API Groups.

  2. Prepare for the synchronization. Read the precautions and select I have read and agree to the content. Then click Next. The precautions are also listed in section 1 of this topic.

Prepare for synchronization
  1. 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 or not.

Select API groups
  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.

    Compare the APIs
  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.

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

Synchronization result

3. View the synchronization history

Log on to the API Gateway console. In the left-side navigation pane, choose OpenAPI > API Groups. On the API Groups page, click Sync Records to view the synchronization history of API groups. You can click View Details in the Actions column to view the synchronization details of a synchronization task.

Group synchronization records