Code

Overview of functions API methods

Execute Function

POST https://api.codemash.io/:version/serverless/functions/:id/execute

Executes a function during a request.

Path Parameters

NameTypeDescription

version

string

The version of the API endpoint. Current latest v1.

id

string

The ID of function to be executed.

Headers

NameTypeDescription

Authorization

string

Your project's secret key.

x-cm-projectid

string

Your project's ID. Can be passed as a query parameter.

Request Body

NameTypeDescription

Template

string

Parameter of JSON format to pass into the function.

Qualifier

string

Version or alias of a function to execute.

{
    Result: ""
}
var client = new CodeMashClient(apiKey, projectId);
var codeService = new CodeMashCodeService(client);

var response = await codeService.ExecuteFunctionAsync(new ExecuteFunctionRequest
{
    Id = Guid.Parse("{FUNCTION_ID}"),
});

In order to execute the function method, you can use GET method instead of POST.

Last updated