...
...
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.
Operation details
This section provides further details on the operations related to relationships.
Anchor |
---|
| addRelationship |
---|
| addRelationship |
---|
|
Creating a relationshipThe addRelationship operation creates a relationship.
Code Block |
---|
language | xml |
---|
title | addRelationship |
---|
|
<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.
Sample requestFollowing is a sample REST/JSON request that can be handled by the addRelationship
operation.
Code Block |
---|
language | xml |
---|
title | Sample 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 relationshipThe deleteRelationship operation deletes an existing relationship.
Code Block |
---|
language | xml |
---|
title | deleteRelationship |
---|
|
<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 |
---|
language | xml |
---|
title | Sample Request for deleteRelationship |
---|
|
{
"apiUrl":"https://www.yammer.com",
"apiToken":"xDH2yacFLuo1yfjTYsoHA",
"responseType":"json",
"userId":"1530177481",
"type":"superior"
} |
Anchor |
---|
| getRelationship |
---|
| getRelationship |
---|
|
Retrieving the relationshipsThe getRelationship
operation retrieves the relationships.
Code Block |
---|
language | xml |
---|
title | getRelationship |
---|
|
<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 |
---|
language | xml |
---|
title | Sample Request for getRelationship |
---|
|
{
"apiUrl":"https://www.yammer.com",
"apiToken":"xDH2yacFLuo1yfjTYsoHA",
"responseType":"json",
"userId":"1530177481"
} |
Anchor |
---|
| sampleconfiguration |
---|
| sampleconfiguration |
---|
|
Sample configurationFollowing 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.
...