I'd like to update several items on a list through the rest api, this is how I update one item:

    update: {
        method: 'POST',
        contentType: "application/json;odata=verbose",
        headers: {
            "Accept": "application/json;odata=verbose",
            "Content-Type": "application/json;odata=verbose",
            "X-RequestDigest": function() {return  $("#__REQUESTDIGEST").val()},
            "X-HTTP-Method": "MERGE",
            "If-Match": '*'
        url: "serverRelativeURL/_api/lists/getByTitle('ListName')/items(:ID)"

Where ":ID" is the id of the list item

Is is possible to update multiple items, without doing this request in a loop for each item?


You can do that using batch request. Batch request is only available in SharePoint Online & SharePoint 2016. Find some useful references.

| improve this answer | |
  • we're using 2013, but still useful, thanks – sch Oct 18 '16 at 6:55
  • then you can go for JSOM. update multiple items and finally call context.executeQuery() – Atish Dipongkor - MVP Oct 18 '16 at 7:01

I don't think it is possible without loop, at least based on the provided List and List Items REST API Reference (https://msdn.microsoft.com/en-us/library/office/dn531433.aspx).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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