Community articleCreating a colleague connection using the Administration API
Added by IBM contributorIBM on July 1, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Profiles administrators may create colleague connections between people.



Profiles administrators may create colleague connections between people.

To create a connection, use the HTTP PUT method

 

Input

None.

Output

The PUT method returns an Atom entry document containing a Colleague connection entry.

 

 

Input
Method URI Description
PUT /profiles/admin/atom/connections.do Profiles administrators may create colleague connections between people.
Content Type: application/atom+xml
Sample Request:
<entry xmlns="http://www.w3.org/2005/Atom">
   <content type="text">Please be my new colleague connection!</content>
   <category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="connection" />
   <category scheme="http://www.ibm.com/xmlns/prod/sn/connection/type" term="colleague" />
   <category scheme="http://www.ibm.com/xmlns/prod/sn/status" term="accepted" />
</entry>
Name Type Optional Description
action
string No Specifies the final state for the connection. You must specify action=complete.
sourceEmail
string Yes Internet email address of the user. Format the HTTP request using the proper URL encoding. For example, the encoded form of the @ symbol is %40.
Note: Do not use if configured to prevent email addresses from being displayed. Doing so will return an error code 400 for an invalid request. Use the key or userid parameters instead.
sourceKey
string No An ID generated by Profiles to identify a person.
Note: A user's key value is contained in the element with a class attribute value of x-profile-key in the user's profile feed. You can access a user's feed by searching all profiles by name, which returns information you can then use to retrieve the person's feed.
sourceUserid
string Yes A unique ID that represents a specific person. To determine a person's user ID, you can search all profiles for the person by name. The returned feed identifies the person's user ID in the <snx:userid> element.
targetEmail
string Yes Internet email address of the user. Format the HTTP request using the proper URL encoding. For example, the encoded form of the @ symbol is %40.
Note: Do not use if configured to prevent email addresses from being displayed. Doing so will return an error code 400 for an invalid request. Use the key or userid parameters instead.
targetKey
string No An ID generated by Profiles to identify a person.
Note: A user's key value is contained in the element with a class attribute value of x-profile-key in the user's profile feed. You can access a user's feed by searching all profiles by name, which returns information you can then use to retrieve the person's feed.
targetUserid
string Yes A unique ID that represents a specific person. To determine a person's user ID, you can search all profiles for the person by name. The feed that is returned identifies the person's user ID in the <snx:userid> element.
Output
Content Type: application/atom+xml
Code Description
201
Indicates that the connection was successfully created.
400
Bad Request. Returned when no matching user record can be found.
403
Forbidden. The server refuses to fulfill a request, typically because the request was for an object that you don't have permission to access.
405
Method not allowed.