Get a person's user ID in ActivitiesOne 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 beginIf 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 taskIf 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...
- 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:
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.
- 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.
- 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 topicGetting Activities feeds
Search Profiles programmatically
Search the My Activities view