Help Center/ API Gateway/ User Guide/ API Policies/ Managing Environments
Updated on 2024-03-07 GMT+08:00

Managing Environments

An API can be called in different environments, such as production, testing, and development environments. RELEASE is the default environment provided by APIG.

Creating an Environment

  1. Go to the APIG console.
  2. Select a dedicated gateway at the top of the navigation pane.
  1. In the navigation pane, choose API Management > API Policies.
  2. Click the Environments tab.
  1. Click Create Environment and set the environment information.

    Table 1 Environment information

    Parameter

    Description

    Name

    Environment name.

    Description

    Description of the environment.

  2. Click OK.

    After the environment is created, it is displayed in the environment list.

Accessing an Environment

You can call an API in the RELEASE environment by using a RESTful API. To access the API in other environments, add the X-Stage header to the request to specify an environment name. For example, add X-Stage:DEVELOP to the request header to access an API in the DEVELOP environment.

APIG does not support API debugging with environment variables.

Follow-Up Operations

After creating an environment, publish APIs in the environment so that they can be called by API callers.