Using JavaScript REST API, we can get a list by URL path. Thus:
http://vmdevsharepoint:12345/_api/web/lists/
Concatenating with this:
?$expand=RootFolder&$filter=RootFolder/ServerRelativeUrl eq '/Lists/MyList'
That result this:
http://vmdevsharepoint:12345/_api/web/lists/?$expand=RootFolder&$filter=RootFolder/ServerRelativeUrl eq '/Lists/MyList'
It works properly!
But how to get items from that list at same time? At same line of code too!
I tried to concatenate the above code with this:
&/items?$select=Title,DocType,DocNumber,Author
Resulting this (final line of code to copy and test in your environment):
http://vmdevsharepoint:12345/_api/web/lists/?$expand=RootFolder&$filter=RootFolder/ServerRelativeUrl eq '/Lists/MyList'&/items?$select=Title,DocType,DocNumber,Author
But it does not worked!
Can someone help-me?
Update: For context purposes, you can see that reference: How to get List by Url using SharePoint 2013 CSOM
you'll have to write an additional query for each new request you want to make, that's the reason you cannot get the items when you are requesting a list
– Mike Dec 08 '17 at 16:32