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 email address in configurations in which email addresses are prevented from being displayed. But, how do you get a person's user ID?


Before you begin

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 directory 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:

<profiles_server>/atom/search.do?name=<Last Name or First Name>

See Search Profiles for more information.


About this task

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...


Procedure

  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 Search 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.


Parent topic

Getting Activities feeds

Related reference
Search Profiles programmatically
Search the My Activities view


   

 

});