Sharepoint-外部查询文章数据
我设置了一个 Sharepoint 网站,其中包含一个包含新闻发布网站的网站集。
新闻页面基于文章页面布局,因此包含标题、日期、署名、描述、图像、图像替代、汇总图像等。
我一直在考虑使用 REST 提要检索此信息,例如
servername/sites/sitecollection/news/_vti_bin/ListData.svc/Pages
但这仅返回标题和日期。我也需要所有其他字段。
检索此信息以便我可以将其拉入外部 php 站点的最佳方法是什么(如果有的话!)?
I have a Sharepoint site set up, with a site collection that contains a publishing site for news.
News pages are based on the Article page layout, so contains title, date, byline, description, image, image alt, rollup image etc.
I've been looking at retrieving this information using a REST feed e.g.
servername/sites/sitecollection/news/_vti_bin/ListData.svc/Pages
But this only returns title and date. I need all the other fields too.
What is the best way (if there is one!) to retrieve this information so that I can pull it in to an external php site?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此端点应该支持 OData,因此您可以执行 $select=field1,field2... 之类的操作,正如您在 堆栈交换帖子
然而 SP 2013 带来了对 REST 和 OAuth 的支持,这在这种情况下有很大帮助
This endpoint is supposed to support OData so you can do things like $select=field1,field2.... as you can see on that stack exchange post
however SP 2013 brings support for REST and OAuth which helps a lot in this kind of scenarios
检查您的浏览器设置。如果它只返回标题和日期,可能是因为您使用的浏览器将列表视为 RSS 提要,就像 Hameds 提出的那样。如果您想查看这些字段,请关闭 RSS 源阅读视图。就像如果您使用的是 Internet Explorer,请转到“齿轮”图标、Internet 选项 -->内容选项卡 -->提要和网页切片设置 -->取消选中“打开提要阅读视图”。然后刷新您的页面。
Check your browser settings. If it is only returning the title and date, it is probably because the browser you are using is treating the list as an RSS feed like Hameds brought up. If you want to see the fields, turn off the RSS feed reading view. Like if you are using Internet Explorer go to the "gear" icon, Internet options --> content tab --> Feeds and web slices settings --> Uncheck the "Turn on feed reading view". Then refresh your page.