Changes

stoney core: Search Resource Mapping (REST - LDAP)

851 bytes added, 15:28, 14 May 2014
/* Global Search Response Object (stoney core: Resellers Resource) */
* localityName (localityName)
=== Sequence ====The following sequence describes the resellers search. ==== Search for the entered string ====We presume, that the entered string is '''res''' (scope is one):# <codepre>ldapsearch -H ldaps://ldapm.tombstonestoney-cloud.ch org \
-b "ou=reseller,dc=stoney-cloud,dc=org" \
-s one \
-W -x -LLL \
"(|(uid=*res*)(organizationName=*res*))" uid sstIsCompany sstIsActive organizationName</code>
<pre>
A possible answer could look as follows:
<pre>
dn: uid=4000000,ou=reseller,dc=stoney-cloud,dc=org
uid: 4000000
o: Reseller Ltd.
sstIsCompany: TRUE
sstIsActive: TRUE
</pre>
 
==== Create a second search for each result ====
As some of the attributes we're interested in are in the address sub tree, we need to execute a second search (scope is base):
<pre>
ldapsearch -H ldaps://ldapm.stoney-cloud.org \
-b "ou=address,uid=4000000,ou=reseller,dc=stoney-cloud,dc=org" \
-s base \
-D "cn=Manager,dc=stoney-cloud,dc=org" \
-W -x -LLL \
"(objectclass=*)" countryName postalCode localityName
</pre>
<pre>
dn: ou=address,uid=4000000,ou=reseller,dc=stoney-cloud,dc=org
c: CH
postalCode: Postal Code
l: Locality
</pre>
=== Global Search Response Object (stoney core: Resellers Resource) Mapping ===
SLB, editor, reviewer
3,376
edits