I'm trying to query a document list from a SharePoint Online server using REST API.
I have to use CAML, otherwise filtering is not possible on the taxonomy field as far as I know.
Below is the request I send to sharepoint, it returns the rows, but the columns FileRef, FSObjType, EncodedAbsUtl, FileLeafRef are missing from the result set.
/_api/web/lists/GetByTitle('docstore')/GetItems(query=@v1)?@v1=
{
"ViewXml": "<View Scope='RecursiveAll'>
<ViewFields>
<FieldRef Name='FileLeafRef'/>
<FieldRef Name='FileRef'/>
<FieldRef Name='FSObjType'/>
<FieldRef Name='EncodedAbsUrl'/>
</ViewFields>
<Query>
<Where>
<Eq>
<FieldRef Name='ma7b4d79a8904f3685c6d9fe04f38d1d'/>
<Value Type='TaxonomyFieldType'>TaxName|b6e32b49-9e02-4f65-98dc-3a6049eb03c3</Value>
</Eq>
</Where>
</Query>
</View>"
}