Typeahead people API
Added by IBM contributorAnna G O'Neal | Edited by IBM contributorAlex Leiskau on February 19, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars1 comment

Retrieve information about users, contacts, and communities based on search terms and the display them in a paginated list. Authentication occurs on the IBM SmartCloud™ server.



Retrieve information about users, contacts, and communities based on search terms and the display them in a paginated list. Authentication occurs on the IBM Connections Cloud™ server.

Table 1. API details
Method
Resource address
Output representation
GET or POST
Format 1: https://apps.lotuslive.com/contacts/typeahead/people/<qualifier>/<intent>?search_text=<searchText>
JavaScript™ Object Notation (JSON)
GET or POST
Format 2: https://apps.lotuslive.com/contacts/typeahead/people?contacts=true&users=true&groups=true&search_text=<searchText>&intent=<intent>
JSON


Use the following input parameters:

Table 2. Input parameters
Parameter
Description
qualifier
  • all: Retrieve users, communities, and contacts that match. Example URL: https://apps.lotuslive.com/contacts/typeahead/people/all.
  • users: Retrieve only users that match. Example URL: https://apps.lotuslive.com/contacts/typeahead/people/users.
  • contacts: Retrieve only contacts that match. Example URL: https://apps.lotuslive.com/contacts/typeahead/people/contacts.
  • groups: Alias for all.
  • communities: Retrieve communities with title matches. This call wraps the curl call to the Communities API:/service/opensocial/groups/@me. Example URL: https://apps.lotuslive.com/contacts/typeahead/people/communities.

intent
  • external: default value
  • Show personal contacts.
  • Users from caller's company and network contacts.
  • All communities the caller is a member of.
  • Example URL: https://apps.lotuslive.com/contacts/typeahead/people/all?intent=external.
  • internal: Only get same company users, internal communities, skip contacts.
  • Skip contacts.
  • Users from caller's company, skip network contacts.
  • For communities, internal communities the caller is a member of.
  • Example URL: https://apps.lotuslive.com/contacts/typeahead/people/all?intent=internal.

search_text
A string value that represents the key word to filter query results. Example URL: https://apps.lotuslive.com/contacts/typeahead/people/all?search_text=jing.
max_results
Maximum items to return. The default is no limit.
contacts
Value is true or false. If true, contacts are displayed in the list. Example URL: https://apps.lotuslive.com/contacts/typeahead/people?contacts=true&users=true&groups=true.
users
Value is true or false. If true, users are displayed in the list. Example URL: https://apps.lotuslive.com/contacts/typeahead/people?contacts=true&users=true&groups=true.
groups
Value is true or false. If true, communities are displayed in the list. Example URL: https://apps.lotuslive.com/contacts/typeahead/people?contacts=true&users=true&groups=true.


Inputs

URL parameters.

Outputs

The typeahead list is returned in JSON format.

Response codes

200
The response is successful.
Examples

URL: https://apps.lotuslive.com/contacts/typeahead/people/users/internal?search_text=pe

The JSON response successfully returned the typeahead list:

{"numRows":2,
"identifier":"i",
"items": [
	{
	"i":"u_30085342",
	"e":"percent%@bluebox.lotus.com",
	"f":"Percent Tester",
	"j":"FVT Tester",
	"p":"\/contacts\/img\/miniProfile.gif",
	"c":"LLC Communities(Updated)",
	"o":"30068710"
	},
	{
	"i":"u_30085339",
	"e":"period.tester@bluebox.lotus.com",
	"f":"Period Tester",
	"j":"Job Title",
	"p":"\/contacts\/img\/miniProfile.gif",
	"c":"LLC Communities(Updated)",
	"o":"30068710"
	}
]
}

Philippe Riand commented on Jun 25, 2016

Re: Typeahead people API

The File UI uses typeahead with the following URL:

https://apps.na.collabserv.com/contacts/typeahead/people?token=cdb208eef932cd12f56f267455b27b08&users=true&internal=false&communities=false&intent=external&contacts=true&search_text=may

It looks like some parameters are not documented.