tencent cloud

All product documents
API Gateway
DocumentationAPI GatewayGetting StartedStep 3. Create an API with Mock as the Backend Type
Step 3. Create an API with Mock as the Backend Type
Last updated: 2024-01-03 10:03:44
Step 3. Create an API with Mock as the Backend Type
Last updated: 2024-01-03 10:03:44

Overview

This document describes how to create an API connecting to Mock on the backend under a created service in the API Gateway console.
Caution:
If the API connects to Mock in the backend, only fixed data can be returned. Therefore, we recommend you use Mock for testings but not in actual business scenarios.

Prerequisites

Directions

1. In the service list, click a service name to enter the API list page.
2. On the General API tab, select Create and enter the API's frontend configuration information.
API Name: name of an API. exampleapi is entered here as an example.
Frontend Type: HTTP and WebSocket are supported. HTTP is selected here as an example.
Path: access path of the API. / is entered here as an example.
Request Method: request method of the API. GET is selected here as an example.
Authentication Type: authentication type of the API. No authentication is selected here as an example.
CORS Support: whether the API supports cross-origin resource sharing. Yes is selected here as an example.
Remarks: remarks of the API. Test is entered here as an example.
Parameter Configuration: frontend parameters of the API. Nothing is entered here.



3. Click Next and enter the backend configuration information of the API.
Backend Type: type of the backend service of the API. Mock is selected here as an example.
Returned Data: data to be returned by Mock. hello world, hello apigateway is entered here as an example.



4. Click Complete.
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