I am trying to use REST API to filter a managed metadata column. After much research, I realized that I should be using RenderListDataAsStream endpoint for working with managed metadata columns. As a test, I wrote a small jQuery snippet to Below is the ajax call I am using but it is failing with 404 error. Can someone point me in the right direction?
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script><script type="text/javascript">
$(document).ready(function(){
$.ajax({
async: true,
url: "https://xyz.com/abc/_api/web/lists/GetByTitle('Projects')/RenderListDataAsStream",
method: "POST",
data: JSON.stringify({
parameters: {
RenderOptions: 2,
ViewXml: "<View><ViewFields><FieldRef Name=\"Grade\"/></ViewFields><Query><Where><Eq><FieldRef Name=\"ID\"/><Value Type=\"Number\">322</Value></Eq></Where></Query><RowLimit Paged=\"TRUE\">1</RowLimit></View>"
}}),
headers: {"accept": "application/json;odata=verbose","content-type": "application/json;odata=verbose","X-RequestDigest": $("#__REQUESTDIGEST").val()
},
success: function(data){
$.each(data.d.results, function(index, item){
alert(index);
});
},
error: function(error){
alert(JSON.stringify(error));
}
});
});</script>