Function API in Zoho Connect

Function API in Zoho Connect

Feature Availability

Overview

Function API in Zoho Connect helps you link two applications together and automate your workflows. You can also customize how data is exchanged between the applications to suit your needs.

Who can create a Function API?

By default, only network admins can create a Function API in Zoho Connect.

What is an API endpoint?

An API endpoint is a specific URL where one application sends information to another. Think of it as a dedicated address that two applications use to communicate with each other.

How does Function API work
?
Every application has its own way of sending and receiving information. When integrating two applications, their formats may not always be compatible with each other. This is where Function API helps. It lets you transform the information from one application into a format that the other can understand and process.

Handlers in Function API

Function API has two handlers, the Get request handler and the Post request handler. Each handler contains a custom function written in Deluge that defines how an incoming request should be processed. The handler that gets triggered depends on the type of request made to the API endpoint.
  • Get Request Handler

    • Triggered when a GET request is made to the Function API endpoint.
    • Used to retrieve or fetch data without modifying any resources.
  • Post Request Handler

    • Triggered when a POST request is made to the Function API endpoint.
    • Used to send data to the server, typically to create or update resources.

Get request handler

The Get request handler is triggered when a GET request is made to the API endpoint. The following details are passed to the custom function when the handler is triggered.
Name
Data Type
Description
params
map
Query parameters sent in the request.
headers
map
Headers sent in the request.
network
map
Details of the network to which the request is made.
user
map
User details of the Function API owner.

Post request handler

The Post request handler is triggered when a POST request is made to the API endpoint. The following details are passed           to the custom function when the handler is triggered.

Name
Data Type
Description
params
map
Parameters sent in the request.
headers
map
Headers sent in the request.
body
String
Payload data sent in body of the request.
network
map
Details of the Network to which the request is made.
user
map
Details of the configuration owner.
 
You can define the response of the API in the custom function. The table below lists the attributes of the handler response.
 
Name
Data Type
Description
Value
statusCode
HTTP Status code
Status code of the request
Default value: 200 OK
response
String
Response of the API
empty

Notes
If the custom function response does not include the above attributes, the default values are applied.

If you have any questions regarding Function API in Zoho Connect, please write to our support team at
support@zohoconnect.com. We're always happy to help!