Versions Compared

Key

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

...

Table of Contents
maxLevel3
typeflat

...

Overview

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

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

OperationDescription

1Working with Relationships in YammeraddRelationship

Creates a new relationship.

1Working with Relationships in YammerdeleteRelationshipDeletes an existing relationship.
1Working with Relationships in YammergetRelationshipRetrieves the relationships.

Operation details

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

Anchor
addRelationship
addRelationship
Creating a relationship

The addRelationship operation creates a relationship.

Code Block
languagexml
titleaddRelationship
<yammer.addRelationship>
    <type>{$ctx:type}</type>
    <email>{$ctx:email}</email>
	<userId>{$ctx:userId}</userId>
</yammer.addRelationship>
Properties
  • type: The type of the relationship: "subordinate", "superior", or "colleague".
  • email: The e-mail address of the user.
  • userId: The ID of the user other than the logged-in user.
Anchor
request
request
Sample request

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

Code Block
languagexml
titleSample Request for addRelationship
{
	"apiUrl":"https://www.yammer.com",
	"apiToken":"xDH2yacFLuo1yfjTYsoHA",
	"responseType":"json",
	"type":"subordinate",
	"email":"anuradhika@chamath.onmicrosoft.com",
	"userId":"1530177481"
}

Anchor
deleteRelationship
deleteRelationship
Deleting an existing relationship

The deleteRelationship operation deletes an existing relationship. 

Code Block
languagexml
titledeleteRelationship
<yammer.deleteRelationship>
    <userId>{$ctx:userId}</userId>
	<type>{$ctx:type}</type>
</yammer.deleteRelationship>
Properties
  • userId: The ID of the user.
  • type: The type of the relationship: "subordinate", "superior", or "colleague".
Sample request

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

Code Block
languagexml
titleSample Request for deleteRelationship
{
	"apiUrl":"https://www.yammer.com",
	"apiToken":"xDH2yacFLuo1yfjTYsoHA",
	"responseType":"json",
	"userId":"1530177481",
	"type":"superior"
}

Anchor
getRelationship
getRelationship
Retrieving the relationships

The getRelationship operation retrieves the relationships. 

Code Block
languagexml
titlegetRelationship
<yammer.getRelationship>
	<userId>{$ctx:userId}</userId>
</yammer.getRelationship>
Properties
  • userId: The ID of the user.
Sample request

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

Code Block
languagexml
titleSample Request for getRelationship
{
	"apiUrl":"https://www.yammer.com",
	"apiToken":"xDH2yacFLuo1yfjTYsoHA",
	"responseType":"json",
	"userId":"1530177481"
}

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 addRelationship operation. The sample request for this proxy can be found in the addRelationship sample request. You can use this sample as a template for using other operations in this category.

...