Updated on 2023-05-17 GMT+08:00

Modifying API Configurations

Overview

The environment information, control policy information, secret information, blacklist and whitelist for API authorization, and APIs that are not published in the RELEASE environment are not asset data. You need to reconfigure this information after importing integration assets.

  • Environment information includes the independent domain names, environment variables, cloud server information of load balance channels, and non-default environments.
  • Control policy information includes request throttling policies, access control policies, client access control policies, and client quota policies.
  • Secret information includes clients' AppCodes and custom backends' configurations of the password or certificate type.

Prerequisites

You have imported integration assets. For details, see Importing Integration Assets.

Configuring Environment Information

  1. Bind an independent domain name.
    1. On the instance console, choose API Connect > API Groups. Click the name of an API group to view details.
    2. Choose Group Information and click Bind Independent Domain Name in the Independent Domain Names area to bind an independent domain name to the API group.

      For details about the parameters, see Binding Domain Names.

    3. Click OK.
  2. Create an environment.
    1. On the instance console, choose API Connect > API Policies, and click the Environments tab.
    2. Click Create and create an environment for publishing APIs.
    3. Click OK.
  3. Add environment variables.
    1. On the instance console, choose API Connect > API Groups. Click the name of an API group to view details.
    2. Click the Group Information tab in the upper left corner. In the Environment Variables area, select the environment to which you want to add variables, and click Add Environment Variable.

      For details about the parameters, see Creating an Environment Variable.

    3. Click OK.
  4. Modify a load balance channel server.
    1. On the instance console, choose API Connect > API Policies, and click the Load Balance Channels tab.
    2. Click Modify on the right of a load balance channel.
    3. Modify the server configuration.
      • For channels whose mode is set to Select cloud servers, click Add Cloud Server to add servers.
      • For channels whose mode is set to Specify IP addresses, modify the backend service addresses as required.

      For details about the parameters, see (Optional) Creating a Load Balance Channel.

    4. After the configuration is complete, click Finish.

Configuring Control Policy Information

  1. Configure a request throttling policy.
    1. On the instance console, choose API Connect > API Policies, and click the Policies tab.
    2. Click Create Policy. On the Select Policy Type page, select Request Throttling in the Traditional Policies area.

      For details about the parameters, see Creating a Request Throttling Policy.

    3. Click OK.
    4. Bind the request throttling policy to the API, application, or tenant by following the procedure described in Configuring API Request Throttling.
  2. Configure an access control policy.
    1. On the instance console, choose API Connect > API Policies, and click the Policies tab.
    2. Click Create Policy. On the Select Policy Type page, select Access Control in the Traditional Policies area.

      For details about the parameters, see Creating an Access Control Policy.

    3. Click OK.
    4. Bind an access control policy to the API by following the procedure described in Configuring API Access Control.
  3. Configure a credential access control policy.
    1. On the instance console, choose API Connect > Credentials, and click the Credentials tab.
    2. Click Set Access Control on the right of a credential.

      For details about the parameters, see Configuring API Credential Access Control.

    3. Click OK.
  4. Configure a credential quota policy.
    1. On the instance console, choose API Connect > Credentials, and click the Credential Quota Policies tab.
    2. Click Create Credential Quota Policy.

      For details about the parameters, see Creating a Credential Quota Policy.

    3. Click OK.
    4. Bind the quota policy to a credential by following the procedure described in Configuring API Credential Quotas.

Configuring Secret Information

  1. Add a credential for simple authentication.
    1. On the instance console, choose API Connect > Credentials, and click the Credentials tab.
    2. Click the name of a credential.
    3. In the AppCode area, click Add AppCode to add an AppCode for the credential.
    4. Click OK.
  2. Add the configurations of the password or certificate type for custom backends.
    1. On the instance console, choose API Connect > Custom Backends, and click the Configurations tab.
    2. Click Modify on the right of a configuration item.
      • For configuration of the password type, change the password.
      • For configuration of the certificate type, modify the certificate content and private key.
    3. Click OK.

Modifying Blacklist and Whitelist Configurations of API Authorization

Only APIs that are accessed using App authentication support authorization configuration.

  1. On the instance console, choose API Connect > APIs. Choose More > Authorize Credentials of an API.
  2. On the page displayed, click Enable Green Channel > Modify on the right of an authorized credential to modify the blacklist and whitelist.
  3. Click OK.

Creating an API and Publishing It in a Non-RELEASE Environment

  1. On the instance console, choose API Connect > APIs and click Create API.

    For details about the parameters, see Creating an API.

  2. Publish the API to an environment other than RELEASE by following the procedure described in Publishing an API.