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