I'm currently trying to retrieve folders and files from my sharepoint server and for that, I'm using RESTful calls. The problem is that the method GetFolderByServerRelativeUrl is not returning a list of folders nor files. I made some different calls like:
The server does recognize that the folder exists. However, i cannot list the files no the subfolders in there. The result is always a short xml with some links but with no useful information.
Can someone help me with this? What am I doing wrong?
Here`s the result when i access the /files link:
<?xml version="1.0" encoding="UTF-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" xml:base="[Site Api]"> <id>46390b86-1167-4735-ba9e-880f06df0061</id> <title/> <updated>2017-10-14T13:56:31Z</updated> <author> <name/> </author> </feed>
As you can see, it does return an empty xml file! What can be wrong?
Here's something new: when i try to access a specific file using /files('file name') it returns me File Not Found exception. It's odd, since i'm the one who created it! But when I try to get the file with GetFileByServerRelativeUrl it does return me the file!