如何使用REST API从SharePoint 2013联机搜索中的文档库中获取主要版本的文件 [英] How to Get the Major Version of the file from document library in SharePoint 2013 Online Search Using REST API

查看:70
本文介绍了如何使用REST API从SharePoint 2013联机搜索中的文档库中获取主要版本的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我们在执行SharePoint搜索时同时获取文件版本,次要版本和主要版本,但我们只需要在SharePoint搜索中获取最新版本的文件


如何从SharePoint 2013在线搜索页面中的文档库获取文件的主要版本(最新版本)?


如何从自定义文档库中获取文件的主要版本(最新版本)搜索页面使用REST API?




问候,Rangnath Mali。 MCP

解决方案

您好,


请尝试以下..


<< SITEURL>> / _ AP​​I /网络/ GetFileByServerRelativeUrl( '<< FileURL>>')/版本


顶= 1&安培;?

orderby =创建desc




请记住如果有帮助,请将回复标记为答案



Currently we are getting both the versions of file, Minor and Major while we are performing SharePoint Search but we need only get latest version of file in SharePoint Search

How to Get the Major Version(Latest Version) of the file from document library in SharePoint 2013 Online Search page?

How to Get the Major Version(Latest Version) of the file from document library in custom search page Using REST API?


Regards, Rangnath Mali. MCP

解决方案

Hi ,

Try below ..

<<siteurl>>/_api/Web/GetFileByServerRelativeUrl('<<FileURL>>')/Versions?


top=1&


orderby=Created desc

Please remember to mark the replies as answers if they help.


这篇关于如何使用REST API从SharePoint 2013联机搜索中的文档库中获取主要版本的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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