Getting List of Groups
You can get the list of groups with the getGroups method.
Permission to run the request: Account Owner, Administrator, Organization Administrator, Publisher.
Parameters
Parameter | Type | Description |
---|---|---|
credentials (required) | credentials | Read the description of the Credentials object. |
organizationId (optional) | int | List of groups in the specified organization. |
Organization administrators can get the list of groups only within their own organization.
If the specified organization is not found, you will get the list of all groups in the response. As for publishers and organization Administrators, they will get the list of groups within their own organization in this case.
Return Value
After the request has been completed, the system returns an object with the following properties:
Parameter | Type | Description |
---|---|---|
groups | group[] | Array of groups. The group object has the same properties as in the getGroupInformation method. |
Sample Call
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="http://ispringlearn.com/go/services/api/soap">
<SOAP-ENV:Body>
<GetGroupsRequest>
<credentials>
<accountUrl>http://myaccount.ispringlearn.com</accountUrl>
<email>email@email.com</email>
<password>password</password>
</credentials>
<organizationId>1</organizationId>
</GetGroupsRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
Sample Response
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="http://ispringlearn.com/go/services/api/soap">
<SOAP-ENV:Body>
<GetGroupsResult>
<group>
<groupId>string</groupId>
<name>string</name>
<description>string</description>
<organizationId>1</organizationId>
<users>
<id>1</id>
<id>2</id>
</users>
</group>
<group>
<groupId>string</groupId>
<name>string</name>
<description>string</description>
<organizationId>1</organizationId>
<users>
<id>1</id>
<id>2</id>
</users>
</group>
</GetGroupsResult>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML