Reputation: 401
I want to get the content of a file from sharepoint list using java through rest api
Can anyone help me,I am a newbie to sharepoint
Thanks in advance
Upvotes: 2
Views: 8656
Reputation: 359
Sharepoint provides a REST API to access lists. Here is a sample end point to start with.
http://server/site/_api/lists/getbytitle('listname')
Here is more documentation: https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/get-to-know-the-sharepoint-rest-service
Edit: To download file use the following URL:
http://server/site/_api/SP.AppContextSite(@target)/web/GetFileByServerRelativeUrl('/sites/Test/Shared Documents/" + sourcefile.get_name() + "')/$value?@target='myhosturl'
http://www.techmikael.com/2013/07/how-to-copy-files-between-sites-using.html for more information.
Upvotes: 3