State of knowledge

March 2025
MetaDirectory 6 Enterprise

The MetaDirectory can also be integrated into other web services. To do this, it is necessary to pass search terms directly to the MetaDirectory web server.

In MetaDirectory 6 Enterprise, the search terms are transferred as URL parameters with search.json.

The procedure described here should be seen as an example and requires knowledge of configuration and administration and the corresponding authorisations.

sample

For testing, you can download the sample_search.html file and copy it to wwwroot in the meta programme directory.

Index of the data source

s=<Index of the data source>

s=0: all data sources
s=[1-n]: specific data source

e.g.: http://metadirectory/search.json?s=0&q=estos

Searchstring

q=<searchstring>

if(IsNumber(<searchstring>))
     searchNumber
else
     searchContact

IsNumber()

BOOL IsPhoneNumber(const TCHAR* szNumber)
{
    // Return TRUE, if szNumber is a valid (dialable) phone number
    // A dialable phone number is defined as follows:
    // - consists of digits (0-9)
    // - '*' and '#' may appear, but there must exist at least one digit
    // - '+' may appear once before any digit
    // - '-' may appear but there must exist at least one digit
    // - Spaces are allowed everywhere
    // - '(' and ')' are also allowed once. A ')' must follow a '('. And there must be at least one digit.
    // -'^'  introduces comment, ignore rest ...
}
CPP
e.g.: http://metadirectory/search.json?searchContact=estos


Search by database-fieldname: <field1>=<s1>&<field2>=<s2>&...

e.g.: http://metadirectory/search.json?Lastname=Neumann&Firstname=N*


Search by fieldindex: orf=<searchstring>|idx1|idx2|...|idxn

e.g.: http://metadirectory/search.json?orf=info@estos.de|28|29|30|31


search.json&q=neumann \[sample response\]

[
   {
      "c" : "DE",
      "company" : "estos GmbH",
      "databaseName" : "Active Directory",
      "databaseType" : "7",
      "department" : "Sales",
      "displayName" : "Neumann, Dirk",
      "distinguishedName" : "cn=9A7114D38A281D4CBE6039FE21B47E87,ou=Active Directory,dc=web",
      "entryIDMeta" : "QjdGRTREQzZGOUZFNzc0MEI1RTkyN0UyOTk3NU...",
      "facsimileTelephoneNumber" : "+49815136856123",
      "givenName" : "Dirk",
      "homephone" : "+49815112345x",
      "info" : "Account Manager",
      "jpegPhoto" : "contactpicture.jpg?EntryIDMeta=QjdGRTREQzZGOUZFNzc0ME...",
      "l" : "Starnberg",
      "mail" : "dirk.neumann@estos.de",
      "mobile" : "+49173123456x",
        ...
   },
   {
      "databaseName" : "Active Directory",
      "databaseType" : "7",
      "displayName" : "Neumann, Dirk",
      "distinguishedName" : "cn=374A403E962C9C4485C18CC8C8DDDBE5,ou=Active Directory,dc=web",
      "entryIDMeta" : "QjdGRTREQzZGOUZFNzc0MEI1RTkyN0UyOTk3NUQwOEUzNzRBNDAzRTk2MkM5QzQ0ODVDMThDQzhDOEREREJFNQ==",
      "givenName" : "Dirk",
      "sn" : "Neumann"
      ...
   },
   {
      "c" : "DE",
      "company" : "estos GmbH",
      "databaseName" : "Active Directory",
      "databaseType" : "7",
      "department" : "Accounting",
      "displayName" : "Neumann, Nadine",
      ...
   }
]
JS