[英]how to get file content from sharepoint list using restapi in java
I want to get the content of a file from sharepoint list using java through rest api 我想通过REST API使用Java从SharePoint列表中获取文件的内容
Can anyone help me,I am a newbie to sharepoint 谁能帮我,我是新手
Thanks in advance 提前致谢
Sharepoint provides a REST API to access lists. Sharepoint提供了REST API来访问列表。 Here is a sample end point to start with. 这是一个示例起点。
http://server/site/_api/lists/getbytitle('listname')
Here is more documentation: https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service 这是更多文档: https : //docs.microsoft.com/zh-cn/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service
https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest
Edit: To download file use the following URL: 编辑:要下载文件,请使用以下URL:
http://server/site/_api/SP.AppContextSite(@target)/web/GetFileByServerRelativeUrl('/sites/Test/Shared Documents/" + sourcefile.get_name() + "')/$value?@target='myhosturl'
Refer to https://social.msdn.microsoft.com/Forums/sharepoint/en-US/02bfbcdc-73c8-4fa5-8967-cfd903a0d72e/javascript-client-object-model-openbinary-method 请参阅https://social.msdn.microsoft.com/Forums/sharepoint/en-US/02bfbcdc-73c8-4fa5-8967-cfd903a0d72e/javascript-client-object-model-openbinary-method
http://www.techmikael.com/2013/07/how-to-copy-files-between-sites-using.html for more information. 有关更多信息, 请访问http://www.techmikael.com/2013/07/how-to-copy-files-between-sites-using.html 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.