简体   繁体   English

如何使用REST API-Java从SharePoint 2010获取更新的数据?

[英]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, 我已经创建了Java示例应用程序,以使用其REST API支持从SharePoint 2010中获取数据,

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. 但是,就我而言,一旦在SharePoint中更新了值,我就只需要获取更新的数据。 Is there any REST API support available to get only updated data from SharePoint 2010? 是否有任何REST API支持可用于仅从SharePoint 2010获取更新的数据?

You could use SPServices library to query SharePoint data so you could specify the CAML query to query the items you want. 您可以使用SPServices库查询SharePoint数据,因此可以指定CAML查询来查询所需的项目。

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

          });
        }
      });

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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