SOAP API - executeLdapQuery

The table summarizes the SOAP API - executeLdapQuery.

Request Uses the executeLdapQuery element (from the DirectoryService schema)
Parameter notes
  • ldap-alias: 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 .
  • base-dn: 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.
  • bookmark: only applicable when "paging" the results (that is, when the page-size parameter is passed). This parameter is not passed in the first call to get paged results; it is obtained from the response to the first call, then passed in subsequent calls to get additional pages of results.
  • ldap-query: the query to be evaluated.
  • page-size: limits the number of DNs returned to the number specified. If not specified, all results are returned.

    Note - The LDAP server may impose its own page-size limit. If you specify a number in this parameter that is larger than a size limit specified on the LDAP server (which is commonly 1000), the LDAP server limit takes precedence.

Response Returns an executeLdapQueryResponse element (from the DirectoryService schema). Contains the collection of fully Distinguished Names (DNs) resolved by the given LDAP query.
  • bookmark: this value is returned in the response when page-size is included in the request. The bookmark value is passed in subsequent requests for paged results. If the bookmark returns empty in the response, it means the end of the result set has been reached.
  • estimated-size: this is returned in the response to provide an estimated number of DNs that satisfy the query. This is returned only from paged requests, and only after the first request. Also note that this is not supported by all LDAP servers (the Apache LDAP server does not support it); when not supported, it returns 0.
Example

First Request Using Paging

Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dir="http://directory.api.de.bpm.tibco.com">
   <soapenv:Header/>
   <soapenv:Body>
      <dir:executeLdapQuery base-dn="OU=employees" ldap-alias="deLdap5" ldap-query="(objectClass=organizationalPerson)" page-size="20" />
   </soapenv:Body>
</soapenv:Envelope>
Response:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <executeLdapQueryResponse bookmark="ZxQh1g==" estimated-size="0" ldap-alias="deLdap5" ldap-query="(objectClass=organizationalPerson)" xmlns="http://directory.api.de.bpm.tibco.com">
         <ldap-entry ldap-dn="UID=acresswell, OU=employees, O=goCarInsuranceHeadOffice" xmlns=""/>
         <ldap-entry ldap-dn="UID=adownes, OU=employees, O=goCarInsuranceHeadOffice" xmlns=""/>
         <ldap-entry ldap-dn="UID=ahardy, OU=employees, O=goCarInsuranceHeadOffice" xmlns=""/>
         <ldap-entry ldap-dn="UID=ahughes, OU=employees,
    .
    .
    .
O=goCarInsuranceHeadOffice" xmlns=""/>
         <ldap-entry ldap-dn="UID=ajones, OU=employees, O=goCarInsuranceHeadOffice" xmlns=""/>
         <ldap-entry ldap-dn="UID=amcneill, OU=employees, O=goCarInsuranceHeadOffice" xmlns=""/>
         <ldap-entry ldap-dn="UID=amiller, OU=employees, O=goCarInsuranceHeadOffice" xmlns=""/>
      </executeLdapQueryResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Example

Next Call to Get Paged Results (using bookmark parameter)

Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dir="http://directory.api.de.bpm.tibco.com">
   <soapenv:Header/>
   <soapenv:Body>
      <dir:executeLdapQuery base-dn="OU=employees" bookmark="ZxQh1g==" ldap-alias="deLdap5" ldap-query="(objectClass=organizationalPerson)" page-size="20" />
   </soapenv:Body>
</soapenv:Envelope>
Response:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <executeLdapQueryResponse base-dn="OU=employees" bookmark="ZxQh1g==" estimated-size="0" ldap-alias="deLdap5" ldap-query="(objectClass=organizationalPerson)" xmlns="http://directory.api.de.bpm.tibco.com">
         <ldap-entry ldap-dn="UID=aobrien, OU=employees, O=goCarInsuranceHeadOffice" xmlns=""/>
         <ldap-entry ldap-dn="UID=aohare, OU=employees, O=goCarInsuranceHeadOffice" xmlns=""/>
         <ldap-entry ldap-dn="UID=astarling, OU=employees, O=goCarInsuranceHeadOffice" xmlns=""/>
         <ldap-entry ldap-dn="UID=astewart, OU=employees, O=goCarInsuranceHeadOffice" xmlns=""/>
         <ldap-entry ldap-dn="UID=asweeney, OU=employees,
    .
    .
    .
O=goCarInsuranceHeadOffice" xmlns=""/>
         <ldap-entry ldap-dn="UID=asmithies, OU=employees, O=goCarInsuranceHeadOffice" xmlns=""/>
         <ldap-entry ldap-dn="UID=alythgoe, OU=employees, O=goCarInsuranceHeadOffice" xmlns=""/>
         <ldap-entry ldap-dn="UID=anewbold, OU=employees, O=goCarInsuranceHeadOffice" xmlns=""/>
         <ldap-entry ldap-dn="UID=awhittingham, OU=employees, O=goCarInsuranceHeadOffice" xmlns=""/>
      </executeLdapQueryResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>