使用REST API获取SharePoint列表项,但特定项ID除外 [英] Get SharePoint list item using rest API except specific item id

查看:78
本文介绍了使用REST API获取SharePoint列表项,但特定项ID除外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Rest API获取共享点列表数据.但是从列表中,除了2-3个项目ID,我想获取所有列表数据.如何通过该条件?

I want to get sharepoint list data using Rest API. But from list except 2-3 item id I want to get all list data. How to pass that condition?

请回复

推荐答案

Partik,

Hi Partik,

不幸的是,不可能直接通过REST来获取列表视图.通过在浏览器中键入以下内容并查看页面源代码,您可以获得REST可以获取的列表语法:

Unfortunately, it is not possible to grab a list view via REST directly.  You can get the syntax for what you can grab for a list with REST by typing something like this into your browser and viewing the page source:

https://domain/sites/sitename/_api/web/lists(guid'4065067c-e4b8-46d5-a433-76b27f508d1d')

https://domain/sites/sitename/_api/web/lists(guid'4065067c-e4b8-46d5-a433-76b27f508d1d')

选中此复选框,您可以在其中执行第一个请求,以使用 SP.View.viewQuery 属性 ,然后通过指定CAML查询执行第二个请求以检索列表项

Check this one where you can perform the first request to get CAML Query for List View using SP.View.viewQuery property and then perform the second request to retrieve List Items by specifying CAML Query

https://stackoverflow .com/questions/26884647/using-rest-to-fetch-sharepoint-view-items


这篇关于使用REST API获取SharePoint列表项,但特定项ID除外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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