Windows Live Contacts API Methods: PUT

Started by thiruvasagamani, Jan 22, 2009, 04:13 PM

Previous topic - Next topic

thiruvasagamani

Windows Live Contacts API Methods: PUT

The HTTP/1.1 PUT method request is used to update values under the Uniform Resource Indicator (URI) with values that are supplied at the level of the URI. When successful, the response code is the "204 No Content" status code, and no content is returned.


To enable partial updates and changes to the schema, a PUT request does not completely replace all elements in the schema available at the URI supplied. Instead, the PUT request updates only those elements in the schema that are actually supplied in the request.

For XML data formats, a PUT request requires that a fully formed XML document is supplied in the body of the request. The parent elements must always be supplied, even if the PUT request is only used to update one element. If only one element is being updated, the URI can be either the exact field being updated or the parent URI.

A PUT request can be used to update elements and containers that are children of the URI that is supplied. However, the elements and containers cannot be peers of the URI that is supplied

A URI that identifies a single contact by ID cannot be used to update multiple Contact containers in a single call. Hierarchy updates are not currently supported. If child objects are supplied, then their respective IDs must also be supplied in the PUT request body to identify those child objects.

Windows Live Contacts does not treat a PUT request as an update of the ID. Instead, the PUT request is treated as an identification of the child object that is being updated. If the ID is invalid, the update fails, and a new Contact container is not created. The URI contains the parent ID for the update.
Thiruvasakamani Karnan