Update a profile using the Administration API 

To update a person's profile, send an updated profile entry document in Atom format to the appropriate resource of the Administration API.

All profile entry information will be replaced with new data. To avoid deleting existing data, retrieve any data you want to retain first, and send it back with this request. See Retrieve profile entries using the Administration API for more information.

Table 1. Atom API request details

Method Resource URI Input representation
PUT profile /admin/atom/profileEntry.do profile

Provide one of the following parameters as part of the request:

Table 2. Input parameters

Parameter Description
email Internet email address of the user whose profile you want to retrieve. Format the HTTP request using the proper URL encoding. For example, the encoded form of the @ symbol is %40.

Note: Do not use this parameter if Lotus 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.
This parameter is ignored if the userid parameter is also specified.

userid Unique ID that represents a specific person. This value is specified in the <snx:userid> element.


Input

Provide a profile entry Atom entry document as the PUT data. The content type of the Atom entry document must be application/atom+xml. Do not remove the entries that contain the following key values from the profile entry document:


Output

The complete entry is returned. It contains relative links to the user's photo, pronunciation file, and so on. The extension data is inline within the entry and not referenced by a link.

Returned HTTP headers

HTTP/1.1 200 OK

Errors


Example

To change the display name used for Madeleine Brown from Madeleine Brown to Maddie Brown...

  1. Retrieve the profile entry for Madeleine by sending the following request:

      GET /profiles/admin/atom/profileEntry.do?email=mbrown%40example.com HTTP/1.1

  2. Make a copy of the returned entry document.

  3. In the copy, edit the value of the <data> element associated with the com.ibm.snx_profiles.base.displayName <key> element to read as follows:

      <entry>
      <key>com.ibm.snx_profiles.base.displayName</key>
      <value>
        <type>text</type>
        <data>Maddie Brown</data>
      </value>
      </entry>

  4. Do not remove or edit any other entries. Save and close the updated profile entry.

  5. Update Maddie's profile in the Profiles database by sending a PUT request to the web address specified in the edit link of her profile document. For example:

      PUT /profiles/admin/atom/profileEntry.do?key=e011a7b5-8a1e-43ea-90ec-c303fb4ed80a HTTP/1.1


Parent topic

Work with profiles using the Administration API


   

 

});

+

Search Tips   |   Advanced Search