Home
Retrieving the Profiles service document
The first step perform if you plan to update resources made available through the Atom APIs is to retrieve the service document for the feature.
The Profiles feature provides a service document for each person with a profile. The service document defines a single workspace containing one collection. The collection address provides a reference to the feed of the user's profile. It also defines the profile fields that can be updated with the snx:editableFields element.
Atom API request details
Method Resource URI Description GET Service Document /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. GET Service Document /atom/profileService.do?userid={snx:userid} Retrieves the Profiles service document for the user specified by the user ID. GET Service Document /atom/profileService.do?email={emailaddress} Retrieves the Profiles service document for the user specified by the e-mail address. Format the HTTP request using the proper URL encoding. For example, the encoded form of the @ symbol is %40. Do not use this email parameter option if Lotus Connections is configured to prevent e-mail addresses from being displayed.
Example
To retrieve the service document for the Profiles feature, send the following HTTP request:> GET /profiles/atom/profileService.do?userid=5b788f40-7d67-102c-845c-e2ebc3ec5536 HTTP/1.1 > Authorization: Basic ... > Host: enterprise.acme.com:9447 > Accept: */*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"> Lotus Connections - Profiles </generator> <workspace> <title xmlns="http://www.w3.org/2005/Atom" type="text">Amy Lark</title> <collection href="https://enterprise.acme.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.acme.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.acme.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.acme.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.acme.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.acme.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.acme.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.acme.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.acme.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.acme.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.acme.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.acme.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.acme.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.acme.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>
Related tasks