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 Pending Attachments in Yammer
Overview
The following operations allow you to work with pending attachments. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with pending attachments, see Sample configuration.
Operation | Description |
---|---|
Creates a pending attachment. | |
deletePendingAttachment | Deletes a pending attachment. |
Operation details
This section provides further details on the operations related to pending attachments.
Creating a pending attachment
The createPendingAttachment operation creates a pending attachment. This does not require init to be passed in.
<yammer.createPendingAttachment> <apiUrl>{$url:apiUrl}</apiUrl> <responseType>{$url:responseType}</responseType> <apiToken>{$url:apiToken}</apiToken> </yammer.createPendingAttachment>
Properties
The URL to access the Yammer API.apiUrl:
The response type of the method call.responseType:
The API token of the account.apiToken:
Sample request
Following is a sample request that can be handled by the
operation. The Content-Type is, 'multipart/form-data' and form-date; name: attachment and type: file.createPendingAttachment
http://localhost:8280/services/yammer_createPendingAttachment?apiToken=pw3U7vPLe3oK0Cyj9wgKeg&responseType=json&apiUrl=https://www.yammer.com
Deleting a pending attachment
The deletePendingAttachment operation deletes a pending attachment.
<yammer.deletePendingAttachment> <attachmentId>{$ctx:attachmentId}</attachmentId> </yammer.deletePendingAttachment>
Properties
The ID of the attachment to be deleted.attachmentId:
Sample request
Following is a sample REST/JSON request that can be handled by the deletePendingAttachment operation.
{ "apiUrl":"https://www.yammer.com", "apiToken":"pw3U7vPLe3oK0Cyj9wgKeg", "responseType":"json", "attachmentId":"6399334" }
Sample configuration
Following is a sample proxy service that illustrates how to connect to Yammer with the init
operation and use the createPendingAttachment operation. The sample request for this proxy can be found in the createPendingAttachment sample request. You can use this sample as a template for using other operations in this category.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="yammer_createPendingAttachment" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence onError="faultHandlerSeq"> <yammer.createPendingAttachment> <apiUrl>{$url:apiUrl}</apiUrl> <responseType>{$url:responseType}</responseType> <apiToken>{$url:apiToken}</apiToken> </yammer.createPendingAttachment> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>