Home
Checking whether two people are colleagues
Returns an entry of the colleague connection if one exists.
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 (&).
Input parameters
Parameter Description connectionType 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 e-mail 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
Do not use this parameter if Lotus Connections is configured to prevent e-mail 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. 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 e-mail 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
Do not use this parameter if Lotus Connections is configured to prevent e-mail 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. 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
- Indicates a connection exists between the two users specified. If no connection is found or an error occurs, this header will contain one of the error codes below.
- X-Profiles-Connection-Type: colleague
- Indicates that a colleague connection exists.
- X-Profiles-Connection-Status: accepted
- Indicates the status of the connection. Possible status options are:
- accepted
- The person was invited to participate in a connection and has accepted the invitation.
- pending
- The person was invited to participate in a connection, but has not responded to the invitation yet.
- unconfirmed
- The person has invited someone to participate in a connection, but the invitation has not yet been accepted or deleted.
Error codes
- HTTP/1.1 404 Not Found: No connection was found between the two users specified
- HTTP/1.1 400 Bad Request
Related reference
Colleague connection entry content