简体   繁体   中英

How to get updated data from SharePoint 2010 using REST API - Java?

I have created java sample application to get data from SharePoint 2010 using its REST API support,

http://sharepoint.domain.com/list/_vti_bin/ListData.svc/title

Its working fine. But, in my case, I need to get only the updated data, once value gets updated in SharePoint. Is there any REST API support available to get only updated data from SharePoint 2010?

You could use SPServices library to query SharePoint data so you could specify the CAML query to query the items you want.

Sample code

$().SPServices({
        operation: "GetListItems",
        async: false,
        listName: "Video",
        CAMLQuery: "<Query><Where><Eq><FieldRef Name='Category' /><Value Type='Choice'>Funny</Value></Eq></Where></Query>",
        CAMLViewFields: "<ViewFields>  <FieldRef Name='Title' /> </ViewFields>",
        completefunc: function (xData, Status) {
          $(xData.responseXML).SPFilterNode("z:row").each(function() {

           var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>";
               $("#tasksUL").append(liHtml);

          });
        }
      });

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM