SEARCH Method

Topic Last Modified: 2006-06-13

The WebDAV SEARCH method is used to search an Exchange store for resources.

Note

See Authentication and Security Using WebDAV for more information.

The list of WebDAV Protocol Status Codes in the following table is not comprehensive. For information about 500-level status codes, see WebDAV Status Codes: 500s.

Status Codes

Status Code Meaning

207 (Multi-Status)

Multiple response codes to be found in XML body.

Example

The following example illustrates a WebDAV SEARCH method.

Request

SEARCH /vroot/folder/ HTTP/1.1
Content-Type: text/xml
Content-Length: XXX
Host: server.tld
...

<?xml version="1.0"?>
<D:searchrequest xmlns:D = "DAV:">
   <D:sql>
   SELECT "DAV:contentclass", "DAV:displayname"
   FROM "/vroot/folder/"
   WHERE "DAV:ishidden" = false
     AND "DAV:isfolder" = false
   </D:sql>
</D:searchrequest>

Response

SEARCH /vroot/folder/ HTTP/1.1
HTTP/1.1 207 Multi-Status
Server: Microsoft-IIS/5.0
Date: Thu, 09 Mar 2000 06:36:40 GMT
WWW-Authenticate: Negotiate XXXX
Content-Type: text/xmlAccept-Ranges: rowsTransfer-Encoding: chunked
<?xml version="1.0"?><a:multistatus xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/" xmlns:a="DAV:">
 <a:response>
   <a:href>http://server.tld/vroot/folder/item2.txt</a:href>
   <a:propstat>
     <a:status>HTTP/1.1 200 OK</a:status>
     <a:prop>
         <a:contentclass>urn:content-classes:document</a:contentclass>
         <a:displayname>item2.txt</a:displayname>
      </a:prop>
   </a:propstat>
 </a:response>
 <a:response>
   <a:href>http://server.tld/vroot/folder/item1.txt</a:href>
   <a:propstat>
     <a:status>HTTP/1.1 200 OK</a:status>
     <a:prop>
        <a:contentclass>urn:content-classes:document</a:contentclass>
        <a:displayname>item1.txt</a:displayname>
     </a:prop>
   </a:propstat>
 </a:response>
</a:multistatus>