All Products
Search
Document Center

API Gateway:Generate SDKs and documentation

Last Updated:May 15, 2025

After you develop an API, you can generate an SDK and a usage guide document in the console with a few clicks. This simplifies the use and integration of the API as you do not need to write any additional code to call the API.

Prerequisites

An API is created and an operation is added to it. For more information, see Create a REST API and add an operation to it.

Procedure

  1. Log on to the Cloud-native API Gateway console.

  2. Make the system generate SDKs and documentation for APIs within instances and outside instances.

    In the left-side navigation pane, click API. In the top navigation bar, select a region.

    APIs within instances

    1. In the left-side navigation pane, click Instance. In the top navigation bar, select a region.

    2. On the Instance page, click the instance that you want to manage.

    3. In the left-side navigation tree, click API. Then, click the REST API that you want to manage.

    APIs outside instances

    1. In the left-side navigation pane, click API. In the top navigation bar, select a region.

    2. Click the REST API that you want to manage.

  3. On the page that appears, choose More > Generate SDK & Documentation in the upper-right corner.

    0778

  4. In the Generate SDK & Documentation dialog box, configure the parameters and click Generate and Download.

    Parameter

    Description

    API Version

    Select the version of the API for which you want to generate the SDK and documentation.

    Note
    • This option is unavailable for APIs created within instances because versioning is not provided for these APIs.

    • This option is available for APIs created outside instances if versioning is enabled for the APIs during API creation. If versioning is not enabled for the APIs, this option is still unavailable for the APIs.

    Language

    Select the language in which you want to generate the SDK. Valid values: Java, Golang, Python, Node.js, TypeScript, and Swift.

  5. Wait until the SDK and documentation are generated and automatically downloaded. They are automatically downloaded as a compressed package to your local computer. Then, go to the download path of the browser to view the package.

    Note

    After you decompress the package, you can find the README.md file in the package. This file provides instructions on the use of the SDK.