tencent cloud


Importing APIs

Last updated: 2020-09-04 15:42:44


    This document describes how to create APIs by importing OpenAPI definitions in the API Gateway console.


    • You have created a service.
    • An API description file compliant with the OpenAPI Specification 3.0.0 is available, and the text format is YAML or JSON.


    1. Log in to the API Gateway console and click Service in the left sidebar.
    2. In the service list, click the name of the target service to view it.
    3. On the service information page, click the Manage API tab to view the API list of the service.
    4. Click Import API at the top of the API list to access the API importing page.
    5. Select a text format (YAML or JSON). Click Upload File and select an API description file to upload, or directly enter the API description information in the code editor.
    6. Click Save. The API Gateway then creates APIs based on your input and returns a list of successfully created APIs.


    • Only APIs whose backend is Mock can be imported currently. You can modify the backend configurations of the APIs after importing them successfully.
    • An API description file to be imported must comply with the OpenAPI Specification 3.0.0 and be in the YAML or JSON format.
    • A maximum of 10 APIs can be imported at a time.
    • When you upload an API description file, ensure that the file name extension is .yaml or .json and that the file size is less than or equal to 100 KB. After being uploaded successfully, the API description file will replace the content in the code editor.
    • Successfully created APIs cannot be published automatically. Instead, you must manually publish them so that they can take effect.


    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support