CSV Web service directories

The data returned by the Web service must have the same format than the file directory. In the same way, you will be able to choose the headers and the separator in the next step.

This directory type matches the CSV web service backend in xivo-dird.

For web service directories, the Direct match and the Match reverse directories must be filled with the name of the HTTP query parameter that will be used when doing the HTTP requests.

Note that the CSV returned by the Web service is not further processed.

Available fields

Available fields are the ones contained in the CSV result.

Example

http://example.org:8000/ws-phonebook return csv:

title|firstname|lastname|displayname|society|phone|email
mr|Emmett|Brown|Brown Emmett|DMC|5555551234|emmet.brown@dmc.example.com
ms|Alice|Wonderland|Wonderland Alice|DMC|5555551235|alice.wonderland@dmc.example.com

Adding a source

../../_images/xivo_add_directory_csv_web_service.png

Configuration ‣ Management ‣ Directories

Configuring source access

Given you have the following directory definition:

  • Direct match : search
  • Match reverse directories : phonesearch

When a direct lookup for “Alice” is performed, then the following HTTP request:

GET /ws-phonebook?search=Alice HTTP/1.1

is emitted. When a reverse lookup for “5555551234” is performed, then the following HTTP request:

GET /ws-phonebook?phonesearch=5555551234 HTTP/1.1

is emitted.

../../_images/xivo_configure_directory_csv_web_service.png

Services ‣ CTI Server ‣ Directories ‣ Definitions