Accept an invitation to become a colleague
To accept an invitation to be a colleague, send an updated connection document in Atom format to the existing connection's edit web address.After you accept a connection, the status of the connection in your connections is changed from pending to accepted and the status of the connection in the invitee's list of connections is changed from unconfirmed to accepted. To decline the invitation, delete it by sending a DELETE HTTP request to the resource.
All existing connection information will be replaced with the new data. To avoid deleting all existing data, retrieve any data you want to retain first, and send it back with this request. See Inviting a person to become your colleague for more information.
See Authenticating requests for information about how to authenticate the request.
Table 1. Atom API request details
Method Resource URI Input representation PUT connection Value of the href attribute of the <link> element that has a rel="edit" attribute value for each entry in the colleague connections feed. connection
Input
Provide a connection Atom entry document. Be sure to change the value of the term attribute of the category element with the attribute value of scheme="http://www.ibm.com/xmlns/prod/sn/status" from pending to accepted. The content type of the Atom entry document must be application/atom+xml.
Output
None.Returned HTTP headers
HTTP/1.1 200 OK
Indicates that the colleague connection was successfully updated. If an error occurs, this header will contain one of the error codes below.
- HTTP/1.1 401 Unauthorized
- HTTP/1.1 404 Not Found
Example
HTTP request header:
PUT /profiles/atom/connection.do? connectionId=65cc71d1-07da-452c-9a2c-8adc49680557 HTTP/1.1 Authorization: Basic xxxx Host: connections.example.com Accept: */* Content-type: application/atom+xml Content-Length: 577HTTP request content:
<?xml version="1.0" encoding="UTF-8"?> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:snx="http://www.ibm.com/xmlns/prod/sn"> <id>tag:profiles.ibm.com,2006:entry65cc71d1-07da-452c-9a2c-8adc49680557</id> <title type="text">Bill User45</title> <category term="connection" scheme="http://www.ibm.com/xmlns/prod/sn/type"> </category> <category term="colleague" scheme="http://www.ibm.com/xmlns/prod/sn/connection/type"> </category> <category term="accepted" scheme="http://www.ibm.com/xmlns/prod/sn/status"> </category> <content type="html"> just friends of Bill </content> </entry>HTTP response:
HTTP/1.1 200 OK
Parent topic
Work with colleague connectionsRelated reference
Colleague connection entry content