Skip to end of metadata
Go to start of metadata

About

IBM Connections 4 allows to retrieve a feed that contains a specific user's profile. Here's one easy way to do it with an asynchronous HTTP (Ajax) request using jQuery.

IBM Connections 4 documentation link:  Searching for a user's profile

Atom API Request Details

Headers

Content-Type: application/atom+xml;charset=UTF-8
TypeGET
URL

{host}/profiles/atom/profile.do?userid={user-id}

Example:

https://www.mysite.com/profiles/atom/profile.do?userid=06EB0-81-41-10-91E97B

Response Status Code: 200 OK
Example using jQuery

 

$.ajax({
    url : "https://www.mysite.com/profiles/atom/profile.do?userid=06EB0-81-41-10-91E97B",
    type : "GET",
    contentType: "application/atom+xml;charset=UTF-8",
    async : true,
    statusCode : {        
        200 : function(xml) {
            console.log('info');
        }
    },
    error: function(jqXHR, textStatus, errorThrown) {
        console.log(jqXHR + " - " + textStatus + ' - ' + errorThrown);
    }
});

Note:  console.log can throw errors in IE, they are there for illustrative purposes only and should be changed as required.

 

Example Response


 

<?xml version="1.0" encoding="UTF-8"?>
    <feed xmlns:app="http://www.w3.org/2007/app" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:fh="http://purl.org/syndication/history/1.0" xmlns:snx="http://www.ibm.com/xmlns/prod/sn" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns="http://www.w3.org/2005/Atom">
    <id>tag:profiles.ibm.com,2006:feed</id>
    <generator version="4.0.0.0" uri="http://www.ibm.com/xmlns/prod/sn">IBM Connections - Profiles</generator>
    <title type="text">profile with userid B052-22-4B-BE-1C4B18</title>
    <author>
    <name>IBM Connections - Profiles</name>
    </author>
    <updated>2013-05-06T02:29:39.064Z</updated>
    <fh:complete>
    </fh:complete>
    <link href="http://www.mysite.com/profiles/atom/profileTags.do?targetKey=89f46-18-411-98e-181845e&amp;lastMod=1363935881739" rel="http://www.ibm.com/xmlns/prod/sn/tag-cloud" type="application/atomcat+xml">
    </link>
    <link href="http://www.mysite.com/profiles/atom/mv/theboard/entries.do?key=89f46-18-411-98e-181845e&amp;lastMod=1363935881739" rel="http://www.ibm.com/xmlns/prod/sn/mv/theboard" type="application/atom+xml">
    </link>
    <link href="http://www.mysite.com/profiles/atom/mv/theboard/entry/status.do?key=89f46-18-411-98e-181845e" rel="http://www.ibm.com/xmlns/prod/sn/status" type="application/atom+xml">
    </link>
    <link href="http://www.mysite.com/profiles/atom/connections.do?connectionType=colleague&amp;key=89f46-18-411-98e-181845e&amp;lastMod=1363935881739" rel="http://www.ibm.com/xmlns/prod/sn/connections/colleague" type="application/atom+xml">
    </link>
    <link href="http://www.mysite.com/profiles/atom/reportingChain.do?key=89f46-18-411-98e-181845e" rel="http://www.ibm.com/xmlns/prod/sn/reporting-chain" type="application/atom+xml">
    </link>
    <link href="http://www.mysite.com/profiles/atom/profileType.do?type=default" rel="http://www.ibm.com/xmlns/prod/sn/profile-type" type="application/profile-type+xml">
    </link>
    <link href="http://www.mysite.com/profiles/atom/profileExtension.do?key=89f46-18-411-98e-181845e&amp;extensionId=profileLinks&amp;lastMod=1363935881739" rel="http://www.ibm.com/xmlns/prod/sn/ext-attr" type="text/xml" snx:extensionId="profileLinks" xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
    </link>
    <link href="http://www.mysite.com/profiles/atom/profile.do?userid=B052-22-4B-BE-1C4B18" rel="self" type="application/atom+xml">
    </link>
    <entry>
    <id>tag:profiles.ibm.com,2006:entry89f46-18-411-98e-181845e</id>
    <title type="text">Joaquin</title>
    <updated>2013-03-22T07:04:41.739Z</updated>
    <category term="profile" scheme="http://www.ibm.com/xmlns/prod/sn/type">
    </category>
    <contributor>
    <name>Joaquin</name>
    <snx:userid>B052-22-4B-BE-1C4B18</snx:userid>
    <email>mail@mail.com</email>
    <snx:userState>active</snx:userState>
    </contributor>
    <link href="http://www.mysite.com/profiles/atom/profileEntry.do?key=89f46-18-411-98e-181845e" rel="self" type="application/atom+xml">
    </link>
    <link href="http://www.mysite.com/profiles/atom/profileType.do?type=default" rel="http://www.ibm.com/xmlns/prod/sn/profile-type" type="application/profile-type+xml">
    </link>
    <link href="http://www.mysite.com/profiles/html/profileView.do?key=89f46-18-411-98e-181845e" rel="related" type="text/html">
    </link>
    <link href="http://www.mysite.com/profiles/photo.do?key=89f46-18-411-98e-181845e&amp;lastMod=1363935881739" rel="http://www.ibm.com/xmlns/prod/sn/image" type="image">
    </link>
    <link href="http://www.mysite.com/profiles/audio.do?key=89f46-18-411-98e-181845e&amp;lastMod=1363935881739" rel="http://www.ibm.com/xmlns/prod/sn/pronunciation" type="audio">
    </link>
    <link href="http://www.mysite.com/profiles/vcard/profile.do?key=89f46-18-411-98e-181845e" rel="alternate" type="text/directory">
    </link>
    <summary type="text">Profile information for Joaquin</summary>
    <content type="xhtml">
    <sp_0:div xmlns="http://www.w3.org/1999/xhtml" xmlns:sp_0="http://www.w3.org/1999/xhtml">
    <span class="vcard">
    <div>
    <img src="http://www.mysite.com/profiles/photo.do?key=89f46-18-411-98e-181845e&amp;lastMod=1363935881739" class="photo">
    </img>
    </div>
    <div>
    <a class="fn url" href="http://www.mysite.com/profiles/atom/profile.do?key=89f46-18-411-98e-181845e">Joaquin</a>
    </div>
    <div>
    <a class="sound url" href="http://www.mysite.com/profiles/audio.do?key=89f46-18-411-98e-181845e&amp;lastMod=1363935881739">Pronunciation</a>
    </div>
    <div>
    <a class="email" href="mailto:mail@mail.com">mail@mail.com</a>
    </div>
    <div class="x-groupwareMail" style="display:none">
    </div>
    <div class="org">
    <span class="organization-unit">
    </span>
    </div>
    <div class="role">
    </div>
    <div class="title">
    </div>
    <div class="adr work postal">
    <div class="x-country-code" style="display:none">6</div>
    </div>
    <div class="x-office">
    <span class="x-building">
    </span>
    <span class="x-floor">
    </span>
    <span class="x-office-number">
    </span>
    </div>
    <div class="tel">
    <abbr class="type" title="work">Work:</abbr>
    <span class="value">
    </span>
    </div>
    <div class="x-manager-uid" style="display:none">
    </div>
    <div class="x-is-manager" style="display:none">N</div>
    <div class="x-profile-key">89f46-18-411-98e-181845e</div>
    <div class="uid">B052-22-4B-BE-1C4B18</div>
    <div class="x-profile-uid">user-id</div>
    <div class="x-lconn-userid">B052-22-4B-BE-1C4B18</div>
    <div class="rev" style="display:none">2013-03-22T07:04:41.739Z</div>
    <div class="x-profile-type" style="display:none">default</div>
    </span>
    </sp_0:div>
    </content>
    </entry>
</feed>

 

About the author

Enterprise Web Developer
Joaquin is an Enterprise Web Developer at Base22 with over seven years of experience designing and developing web solutions for enterprise clients. He is a well rounded web developer with skills building interfaces in IBM WebSphere Portal and WCM, IBM Connections, and many others. He is an Oracle Certified Java Developer and a Microsoft Certified Visual Studio Developer. He blogs at http://j-arellano.com