Loading...

Functions

Catalyst Functions enable you to build custom functionalities in your application, and seamlessly integrate it with other Catalyst components to provide a powerful backend for it. You can automate tasks, perform memory-intensive computations, or integrate with third-party services using functions.

Catalyst offers support to develop server-side functions in Java, Node.js and Python programming environments.

Note: You can create six types of functions in Catalyst: Basic I/O, Advanced I/O, Cron, Event, Integration, and Browser Logic functions. However, you can only execute Basic I/O functions using this API.

Execute a Function

Description

This API enables you to execute a Basic I/O function by referring to its unique function ID. Basic I/O functions are used to perform basic input and output operations, computations, and simple HTTP operations.

Input parameters can be passed to the function in the API request either as a query string or in the request body. A query string is preferred over the request body to pass the function parameters in. The response will contain the function output.

Note: The function must already be available in the remote console. You can create a function in the console directly, or create it in your local system and deploy it to the console.

Request Details

Request URL

MULTIPLE

{api-domain}/baas/v1/project/{project_id}/function/{function_id}/execute

copy

api-domain
URL
The DC-specific domain to access Catalyst API

project_id
Numerical
The unique ID of the project

function_id
Numerical
The unique ID of the function

Request Methods

GET
POST
PUT
DELETE

Request Headers

Authorization: Zoho-oauthtoken {oauth_token}

Optional Headers

CATALYST-ORG: {org_id}

Environment: Development

Scope

ZohoCatalyst.functions.EXECUTE

Note: This operation can also be executed with Catalyst user authentication permissions using Catalyst SDKs. Refer to the Catalyst API Prerequisites section for details.

Response Details

The response contains the output of the processed function. A Basic I/O function returns response in the JSON format. The key output contains the output generated by the function you execute.

Sample Request
copy

curl -X POST
https://api.catalyst.zoho.com/baas/v1/project/4000000006007/function/4000000045004/execute?name=Raymond%20McGregor
-H “Authorization: Zoho-oauthtoken 1000.910*************************16.2f*************************57”

Sample Response
copy
{
"output": "Hello Raymond McGregor"
}