CopyMove REST Web Service
|Top Previous Next|
CopyMove also features a REST Web service that remote clients can call. The service is available at URLs constructed from the following pattern:
<protocol>://<Web application>/<Context Site>/_vti_bin/CopyMoveRest.svc
where the protocol can be HTTP or HTTPS depending on the SharePoint Web application setup. For example:
The service is sensitive to the SharePoint site context and it is therefore important to always connect with the proper SharePoint site url address. The input/output format is always XML regardless of the HTTP Accept header. To work with JSON data instead of XML, simply use the equivalent CopyMoveJSON.svc REST service. The XML service has these seven end points:
The JSON service has the same end points:
Use the SampleItemTransaction endpoint to request a sample XML / JSON structure accepted by the Copy and Move end points.
Copying a single file only requires a few XML tags as shown in the screen shot below. It shows how to quickly build and test a web request with the Postman app for Google Chrome.
The next Postman screen shot shows how to copy multiple files using the Items XML element.