Get Workspaces from Zoho Bookings
Table of Contents
Note:
- Each time the zoho.bookings.getWorkspaces integration task is executed, it triggers an API request in the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
- Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if zoho.bookings.getWorkspaces integration task is placed inside a for each task that iterates five times, the number of external calls consumed will be five, even though the task appears only once in the script.
Overview
This task is used to fetch all the workspaces from your Zoho Bookings account.
This integration task is based on the Zoho Bookings API - Fetch Workspaces.
Syntax
<response> = zoho.bookings.getWorkspaces(<connection>);
| Params | Data type | Description |
| <response> | KEY-VALUE | The variable which will hold the returned response. |
| <connection> | TEXT | The name of the connection. Note:
|
Example
The following script fetches all your workspaces:
response =zoho.bookings.getWorkspaces("bookings_oauth_connection");
where:
response
The variable which returns the returned response in KEY-VALUE format.
"bookings_oauth_connection"
The TEXT name of the connection.
Response Format
Success Response
The success response returned will be returned in the following format:
{
"response": {
"returnvalue": {
"data": [
{
"name": "Soft skills",
"id": "3883XXXXXXXXXXX6010"
},
{
"name": "Computer courses",
"id": "3883XXXXXXXXXXX6106"
}
]
},
"status": "success"
}
}
To get the IDs of the workspaces, use the following script:
for each var in <response_variable> { list_var = var.get("returnvalue").get("data"); for each var1 in list_var { info var1 .get("id"); } }