Endpoint URLs
Endpoint URL Syntax
Access the Address Book XML/JSON API using the following URL:
The URL parameters are as follows:
Table 1.1. Endpoint URL Parameters
| Parameter | Description |
|---|---|
action
|
Specifies which Address Book API method to call. Can be searchContacts, getCategories, addContacts, or synchronize.
|
format
|
Specifies the format of the returned data. Can be xml or json. xml is the default.
|
params
|
Specifies any request parameters required by the method or the authentication scheme used. This is a sequence of key value
pairs, as follows:
|
Making the Request
GET HTTP is the recommended method for calling
searchContacts and getCategories.
POST is required for the write requests addContacts
and synchronize. The format of the POST body should match
the output format specified by the format parameter. That
is, it should be either a valid XML document or a valid JSON
structure, respectively. See Data Representation Formats below.
Developers can use the following URL request to resolve an email
address to the full name of a contact, including the YDN-specific
authentication parameters WSSID and
appid:
The above query retrieves the name of a
contact with the specified email address. The actual email address
that matched is not returned in the Response, because the query only
requests that name fields be returned.
Sample Response:
Transport Protocol
The Address Book XML/JSON API uses HTTP for transport. Communication parameters are negotiated as part of the HTTP request header mechanism, and the XML/JSON API does not influence this negotiation in any way. In particular, the server may choose to use the chunked Transfer-Encoding, and in this case the Response headers may not include a Content-Length header. Calls to the Address Book XML/JSON API should not depend on the Content-Length header being present in the Response. Also, if the HTTP headers sent by the client imply that the gzip content-encoding can be used, the server response may use this encoding. Users of libraries like curl should not need to worry about details of the HTTP protocol. A common mistake, however, is to assume that a Content-Length header will be present in the Response, which is not guaranteed.
Request Content-Type
POST requests to the Address Book XML/JSON API require a
Content-Type HTTP request header that matches the format
specified using the format URL parameter. The following
table shows this mapping.

