Home

 

Get a person's user ID in Activities

One of the parameters you can use to search activities is by a person's user ID. In fact, use this parameter instead of a person's e-mail address in configurations in which e-mail addresses are prevented from being displayed. But, how do you get a person's user ID?


If you have the Profiles installed, the quickest way to get a person's user ID is to perform a profiles search by name. The feed that is returned contains one entry for each person in the that has that name. The entry identifies the user ID of the person in the <snx:userid> element. To perform a search of profiles by name, use the following resource:

See Searching Profiles for more information.


If you do not have Profiles installed or cannot access Profiles data programmatically, you can also retrieve a person's user ID from the member list of an activity that you share with the person. To do so...

  1. Get the href of the activity that you share with the person by retrieving all of your activities. Use the following resource to retrieve the activities in your My Activities view:

      <activities_server>/service/atom2/activities
      

    If you can add a parameter to narrow down the results but still return the activity that you share with the person and to which she has contributed an entry, add it to narrow the search. For more information, see Searching the My Activities view.

  2. In the feed returned, find the activity that you and the person share in common. Retrieve the member list of that activity by sending a GET request to the Web address specified in the href attribute of the <link> element that has the rel="http://www.ibm.com/xmlns/prod/sn/member-list" attribute value.

  3. From the content returned, find the entry that contains the person's name. The person's user ID is specified in the associated <snx:userid> element.


Get Activities feeds

 

Related reference


Searching Profiles

Searching the My Activities view


+

Search Tips   |   Advanced Search