cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2247
Views
7
Helpful
7
Replies

LDAP syntax for GetLdapUsers - contains?

stephan.steiner
Spotlight
Spotlight

The Web GUI allows me to search for "contains", "matches" and "begins with".

Matches seems to map to "is", begins with is "beginswith", but what is contains?

7 Replies 7

amoherek
Cisco Employee
Cisco Employee

Hi Stephen,

Perhaps "matches" is an exact match, but "contains" is a match where the value can anywhere in the string.

Where in the web GUI do you see this? I could not find an example of "matches".

Thanks,

Adrienne

No idea how I got to "matches"... the dropdown in the unity admin interface lists "Begins With", "Contains" and "Is Exactly"

cucn-search.PNG

So I guess I meant "Is Exactly".

So.. what is "contains" then in the api?

Contains means the string can be found at any place in the value.

For example, let's assume these are all of the aliases for an end user in the database: sue, joe, suesmith, suejoesmith, and smithjoe.

If you search for an end user where alias contains joe, then your search results will provide the aliases joe, suejoesmith and smithjoe. It's similar to using a wildcard (*) like this: *joe*

Thanks,

Adrienne

And whats the syntax I send to the api? Can you show me the full URI you'd make to get a list of ldap users whose alias contain 'joe'?

Here's the Syntax I use to get ldap users whose alias starts with Joe:

query=(alias startswith joe)

This is if I want the user whose alias is 'Joe':

query=(alias is joe)

And now, what do I write instead of 'startswith' and 'is' if I want to have all users whose alias contains Joe?

I have verified there is no "contains" query available in the API. It is only available through the UI.

Does anyone know if "contains" has been added to the API?