The Telerik Platform product is retired.Learn more

Executing Cloud Functions Programmatically

Executing Cloud Functions Programmatically

First introduced in Backend Services JavaScript SDK version 1.6.11.
With previous SDK versions, use a RESTful call.

You can execute a Cloud Function from your code using the invokeCloudFunction SDK method. It transparently makes the necessary HTTP request to the Cloud Function's specific endpoint.

The following example illustrates how to call a Cloud Function with query string parameters. It takes two arguments: cloudFunctionName is the function name and params is an object that contains the query string parameters, but can also contain other specifics such as HTTP method, headers, and so on.

var cloudFunctionName = "ConvertCurrency";

var params = {};
params.queryStringParams = {};
params.queryStringParams.from = "USD"; = "EUR";
params.queryStringParams.amount = 153;

everliveApp.businessLogic.invokeCloudFunction(cloudFunctionName, params).then(function (data) {
}, function (err) {

See Also

Contact us: +1-888-365-2779
Copyright © 2016-2018, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.