Community articleRetrieving the Profiles service document
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

The first step you must perform if you plan to update resources made available through the Atom APIs is to retrieve the service document for the application.



The first step you must perform if you plan to update resources made available through the Atom APIs is to retrieve the service document for the application.

The Profiles application provides a service document for each person with a profile. The service document defines a single workspace containing one collection. The Web address in the href attribute of the collection provides a reference to the feed of the user's profile.

The collection contains an <snx:editableFields> element that lists the profile fields that can be edited. You cannot programmatically change which fields can be edited; that can only be done using wsadmin commands. See Customizing the Profiles user interface for more details. However, you can change the values stored in the editable fields for a profile. There are two types of editable fields. Go to the referenced topics for more information about how to edit each type:


  • Default fields provided in all profiles: See Updating profile entries.
  • Custom fields added by an administrator as extensions. You can identify these fields by the extattr. prefix included in their name. See Updating profile extension data.

See Updating profile entries for more details.

 

Retrieving a user's service document is supported in three ways:

  • Authenticate using the user's credentials
  • Use the email parameters (available only in deployments where emails addresses are exposed).
  • Use the user's user id.


 

Input
Method URI Description
GET /profiles/atom/profileService.do Retrieves the Profiles service document for the user whose credentials are used to authenticate the request.
Tip: Use this URI to discover the name and other profile information of the currently authenticated user.
Name Type Optional Description
email
string Yes Returns all profiles that contain a matching Internet email address. Format the HTTP request using the correct URL encoding. For example, the encoded form of the at sign (@) is %40 as in: adam_eventide%40example.com Note: Do not use this parameter if IBM® Connections is configured to prevent email addresses from being displayed because it returns an error.
userId
string Yes Unique ID that represents a specific person. The user ID is stored in the div element that has the x-lconn-userid class attribute.
Output
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.
Examples
To retrieve the service document for the Profiles application
> GET /profiles/atom/profileService.do?userid=5b788f40-7d67-102c-845c-e2ebc3ec5536

	HTTP/1.1

	> Authorization: Basic ...

	> Host: enterprise.example.com:9447

	> Accept: */*


Response returned by the server
The HTTP response would look as follows:

< HTTP/1.1 200 OK

	< Content-Type: application/atomsvc+xml; charset=UTF-8

	< Content-Language: en-US

	< Set-Cookie: JSESSIONID=xxx

	< Transfer-Encoding: chunked

	< Date: Tue, 26 Feb 2008 18:36:55 GMT

	< Server: WebSphere Application Server/6.1

	< Expires: Thu, 01 Dec 1994 16:00:00 GMT

	< Cache-Control: no-cache="set-cookie, set-cookie2"  

The service document for Profiles is returned by the server. For example:

<service xmlns="http://www.w3.org/2007/app">

	<generator

	xmlns="http://www.w3.org/2005/Atom"

	version="2.5"

	uri="http://www.ibm.com/xmlns/prod/sn">

	IBM Connections - Profiles

	</generator>

	<workspace>

	<title xmlns="http://www.w3.org/2005/Atom" type="text">Amy Lark</title>

	<collection

	href="https://enterprise.example.com:9447/profiles/atom/profile.do?userid=

	5b788f40-7d67-102c-845c-e2ebc3ec5536&output=vcard">

	<title xmlns="http://www.w3.org/2005/Atom" type="text">Amy Lark</title>

	<userid xmlns="http://www.ibm.com/xmlns/prod/sn">

	5b788f40-7d67-102c-845c-e2ebc3ec5536

	</userid>

	<editableFields xmlns="http://www.ibm.com/xmlns/prod/sn">

	<editableField name="description" />

	<editableField name="timezone" />

	<editableField name="secretaryUid" />

	<editableField name="jobResp" />

	<editableField name="telephoneNumber" />

	<editableField name="blogUrl" />

	<editableField name="extattr.profileLinks" />

	<editableField name="floor" />

	<editableField name="pagerNumber" />

	<editableField name="mobileNumber" />

	<editableField name="experience" />

	<editableField name="bldgId" />

	<editableField name="officeName" />

	<editableField name="ipTelephoneNumber" />

	<editableField name="faxNumber" />

	<editableField name="groupwareEmail" />

	</editableFields>

	</collection>

	<link

	xmlns="http://www.w3.org/2005/Atom"

	href="https://enterprise.example.com:9447/profiles/atom/profileTags.do?

	targetKey=25714807-bf87-4454-901a-0a35302adc80&lastMod=1248367321125"

	rel="http://www.ibm.com/xmlns/prod/sn/tag-cloud"

	type="application/atomcat+xml" />

	<link

	xmlns="http://www.w3.org/2005/Atom"

	href="https://enterprise.example.com:9447/profiles/atom/mv/theboard/entries.do?

	key=25714807-bf87-4454-901a-0a35302adc80&lastMod=1248367321125"

	rel="http://www.ibm.com/xmlns/prod/sn/mv/theboard"

	type="application/atom+xml" />

	<link

	xmlns="http://www.w3.org/2005/Atom"

	href="https://enterprise.example.com:9447/profiles/atom/mv/theboard/entry/

	status.do?key=25714807-bf87-4454-901a-0a35302adc80"

	rel="http://www.ibm.com/xmlns/prod/sn/status"

	type="application/atom+xml" />

	<link

	xmlns="http://www.w3.org/2005/Atom"

	href="https://enterprise.example.com:9447/profiles/atom/connections.do?

	connectionType=colleague&key=25714807-bf87-4454-901a-0a35302adc80&

	lastMod=1248367321125"

	rel="http://www.ibm.com/xmlns/prod/sn/connections/colleague"

	type="application/atom+xml" />

	<link

	xmlns="http://www.w3.org/2005/Atom"

	href="https://enterprise.example.com:9447/profiles/atom/reportingChain.do?

	key=25714807-bf87-4454-901a-0a35302adc80"

	rel="http://www.ibm.com/xmlns/prod/sn/reporting-chain"

	type="application/atom+xml" />

	<link

	xmlns="http://www.w3.org/2005/Atom"

	href="https://enterprise.example.com:9447/profiles/atom/profileExtension.do?

	key=25714807-bf87-4454-901a-0a35302adc80&extensionId=profileLinks&

	lastMod=1248367321125"

	rel="http://www.ibm.com/xmlns/prod/sn/ext-attr"

	type="text/xml"

	xmlns:snx="http://www.ibm.com/xmlns/prod/sn"

	snx:extensionId="profileLinks" />

	<link

	xmlns="http://www.w3.org/2005/Atom"

	href="https://enterprise.example.com:9443/activities/service/html/mainpage#

	dashboard%2Cmyactivities%2Cuserid%3D5b788f40-7d67-102c-845c-e2ebc3ec5536%

	2Cname%3DAmy Lark"

	rel="http://www.ibm.com/xmlns/prod/sn/service/activities"

	type="text/html" />

	<link

	xmlns="http://www.w3.org/2005/Atom"

	href="https://enterprise.example.com:9447/profiles/html/simpleSearch.do?

	searchFor=5b788f40-7d67-102c-845c-e2ebc3ec5536&searchBy=userid"

	rel="http://www.ibm.com/xmlns/prod/sn/service/profiles"

	type="text/html" />

	<link

	xmlns="http://www.w3.org/2005/Atom"

	href="https://enterprise.example.com:9446/dogear/html?userid=5b788f40-7d67-

	102c-845c-e2ebc3ec5536"

	rel="http://www.ibm.com/xmlns/prod/sn/service/dogear"

	type="text/html" />

	<link

	xmlns="http://www.w3.org/2005/Atom"

	href="https://enterprise.example.com:9445/communities/service/html/

	allcommunities?userid=5b788f40-7d67-102c-845c-e2ebc3ec5536"

	rel="http://www.ibm.com/xmlns/prod/sn/service/communities"

	type="text/html" />

	<link

	xmlns="http://www.w3.org/2005/Atom"

	href="https://enterprise.example.com:9451/files/app/person/5b788f40-7d67-

	102c-845c-e2ebc3ec5536"

	rel="http://www.ibm.com/xmlns/prod/sn/service/files"

	type="text/html" />

	<link

	xmlns="http://www.w3.org/2005/Atom"

	href="https://enterprise.example.com:9451/wikis/home/search?uid=5b788f40-

	7d67-102c-845c-e2ebc3ec5536&name=Amy Lark"

	rel="http://www.ibm.com/xmlns/prod/sn/service/wikis"

	type="text/html" />

	<link

	xmlns="http://www.w3.org/2005/Atom"

	href="https://enterprise.example.com:9444/blogs/roller-ui/blog/5b788f40-7d67-

	102c-845c-e2ebc3ec5536"

	rel="http://www.ibm.com/xmlns/prod/sn/service/blogs"

	type="text/html" />

	</workspace>

	</service>