tencent cloud

All product documents
Serverless Cloud Function
Step 3. Publish API Service and Verify Online
Last updated: 2024-12-02 16:35:34
Step 3. Publish API Service and Verify Online
Last updated: 2024-12-02 16:35:34
If you have completed Step 2. Create and Test API Service, and the test results are as expected, you can then publish this service and initiate a request from a browser to verify whether the API works properly.

API Service Release

1. Log in to the API Gateway console and select Service on the left sidebar.
2. On the Service page, select Publish on the right side of the blogAPI service created in step 2.
3. In the Publish service pop-up window, select Release as the publishing environment, enter Publish API in the remarks, and click Submit.

Online API Verification

The API service is published through the publishing action, so that the API can be accessed externally. Then, you can initiate a request in a browser to check whether the API can respond correctly.
1. In the blogAPI service, click the API name to enter the API information page and copy the default access path of the Release environment, such as service-kzeed206-1251762227.ap-guangzhou.apigateway.myqcloud.com/release.
Note:
As the domain name varies by service, the domain name assigned to your service may be different from the one in this document. Please do not directly copy the address here for access.
2. Add the path of the created API rule after this path to form the following paths:
service-kzeed206-1251762227.ap-guangzhou.apigateway.myqcloud.com/release/article
service-kzeed206-1251762227.ap-guangzhou.apigateway.myqcloud.com/release/article/1
service-kzeed206-1251762227.ap-guangzhou.apigateway.myqcloud.com/release/article/2
3. Copy the paths in step 2 to a browser for access and make sure that the output is the same as that during API test.
4. You can further modify the article number in the request and view the output to check whether the code can correctly handle an incorrect article number.
So far, you have completed the process for implementing a service through SCF and providing it through API. Subsequently, you can modify the code and add features and API rules to form a richer-featured application module.
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