Get all departments - Zoho Webinar
Table of Contents
Note: This task is applicable to all services except Zoho Creator.
Overview:
This task is used to get all departments available in an organization in Zoho Webinar.
This task is based on Zoho Webinar API: Get all departments
Syntax:
<variable> = zoho.webinar.getAllDepartments(<portal_id>, <index>, <count>, <connection>);
where:
| Params | Data type | Description |
| <variable> | KEY-VALUE | Specifies the variable that will hold the response returned by Zoho Webinar. |
| <portal_Id> | NUMBER | Specifies the unique portal identifier where the departments will be fetched from. Note: Portal_Id can be fetched in the following ways.
|
| <index> | INTEGER | Specifies the pagination start index. Default: 1. |
| <count> | INTEGER | Specifies the number of departments to fetch. |
| <connection> | TEXT | Specifies the link name of the Zoho Webinar connection. Required scope for this connection: ZohoWebinar.department.READ |
Example:
The following script fetches all the departments available in an organization in Zoho Webinar.
response = zoho.webinar.getAllDepartments(86367739,1,20, "webinar");
where:
responseIs the KEY-VALUE returned by Zoho Webinar. It represents the department details.
"86367739"Is the NUMBER of the unique portal identifier where the list of departments will be fetched from.
"1"Is the INTEGER of the pagination start index. Default: 1.
"20"Is the INTEGER of number of departments to fetch.
"webinar"Is the TEXT that represents the name of the connection.
Sample response
Success response
{
"representation": [
{
"departmentId": "645551000000025019",
"departmentName": "My Department",
"source": "MEETING",
"status": 1,
"createdTime": "1742208058807",
"modifiedTime": "1742208058807"
}
],
"resourceType": "/api/v2/86367739/department"
}
"representation": [
{
"departmentId": "645551000000025019",
"departmentName": "My Department",
"source": "MEETING",
"status": 1,
"createdTime": "1742208058807",
"modifiedTime": "1742208058807"
}
],
"resourceType": "/api/v2/86367739/department"
}
Failure response
{
"error": {
"code": 1025,
"message": "Org doesn't matches with request uri"
},
"resourceType": "/api/v2/8636779/department"
}
"error": {
"code": 1025,
"message": "Org doesn't matches with request uri"
},
"resourceType": "/api/v2/8636779/department"
}