Community articleWorking with profile types
Added by IBM contributorIBM on April 3, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Using the Atom Publishing Protocol, also known as AtomPub, you can retrieve information about the profile types defined in the deployment. Each profile type has an associated set of attributes. The API interface allows users to extract an XML document with these attribute details.



Using the Atom Publishing Protocol, also known as AtomPub, you can retrieve information about the profile types defined in the deployment. Each profile type has an associated set of attributes. The API interface allows users to extract an XML document with these attribute details.

An authenticated user can retrieve the profile type document using the web address found in the user's service document or entry document: http://www.ibm.com/xmlns/prod/sn/profile-type. See Profiles entry content for details.

You can also retrieve the profile type document for a user or a specified type.
Table 2. Atom API request details to retrieve the profile type document for a user or a specified type

Input or resource
Description
Resource: atom/profileType.do
Retrieve profiles type document
Input: type
A profile type as specified in the deployment configuration (see profiles-type.xml).

Note: For this example, if the GET request specifies an invalid profileType.do value or if the user has not logged in, or is otherwise not authenticated, the result is a Response: 404 Not Found message.

Method URI Description
GET /profiles/atom/profileType.do Retrieve profiles type document.
Value of href attribute of the link <rel="http://www.ibm.com/xmlns/prod/sn/profile-type" ... /

in either the user service document or the user entry.
Output
Code Description
200
OK. Indicates that the request was received successfully.
404
Not found.
Examples
In the following example the profile type link is provided in the user entry
GET https://example.com/profiles/atom/profile.do?userid=d1b1d105-447d-4faa-a1a2-214e4b222d03

Response returned by the server
<?xml version="1.0" encoding="UTF-8"?>

<feed>

<id>tag:profiles.ibm.com,2006:feed</id>

<generator version="0.0.0.0" uri="http://www.ibm.com/xmlns/prod/sn">IBM Connections - Profiles

</generator>

<title type="text">profile with userid

d1b1d105-447d-4faa-a1a2-214e4b222d03</title>

<author>

<name>IBM Connections - Profiles</name>

</author>

<updated>2011-12-08T14:49:18.411Z</updated>

<fh:complete></fh:complete>

<link ...></link>

...

<link ...></link>

<entry>

<id>tag:profiles.ibm.com,2006:entry8d379576-bcd1-4860-b614-279590790b0c</id>

<title type="text">Amadou Alain</title>

<updated>2011-12-05T18:18:56.759Z</updated>

<category term="profile" scheme="http://www.ibm.com/xmlns/prod/sn/type"></category>

<contributor>

<name>Amadou Alain</name>

...

</contributor>

...

<link

href="https://example.com/profiles/atom/profileType.do?type=default"

rel="http://www.ibm.com/xmlns/prod/sn/profile-type" type="application/profile-type+xml"></link>

...

<summary type="text">Profile information for Amadou Alain</summary>

<content type="xhtml">

<sp_0:div xmlns="http://www.w3.org/1999/xhtml" xmlns:sp_0="http://www.w3.org/1999/xhtml">

...

</sp_0:div>

</content>

</entry>

</feed>

The following example illustrates how to retrieve a profile type.
GET https://example.com/profiles/atom/profileType.do?type=default

Response returned by the server
<?xml version="1.0" encoding="UTF-8"?>

<pt:type xmlns:pt="http://www.ibm.com/profiles-types">

<pt:parentId>snx:person</pt:parentId>

<pt:id>default</pt:id>

<pt:property>

<pt:ref>uid</pt:ref>

<pt:updatability>read</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>profileType</pt:ref>

<pt:updatability>read</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>tenantId</pt:ref>

<pt:updatability>read</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>guid</pt:ref>

<pt:updatability>read</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>surname</pt:ref>

<pt:updatability>read</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>key</pt:ref>

<pt:updatability>read</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>groupwareEmail</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>faxNumber</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>ipTelephoneNumber</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>officeName</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>bldgId</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>experience</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>mobileNumber</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>pagerNumber</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>floor</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>displayName</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>blogUrl</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>telephoneNumber</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>jobResp</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>profileLinks</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>secretaryUid</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>timezone</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>email</pt:ref>

<pt:updatability>read</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

<pt:property>

<pt:ref>description</pt:ref>

<pt:updatability>readwrite</pt:updatability>

<pt:hidden>false</pt:hidden>

</pt:property>

</pt:type>

The following example illustrates how to retrieve the profile type for an authenticated user.
GET https://example.com/profiles/atom/profileType.do   (user must be logged in)

Response returned by the server
<?xml version="1.0" encoding="UTF-8"?>

<pt:type xmlns:pt="http://www.ibm.com/profiles-types">

... caller's profile type ...

</pt:type>