Checking whether two people are colleagues 

Returns an entry of the colleague connection if one exists.

Table 1. Atom API request details

Method Resource Description
GET

  • /atom/connection.do?connectionType=colleague&<source>&<target>

  • Value of the href attribute of the <link rel="self"> element of each entry in the colleague connections feed.

Retrieves the connection if one exists between the two people specified as the <source> and <target> of the connection. Use the source and target parameters listed below to specify values for them.
HEAD

  • /atom/connection.do?connectionType=colleague&<source>&<target>

  • Value of the href attribute of the <link rel="self"> element of each entry in the colleague connections feed.

Retrieves just HTTP headers indicating whether a connection exists between the two people specified as the <source> and <target> of the connection. Use the source and target parameters listed below to specify values for them. You can use this operation to quickly find out the status of a connection.

See Authenticating requests for information about how to authenticate the request.

Use one or more of the input parameters to narrow the search. Separate multiple parameters using an ampersand (&).

Table 2. Input parameters

Parameter Description
connectionType

Note: Required.

Identifies the type of connection to look for. You must specify connectionType=colleague.
inclMessage Specifies whether or not to include the invitation message with the returned entries. This parameter accepts a Boolean value of true or false. If you include this parameter and set it to true, be the source of the connection object and authenticate the request.
sourceEmail Internet email address of the user whose colleagues you want to retrieve.

Format the HTTP request using the proper URL encoding. For example, the encoded form of the @ symbol is %40 as in:

adam_eventide%40garden.com

Note: Do not use this parameter if IBM Connections is configured to prevent email addresses from being displayed. It will return an error code 400 for an invalid request. Use the key or userid parameters instead.

sourceKey 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 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.
targetEmail Internet email address of the user whose colleagues you want to retrieve.

Format the HTTP request using the proper URL encoding. For example, the encoded form of the @ symbol is %40 as in:

adam_eventide%40garden.com

Note: Do not use this parameter if IBM Connections is configured to prevent email addresses from being displayed. It will return an error code 400 for an invalid request. Use the key or userid parameters instead.

targetKey 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 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

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

Returned HTTP Headers

HTTP/1.1 200 OK

X-Profiles-Connection-Type: colleague

X-Profiles-Connection-Status: accepted

Error codes


Parent topic

Getting Profiles feeds

Related reference
Colleague connection entry content


   

 

});