All Products
Search
Document Center

API Gateway:API management

Last Updated:May 20, 2025

This topic describes how to manage APIs through the console, including key steps such as specifying backend services for APIs, adding policies, and configuring consumer authentication.

Specify a backend service for an API

Important
  • For APIs created outside an instance, the added interfaces inherit the configuration of their associated backend services by default, but you cannot edit the backend services.

  • For APIs created within an instance, the added interfaces inherit the configuration of their associated backend services by default, and you can also configure settings separately for each interface.

  1. Log on to the Cloud-native API Gateway console. In the left navigation bar, select Instances, and select a region in the top menu bar.

  2. On the Instances page, click the ID of the target gateway instance. In the left navigation bar, select APIs, and click the target API.

  3. On the API Details tab of the target interface, click Edit next to Backend Service.

  4. In the Backend Service section, configure the relevant parameters and click OK.

    Parameter

    Description

    Configuration Mode

    The default Configuration Mode is Inherit From API.

    • Configure Separately For Interface: The interface is associated with a backend service separately, which takes precedence over the API-level configuration.

    • Inherit From API: Inherits from the backend service associated with the API.

    Scenario

    Select the scenario for the current interface.

    • Basic scenarios: Single Service, Mock.

    • Grayscale scenarios: By Proportion (Multiple Services), By Content (Multiple Services), Tag-based Routing (By Proportion).

    Note

    The sum of the traffic percentages of the destination services must be 100%.

    Backend Service

    Associate a backend service under this gateway/VPC. If there are no backend services under this gateway, you can click Create Service to create one.

    Important

    When creating a new service, the service port information may not appear immediately. You need to expand the Service Name dropdown list and click Refresh. Because port information synchronization is performed asynchronously, you may need to wait a moment for the complete service port information to load and display.

Debug an API

Prerequisites

You have published the API.

Procedure

  1. Cloud-native API Gateway provides two ways to debug APIs: outside an instance and within an instance:

    APIs outside an instance

    1. Log on to the Cloud-native API Gateway console. In the left navigation bar, select APIs, and select a region in the top menu bar.

    2. Click the target API.

    APIs within an instance

    1. Log on to the Cloud-native API Gateway console. In the left navigation bar, select Instances, and select a region in the top menu bar.

    2. On the Instances page, click the ID of the target gateway instance. In the left navigation bar, select APIs, and click the target API.

  2. On the API List tab, select the API that you want to debug, and click Debug.

  3. In the Debug API panel, configure the relevant parameters, and then click Send Request to debug.

Edit an API

Cloud-native API Gateway provides two ways to edit APIs: outside an instance and within an instance:

APIs outside an instance

  1. Log on to the Cloud-native API Gateway console. In the left navigation bar, select APIs, and select a region in the top menu bar.

  2. Click the target API. On the API List tab, select the API that you want to edit, and click Edit.

  3. In the Edit API panel, you can modify the Basic Information, Request Definition, Response Definition, Mock, and Consumer Authentication of the API.

APIs within an instance

  1. Log on to the Cloud-native API Gateway console. In the left navigation bar, select Instances, and select a region in the top menu bar.

  2. On the Instances page, click the ID of the target gateway instance. In the left navigation bar, select APIs, and click the target API.

  3. On the API List tab, select the API that you want to edit, and click Edit.

  4. In the Edit API panel, you can modify the Basic Information, Request Definition, Response Definition, and Consumer Authentication of the API.

Stress test

Prerequisites

You have published the API.

Procedure

  1. Cloud-native API Gateway provides two ways to perform stress tests: outside an instance and within an instance:

    APIs outside an instance

    1. Log on to the Cloud-native API Gateway console. In the left navigation bar, select APIs, and select a region in the top menu bar.

    2. Click the target API.

    APIs within an instance

    1. Log on to the Cloud-native API Gateway console. In the left navigation bar, select Instances, and select a region in the top menu bar.

    2. On the Instances page, click the ID of the target gateway instance. In the left navigation bar, select APIs, and click the target API.

  2. On the API List tab, select the API that you want to stress test, and click More > Stress Test. For detailed operations, see PTS Quick Start.

Delete an API

Important

The delete operation is irreversible. Exercise caution when performing this operation.

  1. Cloud-native API Gateway provides two ways to delete APIs: outside an instance and within an instance:

    APIs outside an instance

    1. Log on to the Cloud-native API Gateway console. In the left navigation bar, select APIs, and select a region in the top menu bar.

    2. Click the target API.

    APIs within an instance

    1. Log on to the Cloud-native API Gateway console. In the left navigation bar, select Instances, and select a region in the top menu bar.

    2. On the Instances page, click the ID of the target gateway instance. In the left navigation bar, select APIs, and click the target API.

  2. On the API List tab, select the API that you want to delete, and click More > Delete, and then click OK in the confirmation dialog box.