Fetch groups
Table of Contents
Overview
This task is used to fetch all the groups under a specified network.
Syntax
<variable> = zoho.connect.myGroups(<scopeID>, <connectionName>);
where,
Params | Description | Data type |
<variable> | is the variable which will hold the returned response. The response contains the group names and their respective Partition IDs. | KEY-VALUE |
<scopeID> | is the variable which represents the Scope ID of the network. You can also fetch the scope ID from the response of myNetworks task. | NUMBER |
<connectionName> (optional)* | is the name of the Zoho connect connection. *Note: This param is not applicable to Zoho Creator and mandatory in Zoho Cliq. | TEXT |
Example
Imagine that the user wants to know all the groups under a network represented by the Scope ID - 105000017039001. The following snippet can be used in such a scenario.
groupDetails = zoho.connect.myGroups(105000017039001);
where,
groupDetails
105000017039001
Sample Response
Following is a sample success response:
"{\"name\":\"Deluge\",\"id\":\"23412000000002002\"}",
"{\"name\":\"DRE\",\"id\":\"23425000000002002\"}",
"{\"name\":\"Test Group\",\"id\":\"32890000000002002\"}",
}
To fetch the partition IDs, use the following snippet:
for each <loop_variable> in <variable>
{
info <loop_variable>.get("id");
}
Note: The partition id can also be found out from the settings of a group which is under the corresponding network.
The response returned is null when the Scope ID supplied is incorrect