This documentation is archived and is not being maintained.

Using the URL Protocol

SharePoint Team Services 1.1

Using the URL Protocol

There are two ways to use URL protocol to send commands to a server running SharePoint Team Services from Microsoft. You can send single methods and parameters by embedding them in a URL, or you can use CAML batch functionality to send multiple requests per transaction. The following table lists commands and parameters that can be used and that have corresponding methods in the RPC protocol. For more information, click the command to see the related RPC method topic.

Command (Cmd=)DescriptionParameters
DeleteFieldDeletes a field from a list.ID, Scope, Field, owshiddenversion
DisplayRuns a database query and returns XML or HTML.ID, Scope, XMLDATA
DisplayPostRenders the CAML assigned to the PostBody parameter.ID, PostBody, URLBase
ExportListExports the schema of a list in CAML format.ID, Scope
GetProjSchemaRequests the XML schema for a team Web site.ID
ImportListCreates a new list based upon the XML schema that is specified in the method.ID, Title, RootFolder, ListSchema
ModListSettingsChanges the properties of a list.ID, Scope, OldListTitle, NewListTitle, Description, ReadSecurity, WriteSecurity, SchemaSecurity, owshiddenversion
NewFieldAdds a new field to a list.ID, Scope, FieldXML, AddToDefaultView, owshiddenversion
NewListCreates a new list of a specified type, such as Contacts, Discussions, or Survey.ID, ListTemplate, LangID
NewViewPageAdds a new view page to a team Web site.ID, Scope, PageURL, DisplayName, HiddenView
RenderViewRequests the contents of a view for a list.ID, View, Scope, URLBase
ReorderFieldsChanges the order in which fields in a list are displayed on the list's data entry form.ID, Scope, ReorderedFields, owshiddenversion
SiteProvisionAdds the default set of lists to an existing team Web site.ID, CreateLists
UpdateFieldModifies the schema of an existing field in a list.ID, Scope, FieldXML, owshiddenversion

In addition to the above RPC-related commands, the following commands and parameters can also be used:

Command (Cmd=)DescriptionParameters
DeleteDeletes an item in a list.
  • ID — the item's ID as listed in the database table.
  • List — the name of the database table that contains the item.
  • NextUsing — the page to open once the command has been executed.
DeleteListDeletes a list.
  • List — the name of the database table that contains the item.
  • NextUsing — the page to open once the command has been executed.
SaveSaves a new list or saves modifications to an existing list.
  • ID — the item's ID as listed in the database table. Set to New for new list items.
  • List — the name of the database table that contains the item.
  • NextUsing — the page to open once the command has been executed.

The following parameters can also be used in the protocol:

  • FileDialogFilterValue to set filters for a view and to return from a document library the list of all files of a specified type according to file extension (for example, *.doc, *.ppt, or *.xls).
  • FilterFieldn to specify the name of a field in the database, where n is an integer that is limited only by the number of fields allowed in the database table or by the length allowed for the URL field.
  • FilterValuen to specify the string value on which to filter a field, where n is an integer that is limited only by the length allowed for the URL field.
  • SortField to specify the name of the field on which to sort.
  • SortDir to indicate an ascending (asc) or descending (desc) sort order.
  • Using to specify a particular file containing CAML for the server to evaluate and render.

Embedding a SharePoint Team Services method in a URL

Embedding a request in a URL is a basic mechanism for issuing a method and its parameters to a server running SharePoint Team Services. The syntax for using this mechanism is as follows:


The following example creates a new Custom list named "Employees" on a site called STSWeb1:


This example displays the Discussions list as a CAML file:


The next example exports the Discussions list to a Microsoft Excel worksheet. Note that the unique GUID for the associated view must be assigned to the View parameter.


Using CAML batch functionality to send multiple requests through a form

You can post multiple requests by using the CAML batch functionality and creating a form that includes a text area (PostBody) for posting the requests. Create a form like the following in an HTML file, where the action attribute contains the URL command being posted to the server:

<FORM method="POST" action="http://STSServer1/_vti_bin/owssvr.dll?Cmd=DisplayPost">
  <TEXTAREA rows="18" name="PostBody" cols="72"></TEXTAREA>
  <INPUT type="submit" value="Submit">
  <INPUT type="reset" value="Reset">

Here, the DisplayPost command requests the server to render CAML contained in the PostBody variable, which is defined by the above text area.

Next, open the form in your browser and enter a block of CAML that uses the Batch element, such as follows:

<ows:Batch OnError="Return">
  <Method ID="A1"> 
    <SetVar Name="ID">New</SetVar> 
    <SetVar Name="Cmd">Save</SetVar> 
    <SetVar Name="urn:schemas-microsoft-com:office:office#Title">New Program Manager</SetVar> 
    <SetVar Name="urn:schemas-microsoft-com:office:office#Body">Congratulations to Jane for her promotion!</SetVar> 
    <SetVar Name="urn:schemas-microsoft-com:office:office#Expires">2001-09-14T00:00:00Z</SetVar>
  <Method ID="A2"> 
    <SetVar Name="ID">New</SetVar> 
    <SetVar Name="Cmd">Save</SetVar> 
    <SetVar Name="urn:schemas-microsoft-com:office:office#Title">Sales rise by 10%</SetVar> 
    <SetVar Name="urn:schemas-microsoft-com:office:office#Body">The accounting office has released its quarterly report. Check it out!</SetVar> 
    <SetVar Name="urn:schemas-microsoft-com:office:office#Expires">2001-12-18T00:00:00Z</SetVar>

When submitted, this sample adds two records to the Announcements list in the database, registering their field values in the Microsoft Office namespace.

For more information on how to use CAML, see the CAML Schema Reference.