Updated on 2022-09-26 GMT+08:00

Exporting APIs

Scenario

You can export APIs one by one or in batches as JSON or YAML files.

Prerequisites

You have created an API group and API.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and choose API Gateway.
  3. In the navigation pane, choose Dedicated Gateways. Then click Access Console in the upper right corner of a dedicated gateway.
  4. Click Export API.
  5. Set the parameters listed in Table 1.

    Table 1 Parameters for exporting APIs

    Parameter

    Description

    API Group

    Select the API group from which APIs will be exported.

    Environment

    Select the environment where the APIs to be exported have been published.

    APIs

    By default, all APIs in the API group that have been published in the selected environment are exported. To export only specific APIs, click Select API, and specify the APIs you want to export.

    API Definition

    • Basic: The basic definition of an API is composed of the request and response definitions. It does not include the backend definition. The request definition includes both standard and extended Swagger fields.
    • Full: The full definition of an API is composed of the request, backend, and response definitions.
    • Extended: The extended definition of an API is composed of the request, backend, and response definitions as well as the request throttling policy, access control policy, and other configurations of the API.

    Format

    Export APIs in JSON or YAML format.

    Version

    Set the version of the APIs to be exported. If you do not specify a version, the version will be set as the current date and time.

  6. Click Export.

    The export result is displayed on the right.