REST API - executeLargeLdapQuery

The table summarizes the REST API - executeLargeLdapQuery.

Request

Format
POST <baseurl>/directory/query/<ldapalias>/<ldapquery>
Path parameters
  • ldapalias: the alias of the LDAP shared resource on which the query is executed. LDAP connection shared resources are named with the prefix ldap/de/ in order to indicate that they are intended for Directory Engine use. The alias given here is that name without the ldap/de/ prefix. Can be obtained from a previous call to listLdapConnections .
  • ldapquery: the query to be evaluated.
Query parameters

The scope setting is the starting point of an LDAP search and the depth from the base DN to which the search should occur. scope=SUBTREE (default), is used to search all entries at all levels under and including the specified base DN. scope=ONELEVEL is used to search all entries one level under the base DN, but not including the base DN and not including any entries under that one level under the base DN.

basedn=string (optional): the base Distinguished Name (DN) to which the query is restricted. This is relative to, and in addition to, any base DN specified in the LDAP connection shared resource's URL.
Body ldap-query (optional): the parameter from the executeLdapQuery element (from the DirectoryService schema) that defines the query to be evaluated. The query must conform to the RFC 2254 LDAP Search Filter standard.

Response

JSON Returns a JSON representation of the content of the executeLdapQueryResponse element.
XML Returns the content of the executeLdapQueryResponse element (from the DirectoryService schema).

Example

Request
POST <baseurl>/directory/query/easyAs?basedn=ou%3DLondon%2Cou%3DAllEmployees&scope=SUBTREE
Request body
(objectclass=person)
Response
{"xml-fragment": {
   "@ldap-alias": "easyAs",
   "@ldap-query": "(objectclass=person)",
   "@base-dn": "ou=London,ou=AllEmployees",
   "@search-scope": "SUBTREE",
   "ldap-entry":    [
      {"@ldap-dn": "OU=Liam Lawrence, OU=London, OU=AllEmployees, O=easyAsInsurance"},
      {"@ldap-dn": "OU=Richard Cresswell, OU=London, OU=AllEmployees, O=easyAsInsurance"},
      {"@ldap-dn": "OU=Steve Simonsen, OU=London, OU=AllEmployees, O=easyAsInsurance"},
      {"@ldap-dn": "OU=Tony Pulis, OU=London, OU=AllEmployees, O=easyAsInsurance"}
   ]
}}