Community articleRetrieving profile extension data
Added by IBM contributorIBM | Edited by IBM contributorLDD Webmaster on June 27, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

To retrieve the data defined for custom fields added to a profile, use the Profiles extension resource link returned by the Profiles user feed.



To retrieve the data defined for custom fields added to a profile, use the Profiles extension resource link returned by the Profiles user feed.

Profiles extension data can be represented as follows:

 

  • A single plain text value. Identified as type="text/plain."
  • Multiple values defined by an XML schema. Identified as type="text/xml."

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.

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

To retrieve a profile extension, complete the following steps:

1. Get the person's user feed. See Searching 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 retrieve.
3. Send a GET request to the web address specified in the href attribute.

Example URI

GET /profiles/atom/profileExtension.do?key=c007e7e2-9322-4021-9426-136b0411796f&

	extensionId=employeeType HTTP/1.1

	Host: profiles.enterprise.example.com


 

Input
Method URI Description
GET /profiles/atom/profileExtension.do 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.
Content Type: application/atom+xml
Name Type Optional Description
extensionId
string No Extension data.
key
string No An ID generated by Profiles to identify a person.
email
string Yes User's email.
lastMod
string Yes last modified since a specified date. Specify the date in the number of milliseconds since January 1, 1970, 00:00:00 GMT time.
Output
Name Type Optional Description
Content-Type
enumerated Yes Indicates format of the response to a GET request.
Authorized values:
  • text/plain
  • text/xml
Content-Length
number No Indicates length of the response from a GET
Code Description
200
OK. Indicates that the request was received successfully.
400
Bad Request. Returned when no matching user record can be found.
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
404
Page not found.