Sharepoint / GetChanges Rest API [英] Sharepoint / GetChanges Rest API

查看:86
本文介绍了Sharepoint / GetChanges Rest API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

sharepoint online的getchanges rest API返回名为$ b的属性对于ListItems,文件和文件夹,$ b UniqueId ,但对于2013/2016版本的sharepoint,同一API不会返回
UniqueId



获取ListItem更改的示例请求如下:

 https://< root_web> / _api / web / getchanges?query = {'__ metadata':{'type':'SP.ChangeQuery'},'Item':true,'DeleteObject':true, " ChangeTokenStart":null," ChangeTokenEnd":null} 

sharepoint online的更改日志包含UniqueId,而在
的内部部署情况下缺少。


我如何获得这个UniqueId?
$


请指导我,如果我能提供任何额外的输入,请告诉我。



提前感谢




BrajMohan




解决方案

您好,


您可以从SPChangeItem获取UniqueId,你可以在下面的线程中查看示例演示。


http://morsharepoint.blogspot.com/2010/12/retrieving-items-changedaddeddeleted.html


https:// docs。 microsoft.com/en-us/dotnet/api/microsoft.sharepoint.spchangeitem.uniqueid?view=sharepoint-server


如果您需要从客户端获取结果,请创建服务然后调用它。


您可以检查下面的线程,它共享自定义SharePoint中的WCF服务。


https://social.technet.microsoft.com/wiki/contents/articles/24194.sharepoint-2013-create-a-custom-wcf-rest-服务托管在共享点并部署在wsp.aspx中


最好的问候,



The getchanges rest API for sharepoint online returns a property named UniqueId for ListItems, Files and Folders but the same API does not return UniqueId in case of sharepoint on-premise 2013/2016.

The sample request for getting ListItem changes is as follows:

https://<root_web>/_api/web/getchanges?query={ '__metadata': { 'type': 'SP.ChangeQuery' }, 'Item':true, 'DeleteObject':true, "ChangeTokenStart": null, "ChangeTokenEnd":null}

The change log for sharepoint online contains UniqueId whereas its missing in case of on-premise.

How can I get this UniqueId ?

Please guide me on this and if I can provide any additional inputs please let me know.

Thanks in advance


BrajMohan


解决方案

Hi,

You could get the UniqueId from SPChangeItem, you could check below thread for sample demo.

http://morsharepoint.blogspot.com/2010/12/retrieving-items-changedaddeddeleted.html

https://docs.microsoft.com/en-us/dotnet/api/microsoft.sharepoint.spchangeitem.uniqueid?view=sharepoint-server

If you need to get the result from client side, create a service and then calling it.

You could check below thread which shares customizing WCF service in SharePoint.

https://social.technet.microsoft.com/wiki/contents/articles/24194.sharepoint-2013-create-a-custom-wcf-rest-service-hosted-in-sharepoint-and-deployed-in-a-wsp.aspx

Best Regards,

Lee


这篇关于Sharepoint / GetChanges Rest API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆