tencent cloud

All product documents
API Gateway
Defining APIs
Last updated: 2023-12-22 10:04:42
Defining APIs
Last updated: 2023-12-22 10:04:42
Standard RESTful APIs can be defined using the OpenAPI Specification. Generally, OpenAPI documents have 3 required objects:
openapi: version number of the OpenAPI Specification.
info: API metadata.
paths: API request path and operation.
This document describes the mappings between the OpenAPI Specification and the API Gateway by object.

openapi

The API Gateway supports OpenAPI Specification 3.0.0.

info

The following table describes the mappings between OpenAPI and the info object of the API Gateway.
OpenAPI Object
Data Type
OpenAPI Object Description
API Gateway Object
info.title
String
Name of the service to which an API belongs
Not used
info.description
String
Description of the service to which an API belongs
Not used
info.version
String
Version number
Not used

paths

The following table describes the mappings between OpenAPI and the paths object of the API Gateway.
OpenAPI Object
Data Type
OpenAPI Object Description
API Gateway Object
paths.path
Object
API request path
API frontend request path
operation.operationId
String
API name
API name
operation.description
String
API description
Not used
operation.parameters
Object
API request parameter
API request parameter
operation.responses
String
API response
Not used
Note:
For the object definition in OpenAPI Specification 3.0.0, see OpenAPI Specification.
For the process of importing APIs, see Importing APIs.
For complete examples of importing APIs, see Examples of Importing APIs.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

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
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon