Using URL Commands

URL commands get XML results from a SharePoint server through HTTP GET requests. You invoke the commands by specifying them as query strings in an address that has this form:

http://server/subsite/_vti_bin/owssvr.dll?Cmd=cmdname
&param=value&param=value ...

URL commands don't alter the content database, so they don't require authentication. The RPC protocol provides a similar approach, but uses HTTP POST instead of GET, and so can include authentication information and thus change content. Table 12-6 lists the commands that can be invoked through HTTP GET.

Table 12-6. SharePoint URL commands

Command

Parameters

Use to

dialogview

dialogview, location, FileDialogFilterValue

Open the view used in a dialog box for opening or saving files to a document library; or open the custom property form that is used when saving a file to a document library.

Display

List, XMLDATA

Run a database query against the list and return XML or HTML.

DisplayPost

PostBody, URLBase

Render the Collaborative Application Markup Language (CAML) assigned to the PostBody parameter.

ExportList

List

Export in CAML format the schema of the list.

GetProjSchema

 

Request the XML Schema for a web site.

GetUsageBlob

BlobType

Get information about web site usage.

HitCounter

Page, Image, Custom, Digits

Render a hit counter in an img element on a page.

RenderView

List, View, URLBase

Request the contents of a view for the list.

The URL commands also accept the set of optional parameters in Table 12-7 to modify the returned results.

Table 12-7. URL ...

Get Essential SharePoint 2007, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.