API - Get group details

Get Group Details

This API can be used to get group's details in the microsite. The API is a restrictive one and can be called by an admin of the site only. Any other user trying to invoke this API would result in an error being returned by the API.

 

API Details

Signature of API call

connection.invokeApi(String uri, String realUserName, Map<String, String> requestParameters);

See details about invoking API in general

 

Parameter 1 - URI

groupService.do

Parameter 2 - UserName

Username of any site administrator

 

Parameter 3 - Request Parameters

Name Value
dispatch get
id or code  must be specified
id Group  id, e.g. a570e68e-2134-11e6-b63c-6ce229284b01  (Optional)
code Group code (optional). This is typically not available on group, needs to be enabled. 

 

Response

1. Response on successfully finding the user

HTTP Response Code = HttpServletResponse.SC_OK

Response XML

<response code="0">
    <msgs>
         <msg>
             <code>0</code>
             <value><![CDATA[Success]]></value>
         </msg>
    </msgs>

<data>
    <group id="0a94dd08-bcf2-11e3-9f5e-ed9f54c5e015"  >
        <name><![CDATA[Technical Group]]></name

        <code><![CDATA[TECH001]]></code>        
        <groupOwnerUserName><![CDATA[jdoe]]></groupOwnerUserName>
        <membercount>12</membercount>

        <maxMembers>100</maxMembers>
        <visibility><![CDATA[PRIVATE]]></visibility>       

        <membership><![CDATA[OPEN]]></membership>       
        <customProperties>
                <prop>
                    <name><![CDATA[type]]></name>
                    <value><![CDATA[AdminType]]></value>
                </prop>
        </customProperties>
            
    </group>
</data>

</response>

 

2. Response for unauthorized access

HTTP Response Code = HttpServletResponse.SC_UNAUTHORIZED

Response XML

<response code="-1">
    <msgs>
         <msg>
             <code>0005</code>
             <value><![CDATA[You are not allowed to perform this action.]]></value>
         </msg>
    </msgs>
</response>

3. Response when group is not found

<response code="-1">
<msgs>
     <msg>
         <code>0004</code>
         <value><![CDATA[Unable to find Group with matching id or code]]></value>
     </msg>
</msgs>
</response>


Rating: