Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The getAutocomplete operation retrieves autocomplete results.

Code Block
languagexml
titlegetAutocomplete
<yammer.getAutocomplete>
    <prefix>{$ctx:prefix}</prefix>
	<models>{$ctx:models}</models>
</yammer.getAutocomplete>
Properties
  • prefix: The matching string for the searchable fields in the specified models.
  • models: The comma separated list of modelName:count which is searched and the number of results from each.
Anchor
request
request
Sample request

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

Code Block
languagexml
titleSample Request for getAutocomplete
{
	"apiUrl":"https://www.yammer.com",
	"apiToken":"bxmUDADfr3F2ee1rE2Awkw",
	"prefix":"m",
	"models":"user:5"
}
Related Yammer documentation
https://developer.yammer.com/restapi/#rest-autocomplete

Anchor
sampleconfiguration
sampleconfiguration
Sample configuration

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

Code Block
languagexml
titleSample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="yammer_getAutocomplete"
       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="prefix" expression="json-eval($.prefix)"/>
         <property name="models" expression="json-eval($.models)"/>
         <yammer.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <apiToken>{$ctx:apiToken}</apiToken>
         </yammer.init>
         <yammer.getAutocomplete>
            <prefix>{$ctx:prefix}</prefix>
            <models>{$ctx:models}</models>
         </yammer.getAutocomplete>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>