All Products
Search
Document Center

Version management

Last Updated: Dec 09, 2020

1. Modify an API

You can view and modify the information of an API as required.

Procedure

1. Log on to the API Gateway console.

2. In the left-side navigation pane, choose Publish APIs > APIs.

3. On the API List page, find the API that you want to view and choose More > Manage in the Operation column. You can view the information of the API. Click Edit in the upper-right corner to edit the information of the API as required.

The modification process of an API is similar to the creation process of an API. For more information, see Create an API.

API definitionAfter you modify the information of an API, you must publish the API to the Test, Pre, or Release environment before it can be called.

Note

If you modify the definition of an API that is published, the modifications are not immediately applied. You must republish the modified API to synchronize the changes to the Release environment.

2. Compare API configurations

After an API is modified, you can compare the API configurations before and after the modification to check whether the modification scope is correct.

Procedure

1. After you modify an API, click Save. In the dialog box that appears, click Deploy.

2. In the Deploy API dialog box, specify Select The Stage To Release To and click Contrast difference to compare the API configurations. You can publish the API after you confirm that the modification scope is correct.

Compare API configurationsDifferences

3. Query release history and switch versions

API Gateway records each release of an API. The release history includes the release version, environment, date, and release remarks. You can view the release records on the Deployment History page.

3.1 Query the release history

1. Log on to the API Gateway console. In the left-side navigation pane, choose Publish APIs > APIs. On the API List page, find and click the API whose release history you want to query.

2. In the left-side navigation pane, click Deployment History. On the Deployment History page, find the version that you want to view and click View in the Operation column.

API release history

3.2 Switch release versions

When you view the version history of an API, you can select a different version for the API. The selected version then replaces the previous version and takes effect in the specified environment.

  1. Find the required version and click Switch to this version in the Operation column.

  2. In the API Version Switch dialog box, enter the description and click Switch.

Switch the API version