Get all departments - Zoho Webinar

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:

ParamsData typeDescription
<variable>KEY-VALUESpecifies 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.

  • From the URL of the application while accessing it. The URL is in the format webinar.zoho.com/webinar/portal_Id/department_Id/home
  • Get portal ID from Zoho Webinar API, where ZSOID represents the portal ID.
<index>INTEGERSpecifies the pagination start index. Default: 1.
<count>INTEGERSpecifies 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:

response
Is 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"
 }
 

Failure response

 {
  "error": {
    "code": 1025,
    "message": "Org doesn't matches with request uri"
  },
  "resourceType": "/api/v2/8636779/department"
 }