I am little bit confused here and looking for some advise. What I know:
When we install SharePoint hosted app it will be installed in your host web as a sub-site within a site collection which is called as app web.
Host web and App web will be on a different domain which is base of app model.
Host web URL -
https://www.fabrikam.com/sites/Marketing
App web URL -http://app-bdf2016ea7dacb.fabrikamapps.com/sites/Marketing/Scheduler
Host web has a one custom list say "Issues and Findings"
Now,
To access list item I can browse to below URL which is expected
https://www.fabrikam.com/sites/Marketing/_api/web/lists/.....
But,
I am able to get same list item using
http://app-bdf2016ea7dacb.fabrikamapps.com/sites/Marketing/_api/web/lists/....
as well.
Sure - I have given my app Full Control on the "List" scope and Trusted it.
Since, these are two different domains (app and host), I was not expecting 2nd Url to return same result as first one. Instead it should working only when specified as below
....<appwebUrl>/sites/marketing/_api/SP.AppContextSite(@target)/Web/....
@target = <hostweb>
Am I missing something here?