Retrieve profile extension data
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 Update profile extension data for more information.
To retrieve a profile extension...
- Get the person's user feed. See Search for a user's profile.
- 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.
- Send a GET request to the web address specified in the href attribute.
Table 1. Atom API request details
Method Resource URI Output representation GET 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
None.
Output
Extension data is returned in the response content.Returned HTTP headers
HTTP/1.1 200 OK
Indicates that the extension was found and returned successfully. If an error is encountered, the header contains one of the error codes listed below.
Content-Type: text/plain
Indicates format of the response to a GET request.
Content-Type: text/xml
Indicates format of the response to a GET request.
- HTTP/1.1 400 Bad Request
- HTTP/1.1 401 Unauthorized
- HTTP/1.1 404 Not Found
Input:
GET /profiles/atom/profileExtension.do?key=c007e7e2-9322-4021-9426-136b0411796f& extensionId=employeeType HTTP/1.1 Host: profiles.enterprise.example.comResponse:
HTTP/1.1 200 OK Content-Type: text/plain; charset=UTF-8 Content-Length: 7Response content:
regular
Parent topic
Work with profile extensions
Related tasks
Enable custom extension attributes for ProfilesRelated reference
Update profile extension data
Search for a user's profile
});