Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
title description ms.date ms.prod ms.localizationpriority
Synchronize SharePoint items using the REST service
Synchronize items between SharePoint and your add-ins or services by using the GetListItemChangesSinceToken resource, part of the SharePoint REST service.

Synchronize SharePoint items using the REST service

If you want to synchronize items between SharePoint and your add-ins or services, you can use the GetListItemChangesSinceToken resource to do so. The GetListItemChangesSinceToken, part of the SharePoint REST service, corresponds to the Lists.GetListItemChangesSinceToken web service call.

Perform a POST request that includes an 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 about these properties, including property data structures, CAML element descriptions, and return values, see Lists.GetListItemChangesSinceToken.


POST https://{site_url}/_api/web/Lists/GetByTitle('Announcements')/GetListItemChangesSinceToken`
Authorization: "Bearer " + accessToken
Content-Type: "application/json"
Content-Length: {length of request body as integer}

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

SP.ChangeLogItemQuery object properties

Property Description
ListName 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.
ViewName 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.
Query A Query element containing the query that determines which records are returned and in what order.
QueryOptions An XML fragment in the following form that contains separate nodes for the various properties of the SPQuery object.
ChangeToken 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.
Contains A Contains element that defines custom filtering for the query.

See also