I have a SharePoint List in which I would like to update every relevant item's column value use REST API
I can update the information for each individual item given its ID, but I can not seem to figure out how to use REST to update them all.
Here is the code I have so far. If you know what I'm doing wrong or have any experience with this please let me know.
function Name() {
$.ajax({
url: window.location.protocol + "//" + window.location.host + _spPageContextInfo.siteServerRelativeUrl + "/" + "_api/Web/Lists/getbytitle('ListName')/items?$filter=Name eq 'Name'",
method: "POST",
data: JSON.stringify({__metadata:{type: "SP.Data.ListNameListItem"},Column: "Value"}),
headers:{ "Accept": "application/json; odata=verbose",
"Content-Type": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val(),
"X-HTTP-Method":"MERGE",
"If-Match":"*"
},
success: function (data) {console.log(data)},
error: function (error) {alert(JSON.stringify(error));}
});}