3

I am writing an application that scrapes all the files from a given SharePoint site and all of its sub-sites.

This worked perfectly when I ran it locally however, now that it's running on a server there were some changes that had to be made.

Previously I could just reach the site from the program through it's name [SharepointSiteName]

Now however I need to address it through the domain [SharepointSiteName].example.com.

This works when I'm asking for the files of the root site but once I get to the sub-sites it doesn't find the files any more.

All of the scraping makes use of the SharePoint API, so as an example:

[sharepointsitename]/[subsite]/_api/web/GetFolderByServerRelativeUrl('[sharepointsitename]/[subsite]/Shared%20Documents')/files 
**Works**

[sharepointsitename].example.com/[subsite]/_api/web/GetFolderByServerRelativeUrl('[sharepointsitename]/[subsite]/Shared%20Documents')/files 
**Doesn't Work**

The program is written in Java and switching to C# is not an option.

Is there a way around this? I could be missing something obvious here since I am fearly new to SharePoint and didn't really know how to look for the answer as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.