PeopleAggregator API: method peopleaggregator.findGroup

Arguments | Return value | REST (XML) example | REST (JSON) example | XML-RPC example

Method: peopleaggregator.findGroup

Searches for a group by name.

Arguments (see also Authentication)

If calling by XML-RPC, note that this method takes a single struct as input, with the following keys:

name

Type: string
Name (or part of name) of group to locate
Example: cricket

Return value (see also Exceptions)

Type: hash

Attributes:

success

Type: boolean
true if group search succeeded (including if zero groups were found), or false if something went wrong
Example: True

groups

Type: array
Groups located by search

Content of each item:

item

Type: hash

Attributes:

id

Type: string
ID of group
Example: group:1234

name

Type: string
Name of group
Example: Indian Cricket

Example REST (XML) request

Request

POST /api/xml/peopleaggregator/findGroup HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 12

name=cricket

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 315

<response>
 <groups>
  <item>
   <id>group:1234</id>
   <name>Indian Cricket</name>
  </item>
 </groups>
 <success>true</success>
</response>

Example REST (JSON) request

Request

POST /api/json/peopleaggregator/findGroup HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 12

name=cricket

Response

HTTP/1.1 200 OK
Content-Type: application/x-javascript
Content-Length: 77

{"groups": [{"id": "group:1234", "name": "Indian Cricket"}], "success": true}

Example XML-RPC call

Request

POST /api/xmlrpc HTTP/1.1
Content-Type: text/xml
Content-Length: 700

<?xml version='1.0'?>
 <methodCall>
  <methodName>peopleaggregator.findGroup</methodName>
  <params>
   <param>
    <value><struct>
     <member>
      <name>name</name>
      <value><string>cricket</string></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodCall>
 

Response

HTTP/1.1 200 OK
Content-Type: text/xml
Content-Length: 1807

<?xml version='1.0'?>
 <methodResponse>
  <params>
   <param>
    <value><struct>
     <member>
      <name>groups</name>
      <value><array><data>
       <value><struct>
        <member>
         <name>id</name>
         <value><string>group:1234</string></value>
        </member>
        <member>
         <name>name</name>
         <value><string>Indian Cricket</string></value>
        </member>
       </struct></value>
      </data></array></value>
     </member>
     <member>
      <name>success</name>
      <value><boolean>1</boolean></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodResponse>