I made an app that generates REST links to read specific files from the host web.
When I install this app in a top-level site it works just fine. But when I add a subsite through the admin panel and install the app there the REST links produced just return 404.
Example link working (app installed in top-level site, works fine):
Example link thats not working (different app web, installed in TestSite, returns 404):
I don't understand why this is the case. The REST link looks just fine to me, so whats wrong with it?