This is my ajax call to retrieve list data using RenderListDataAsStream end point.
var payload = {
'parameters': {
RenderOptions: 2
}
};
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists(guid'<list-id>')/RenderListDataAsStream",
type: "POST",
headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', 'X-RequestDigest': $("#__REQUESTDIGEST").val() },
body: JSON.stringify(payload),
success: function (data) {
console.log(data);
},
error: function (error) {
alert(JSON.stringify(error));
}
});
This same code is working in SharePoint Online, but gives an error as given below:
{"error":{"code":"-1, Microsoft.SharePoint.Client.ResourceNotFoundException","message":{"lang":"en-US","value":"Cannot find resource for the request RenderListDataAsStream."}}}
This issues specifically in SP2013 only.