Retrieve 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 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 Customize 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:

See Update profile entries for more details.

Table 1. 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 email address.

Note: 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 IBM Connections is configured to prevent email addresses from being displayed.


Returned HTTP headers

HTTP/1.1 200 OK: Indicates that the request was received successfully.

Error codes


Example

To retrieve the service document for the Profiles application, send the following HTTP request:

> GET /profiles/atom/profileService.do?userid=5b788f40-7d67-102c-845c-e2ebc3ec5536 
HTTP/1.1
> Authorization: Basic ...
> Host: enterprise.example.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: WAS/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>


Parent topic

Profiles API

Related concepts
Add custom extension attributes for Profiles


Related tasks


Authenticating requests
Customize the Profiles user interface

Related reference
Update profile entries
Update profile extension data


   

 

});