The above REST endpoint works in SharePoint online and we are able to fetch attachments but the same endpoint doesn't work for SharePoint 2013 on-premise enterprise version.
I get the following error.
I get details when I drop
$select and use just expand as follows:
But if I use this I cannot expand extended lookup fields in the same list as the fields are required to be added to
What could be the reason? Is there anything that I can do where I get both attachments and extended lookup using same query.