如何在SharePoint 2010中获取列表的odata服务

dex*_*ter 7 list sharepoint-2010 odata

如果我的列表位于此处:

 http://sharepoint2010m/Lists/VideoPlayerData/AllItems.aspx
Run Code Online (Sandbox Code Playgroud)

如何通过o-data服务获得实际项目?

CBo*_*ono 14

您的REST端点将是: http://sharepoint2010m/_vti_bin/listdata.svc/VideoPlayerData

在您的示例中,您的列表位于根目录中.但是,如果您需要访问更深层次的List,则_vti_bin可以使用URL中的最后一个站点.

例如,在访问列表: http://sharepoint2010m/MySite/MySubSite/Lists/MyList/AllItems.aspx,

你要求:

http://sharepoint2010m/MySite/MySubSite/_vti_bin/listdata.svc/MyList

Microsoft还有一篇名为" 使用REST接口"的文章,您可能想要查看.