0

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.

1 Answers1

2

Use _api/$metadata you could find available rest api functions in your farm, while RenderListDataAsStream not exists in SharePoint 2013 based on my checking.

Lee
  • 5,305
  • 1
  • 6
  • 12