Choose where you’d like to start

Fetch groups

Overview

This task is used to fetch all the groups under a specified network.

Syntax

<variable> = zoho.connect.myGroups(<scopeID>, <connectionName>);

where,

ParamsDescriptionData 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
is a variable which will hold the returned response.
105000017039001
is a BIGINT value that represents the Scope ID of the network

Sample Response

Following is a sample success response:

{"groups": [
"{\"name\":\"Deluge\",\"id\":\"23412000000002002\"}",
"{\"name\":\"DRE\",\"id\":\"23425000000002002\"}",
"{\"name\":\"Test Group\",\"id\":\"32890000000002002\"}",
}

To fetch the partition IDs, use the following snippet:

<variable> = <response_variable>.get("groups");
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

Related Links

Get Started Now

Execute