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 Suggestions in Yammer



Overview

The following operations allow you to work with suggestions. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with suggestions, see Sample configuration

OperationDescription

deleteSuggestion

Deletes a suggestion.

getSuggestionRetrieves suggestions.

Operation details

This section provides further details on the operations related to suggestions.

Deleting a suggestion

The deleteSuggestion operation deletes a suggestion.

deleteSuggestion
<yammer.deleteSuggestion>
	<id>{$ctx:id}</id>
</yammer.deleteSuggestion>
Properties
  • id: The ID of the suggestion.
Sample request

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

Sample Request for deleteSuggestion
{
	"apiUrl":"https://www.yammer.com",
	"apiToken":"xDH2yacFLuo1yfjTYsoHA",
	"responseType":"json",
	"id":"1530172129"
}
Related Yammer documentation
https://developer.yammer.com/restapi/#rest-suggestions

Retrieving suggestions

The getSuggestion operation retrieves suggestions for the user.

getSuggestion
<yammer.getSuggestion>
	<limit>{$ctx:limit}</limit>
</yammer.getSuggestion>
Properties
  • limit: The number of suggestions to retrieve.
Sample request

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

Sample Request for getSuggestion
{
	"apiUrl":"https://www.yammer.com",
	"apiToken":"xDH2yacFLuo1yfjTYsoHA",
	"responseType":"json",
	"limit":"2"
}
Related Yammer documentation
https://developer.yammer.com/restapi/#rest-suggestions

Sample configuration

Following is a sample proxy service that illustrates how to connect to Yammer with the init operation and use the deleteSuggestion operation. The sample request for this proxy can be found in the deleteSuggestion sample request. You can use this sample as a template for using other operations in this category.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="yammer_deleteSuggestion"
       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="id" expression="json-eval($.id)"/>
         <yammer.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiToken>{$ctx:apiToken}</apiToken>
            <responseType>{$ctx:responseType}</responseType>
         </yammer.init>
         <yammer.deleteSuggestion>
            <id>{$ctx:id}</id>
         </yammer.deleteSuggestion>
         <respond/>
      </inSequence>
      <outSequence>
        <send/>
      </outSequence>
   </target>
   <description/>
</proxy>