Below is my code to read items from a document library.
var url = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('DocumentList')/items?$select=customerID";
$.ajax({
url: url,
method: "GET",
headers: {
"Accept": "application/json; odata=verbose"
},
success: function(data) {
$.each(data.d.results, function(index, item) {
arrayCustomerID[index] = item.customerID;
});
},
error: function(data) {
console.log("error");
}
});
This work for the normal case but what should I do so that it works if I have more than 5000 items in the document library.