Nijandhan
Nijandhan

Reputation: 185

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?

Upvotes: 0

Views: 352

Answers (1)

Lee
Lee

Reputation: 5493

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);

          });
        }
      });

Upvotes: 1

Related Questions