Cloud to develop new capabilities to support HTTP API calls

Come to work today to open the computer, always felt a micro-channel development of the document where a bit different, original research for a long time is the addition of a god-level cloud development function --HTTP API!

What HTTP API that? In simple terms is through cloud development HTTP API, may not be required by micro-channel console applet or cloud development, it will be able to manage cloud development capabilities.

A skill

Fancy trigger cloud function

Prior to this, only through the micro-channel function cloud applet, the timing trigger or trigger functions other cloud. With HTTP API, you can always trigger function in a cloud outside the small micro-channel programming environment it! However, it should be noted that: HTTP API way to trigger cloud function does not contain user information.

Request address

POST https://api.weixin.qq.com/tcb/invokecloudfunction?access_token=ACCESS_TOKEN&env=ENV&name=FUNCTION_NAME

Request parameter

Tips

1. This API function is triggered clouds could not get OpenID and other user-related information in the cloud function, you can not use other API involves a user logs state. 2. Note POST BODY portion is passed as an input parameter to the function of the cloud. 3. HTTP API function triggered by a cloud of clouds can be used to call. 4. The timeout is triggered by the HTTP API functions to the cloud 5s, please note that the execution time cloud function can not be too long.

Skills II

Database import and export

Recently, many small partners ask us why data can only be exported manually cloud developer console? Too much trouble it! This does not, in the development of the tireless efforts of his brother, import and export data to support it by API!

Database import

Request address

POST https://api.weixin.qq.com/tcb/databasemigrateimport?access_token=ACCESS_TOKEN

Request parameter

Database Export

Request address

POST https
:
//api.weixin.qq.com/tcb/databasemigrateexport?access_token=ACCESS_TOKEN

Request parameter

Three skills

Cloud storage file management can now quickly and easily implement file upload / download and management functions in a small front-end program, but also can "cloud development" within the management console in developer tools.

Get file upload link

Request address

POST https://api.weixin.qq.com/tcb/uploadfile?access_token=ACCESS_TOKEN

Request parameter

Get file download link

Request address

POST https://api.weixin.qq.com/tcb/batchdownloadfile?access_token=ACCESS_TOKEN

Request parameter

Delete Files

Request address

POST https://api.weixin.qq.com/tcb/batchdeletefile?access_token=ACCESS_TOKEN 

To learn more, click on the " https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-http-api/" review "applet · Cloud Development Documentation "

如果你有关于使用云开发CloudBase相关的技术故事/技术实战经验想要跟大家分享,欢迎留言联系我们哦~比心!

Guess you like

Origin www.cnblogs.com/CloudBase/p/11206130.html