Share via


WebDAV Batch Methods

WebDAV Batch Methods

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release. It is sometimes necessary to perform an action against a large set of resources, such as deleting 900 resources from a collection. Using the DELETE Method for this task would require 900 individual requests and responses. The WebDAV batch methods, the BCOPY Method, the BDELETE Method, the BMOVE Method, the BPROPFIND Method, and the BPROPPATCH Method, allow a single request to perform an operation on multiple targets. For example, the BMOVE Method allows the client to request that multiple target resources be moved to a destination collection.

Batch Requests

Each batch request specifies an operation to be performed on multiple targets. The request Uniform Resource Identifier (URI) of a batch request is a collection that defines the scope of the targets. All targets must exist within this scope.

The root element of a multi-target request body must contain a <D:target> element that defines a set of URIs to which the request is to be applied. These URIs can be relative to the request URI. For Distributed Authoring and Versioning (DAV) methods whose non-batch equivalent does not define a request body, the batch equivalent defines a text/xml request body whose root element corresponds to the DAV method name.

Batch Responses

A response to a batch request is usually in the form of a 207 (Multi-Status) response. When a status code must be returned for an entire resource, such as 404 (Not Found), a status element may be added to the response node.

If all operations produce the same successful response, the response body might be omitted, indicating that the HTTP response code applies to all targets. This convention cannot be used when the response body is used to transmit data, such as in a successful PROPFIND Method, or when the response body is necessary to show that an error, such as 404 (Not Found), applies to properties on each resource, rather than to the resources themselves.

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.