Community articleDeleting connections
Added by IBM contributorIBM on April 13, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

To remove an existing colleague relationship from your profile, or to decline an invitation to become a colleague, use the HTTP DELETE method.



To remove an existing colleague relationship from your profile, or to decline an invitation to become a colleague, use the HTTP DELETE method.

Only a participant in the colleague relationship or an invitee to join a colleague relationship can delete the connection. Deleted connections cannot be restored.

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

Process

1. Retrieve any user's Profiles service document using the user's credentials to authenticate the request. See Retrieving the Profiles service document
2. In the service document, find the href attribute value where the value of the rel attribute is http://www.ibm.com/xmlns/prod/sn/connections/colleague
3. Perform a GET request on the value of the href element in step 2 to get the list of colleague connections.
4. Find the value of the href atribute in the element with rel="edit" for the connection you want to decline or delete.
5. Perform a DELETE on the value of the href attribute in step 4.

Input
Method URI Description
DELETE /profiles/atom/connection.do Value of the href attribute of <link> element that has a rel="edit" attribute for each entry in the colleague connections feed.
Name Type Optional Description
connectionId
string No Unique identifier for a colleague connection.
inclMessage
boolean Yes 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, you must be the source of the connection object and you must authenticate the request.
Output
Code Description
200
OK. Indicates that the request was received successfully.
400
Bad Request. Returned when no matching user record can be found.
404
Not found.