This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with Networks in Yammer

The getNetwork operation facilitates switching between networks.

getNetwork
<yammer.getNetwork>
	<includeSuspended>{$ctx:includeSuspended}</includeSuspended>
    <excludeOwnMessagesFromUnseen>{$ctx:excludeOwnMessagesFromUnseen}</excludeOwnMessagesFromUnseen>
</yammer.getNetwork>
Properties
  • includeSuspended: The boolean flag to include networks the user is suspended in.
  • excludeOwnMessagesFromUnseen: The boolean flag to exclude the user’s own messages from the unseen count.
Sample request

Following is a sample REST/JSON request that can be handled by the getNetwork operation.

Sample Request for getNetwork
{
	"apiUrl":"https://www.yammer.com",
	"apiToken":"bxmUDADfr3F2ee1rE2Awkw",
	"responseType":"json",
	"includeSuspended":"TRUE",
	"excludeOwnMessagesFromUnseen":"TRUE"
}
Related Yammer documentation
https://developer.yammer.com/restapi/#rest-networks

Sample configuration

Following is a sample proxy service that illustrates how to connect to Yammer with the init operation and use the getNetwork operation. The sample request for this proxy can be found in the getNetwork sample request.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="yammer_getNetwork"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence onError="faultHandlerSeq">
         <property name="apiUrl" expression="json-eval($.apiUrl)"/>
         <property name="apiToken" expression="json-eval($.apiToken)"/>
         <property name="responseType" expression="json-eval($.responseType)"/>
         <property name="includeSuspended" expression="json-eval($.includeSuspended)"/>
         <property name="excludeOwnMessagesFromUnseen" expression="json-eval($.excludeOwnMessagesFromUnseen)"/>
        
		<yammer.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiToken>{$ctx:apiToken}</apiToken>
            <responseType>{$ctx:responseType}</responseType>
         </yammer.init>
         <yammer.getNetwork>
            <includeSuspended>{$ctx:includeSuspended}</includeSuspended>
            <excludeOwnMessagesFromUnseen>{$ctx:excludeOwnMessagesFromUnseen}</excludeOwnMessagesFromUnseen>
        </yammer.getNetwork>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>