1

In this question, it appears there is a "/versions" endpoint for the ListItems REST API.

/_api/lists/getbytitle('ListName')/Items(#)/versions returns a 404 'Not Found' on our SharePoint 2016 On-Premise server.

Is there a Cumulative Update or Feature Pack that introduces this endpoint?

1

This API only supports in SharePoint Online, not for on-premises. So, it does not work in SharePoint 2016.

If you want to get version information, you can try to use the SharePoint List web service that exposes Lists.GetVersionCollection Method to return version information for an item in a SharePoint list.

Here is a code demo to retrieve a list item version, it works.

<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/0.7.1a/jquery.SPServices-0.7.1a.min.js"></script>
<script type="text/javascript">
$(function(){
                $().SPServices({
                                 operation: "GetVersionCollection",
                                  async: false,
                                  strlistID: "Lists_1",
                                  strlistItemID: 1,
                                  strFieldName: "Title",
                                  completefunc: function (xData, Status) {
                                  console.log(xData);
                                    $(xData.responseText).find("Version").each(function(i) {
                                      console.log("Name: " + $(this).attr("Title") + " Modified: " + $(this).attr("Modified"));
                                    });  
                                  }
                }); 
});
</script>

Refer to my answer in this thread.

Here is a demo to get item field version history from Versions.aspx:

https://social.msdn.microsoft.com/Forums/aspnet/en-US/33f9dc3d-be4d-489c-9f40-34aada8c73a2/any-rest-api-available-for-version-history-of-list-item-fileds?forum=sharepointdevelopment

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.