Updating profile entries
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 15, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

To update your profile entry, send an updated profile entry document in Atom format to the existing profile's edit web address.
All existing profile entry information is 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. For example, if you want to add a new tag to a profile entry, retrieve the existing tags, and send them all back with the new tag in the update request. See Retrieving a profile entry for more information.

To find out which fields in a particular profile can be edited, look for the list of <editableField> elements in the service document of the person whose profile you want to edit. You cannot programmatically change which fields can be edited; that can only be done using wsadmin commands. However, you can change the values stored in the editable fields for a profile by specifying new values for the editable fields represented as corresponding vCard values.

In addition to the default set of fields available for a profile that can be configured as editable by the administrator, the administrator can also add custom fields to a profile. Custom fields are added using extensions. For information about how to edit the value of a custom field, see Working with profile extensions.

To get the rel="edit" link for a specific person's profile, retrieve a feed of the profile and specify the output=vcard parameter on the request.

Users can only update their own profiles.


Process

To update a profile entry:

1. Get the service document for the person's profile. See Retrieving the Profiles service document
2. Obtain the "profile.do" link from the response body and perform a GET with this link.
3. Find the "profileEntry.do" link in the response feed and use it to perform another GET method.
4. Provide a profile entry Atom entry document as the PUT data. The content type of the Atom entry document must be application/atom+xml.The content element of the profile entry must contain a vCard representation of the profile, and the type attribute must be set to text.

Use the following table as a guideline of the vCard values that represent editable profile fields:

Table 2. vCard values to use to represent new values for profile fields

<editablefield> element name
vCard value
alternateLastname
X_ALTERNATE_LAST_NAME
bldgId
X_BUILDING
blogUrl
X_BLOG_URL;VALUE
countryCode
X_COUNTRY_CODE
courtesyTitle
HONORIFIC_PREFIX
deptNumber
X_DEPARTMENT_NUMBER
description
X_DESCRIPTION
displayName
FN
email
EMAIL;INTERNET
employeeNumber
X_EMPLOYEE_NUMBER
employeeTypeCode
X_EMPTYPE
employeeTypeDesc
ROLE
experience
X_EXPERIENCE
faxNumber
TEL;FAX
floor
X_FLOOR
groupwareEmail
EMAIL;X_GROUPWARE_MAIL
guid
UID
ipTelephoneNumber
TEL;X_IP and TEL;PAGER*
isManager
X_IS_MANAGER
jobResp
TITLE
lastUpdate
REV
managerUid
X_MANAGER_UID
mobileNumber
TEL;CELL
nativeFirstName
X_NATIVE_FIRST_NAME
nativeLastName
X_NATIVE_:LAST_NAME
officeName
X_OFFICE_NUMBER
organizationTitle
ORG
orgId
X_ORGANIZATION_CODE
pagerId
X_PAGER_ID
pagerServiceProvider
X_PAGER_PROVIDER
pagerType
X_PAGER_TYPE
preferredFirstName
NICKNAME
preferredLanguage
X_PREFERRED_LANGUAGE
preferredLastName
X_PREFERRED_LAST_NAME
telephoneNumber
TEL;WORK
timezone
TZ
uid
X_PROFILE_UID
URL*
X_BLOG_URL;VALUE
workLocation
ADR;WORK
workLocationCode
X_WORKLOCATION_CODE
Input
Method URI Description
PUT /profiles/atom/profileEntry.do Value of the href attribute of the <link rel="edit"> element of the user's profile entry.
Content Type: application/atom+xml
Sample Request:
  <entry xmlns="http://www.w3.org/2005/Atom">
<title type="text">Amy Jones242</title>
<content type="text">
BEGIN:VCARD
VERSION:2.1
PHOTO;VALUE=URL:https://enterprise.example.com/profiles/photo.do?key=04052286-5f9c-47e9-b4f3-def476614605&amp;lastMod=1392914241405
N:Jones242;Amy
FN:Amy Jones242
URL:https://enterprise.example.com/profiles/atom/profile.do?key=04052286-5f9c-47e9-b4f3-def476614605
SOUND;VALUE=URL:https://enterprise.example.com/profiles/audio.do?key=04052286-5f9c-47e9-b4f3-def476614605&amp;lastMod=1392914241405
EMAIL;INTERNET:ajones242@janet.iris.com
EMAIL;X_GROUPWARE_MAIL:tjb@us.ibm.com
X_BLOG_URL;VALUE=URL:
ORG:
ROLE:
TITLE:
X_COUNTRY_CODE:ca
X_BUILDING:
X_FLOOR:
X_OFFICE_NUMBER:
TEL;WORK:1-412-399-0000
X_MANAGER_UID:Amy Jones2
X_IS_MANAGER:N
X_PROFILE_KEY:04052286-5f9c-47e9-b4f3-def476614605
UID:8df02bc0-f6df-1032-9b62-d02a14283ea9
X_PROFILE_UID:Amy Jones242
X_LCONN_USERID:8df02bc0-f6df-1032-9b62-d02a14283ea9
REV:2014-02-20T16:37:21.405Z
X_PROFILE_TYPE:default
END:VCARD
</content>
<category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="profile" />
</entry>
Name Type Optional Description
key
string No An ID generated by Profiles to identify a person.
Output
Code Description
200
OK. Indicates that the request was received successfully.
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
404
URL could not be found