Update profile extension data 

To update the data defined for custom fields added to a profile, send an updated extension data document to the Profiles extension resource link returned by the Profiles user feed.

A Profiles extension can be represented as follows:

The links for working with custom extensions are found in the <feed> element of the Profiles user feed. The <link rel="http://www.ibm.com/xmlns/prod/sn/ext-attr" > element appears once in the feed for each custom extension defined for a profile.

Note: No custom extensions links are available from the links in the <entry> element of the feed that contains the user's profile.

You can only update the extensions for the profile of the user whose credentials you used to authenticate with the server. See Authenticating requests for information about how to authenticate the request.

Note: When you update an extension, all existing information will be replaced with the new data. To avoid deleting existing data, retrieve any data you want to retain first, and send it back with this request. See the topic Retrieve profile extension data for more details.

To update the data defined for custom fields added to a profile...

  1. Get the person's user feed. See Search for a user's profile.

  2. Get the URI of the extension resource which is specified in the href attribute of the <link> element in the user's user feed that has a rel="http://www.ibm.com/xmlns/prod/sn/ext-attr" attribute and a snx:extensionId attribute that matches the extension you want to update.

  3. Send a PUT request to the web address specified in the href attribute.

Table 1. Atom API request details

Method Resource URI Input representation
PUT profile extension Value of the href attribute of the <link> element in the user's user feed that has a rel="http://www.ibm.com/xmlns/prod/sn/ext-attr" attribute and a snx:extensionId attribute that matches the extension you want to update. XML schema defined by each extension or plain text


Input

To specify the content type of a simple extension, set the type equal to "text/plain" and provide the updated extension data as the content of the request. To specify the content type of a complex extension, set type equal to "text/xml" and, in the content of the request, provide the updated extension data specified as an XML document formatted according to the schema defined for the profiles custom extension that you are updating.


Output

None.

Returned HTTP headers

HTTP/1.1 200 OK

Error codes

Input header:

PUT /profiles/atom/profileExtension.do?email=jdoe@example.com&extensionId=profileLinks
 HTTP/1.1
Host: profiles.enterprise.example.com
Content-type: text/xml
Content-Length: 475

Input content:

<?xml version="1.0" encoding="UTF-8"?>
<linkroll xmlns="http://www.ibm.com/xmlns/prod/sn/profiles/ext/profile-links" 
   xmlns:snx="http://www.ibm.com/xmlns/prod/sn/profiles/ext/profile-links">
   <link name="atom spec" url="http://www.ietf.org/rfc/rfc4287" />
</linkroll>

Response:

HTTP/1.1 200 OK


Parent topic

Work with profile extensions

Related reference
Retrieve profile extension data
Search for a user's profile
Retrieve the Profiles service document


   

 

});

+

Search Tips   |   Advanced Search