Export (0) Print
Expand All

Synchronize SharePoint items using the REST service

apps for SharePoint

Learn how to synchronize items between SharePoint and your apps or services by using the GetListItemChangesSinceToken resource, part of the SharePoint REST service.

Last modified: July 12, 2013

Applies to: apps for SharePoint | SharePoint Server 2013

In this article
Synchronizing SharePoint items using the GetListItemChangesSinceToken resource
SP.ChangeLogItemQuery object properties
Additional resources

If you want to synchronize items between SharePoint and your apps or services, you can use the GetListItemChangesSinceToken resource to do so. The GetListItemChangesSinceToken, part of the SharePoint REST service, corresponds to the ListsGetListItemChangesSinceToken(String, String, XmlNode, XmlNode, String, XmlNode, String, XmlNode) web service call.

Perform a POST request that includes a SP.ChangeLogItemQuery object properties object in the request body.

The request returns ADO rowset XML which includes rows corresponding to any list item change matching the specified query. For more information on these properties, including property data structures, CAML element descriptions, and return values, see ListsGetListItemChangesSinceToken(String, String, XmlNode, XmlNode, String, XmlNode, String, XmlNode).

Example request

POST http://server/site/_api/web/Lists/GetByTitle('Announcements')/GetListItemChangesSinceToken

Example POST Body

{ 'd' : { 
  'query': { 
    '__metadata': { 'type': 'SP.ChangeLogItemQuery'}, 
    'ViewName': '', 
    'Query': '<Where>
         <FieldRef Name="Title" />
         <Value Type='Text'>Te</Value>
    'QueryOptions': '<QueryOptions>
      <Folder>Shared Documents/Test1</Folder></QueryOptions>', 
      <FieldRef Name="Title"/>
      <Value Type="Text">Testing</Value></Contains>' } 




A string that contains either the title or the GUID for the list. When querying the UserInfo table, the string contains UserInfo. Using the GUID results in better performance.


A string that contains the GUID for the view, which determines the view to use for the default view attributes represented by the query, viewFields, and rowLimit parameters. If this argument is not supplied, the default view is assumed. If it is supplied, the value of the query, viewFields, or rowLimit parameter overrides the equivalent setting within the view. For example, if the view specified by the viewFields parameter has a row limit of 100 rows but the rowLimit parameter contains a value of 1000, then 1,000 rows are returned in the response.


A Query element containing the query that determines which records are returned and in what order.


An XML fragment in the following form that contains separate nodes for the various properties of the SPQuery object.


A string that contains the change token for the request. For a description of the format that is used in this string, see Overview of the Change Log. If null is passed, all items in the list are returned.


A Contains element that defines custom filtering for the query.

© 2014 Microsoft