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 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:
- com.ibm.snx_profiles.base.distinguishedName
- com.ibm.snx_profiles.base.guid
- com.ibm.snx_profiles.base.surname
- com.ibm.snx_profiles.base.uid
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
Indicates that the profile entry was successfully updated. If an error occurs, this header contains one of the error codes.
Errors
- HTTP/1.1 400 Bad Request
- HTTP/1.1 401 Unauthorized
- HTTP/1.1 404 Not Found
Example
To change the display name used for Madeleine Brown from Madeleine Brown to Maddie Brown...
- Retrieve the profile entry for Madeleine by sending the following request:
GET /profiles/admin/atom/profileEntry.do?email=mbrown%40example.com HTTP/1.1- Make a copy of the returned entry document.
- 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>
- Do not remove or edit any other entries. Save and close the updated profile entry.
- 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
});