Update an item in a list

Update the properties on a listItem.

Prerequisites

One of the following scopes is required to execute this request:

  • Sites.ReadWrite.All

HTTP request

PATCH https://graph.microsoft.com/beta/sharepoint/sites/{site-id}/lists/{list-id}/items/{item-id}/columnSet
PATCH https://graph.microsoft.com/beta/sharepoint:/{list-path}:/items/{item-id}/columnSet

Optional request headers

Name Value Description
if-match etag If this request header is included and the eTag provided does not match the current eTag on the item, a 412 Precondition Failed response is returned and the item will not be updated.

Request body

In the request body, supply a JSON representation of a fieldValueSet specifying the fields to update.

Example

Here is an example that updates the Color and Quantity fields of the list item with new values. All other values on the listItem are left alone.

PATCH https://graph.microsoft.com/beta/sharepoint/sites/{site-id}/lists/{list-id}/items/{item-id}/columnSet
Content-Type: application/json

{
    "Color": "Fuchsia",
    "Quantity": 934
}

Response

If successful, this method returns a fieldValueSet in the response body for the updated list item.

HTTP/1.1 201 Created
Content-type: application/json

{
  "Name": "Widget",
  "Color": "Fuchsia",
  "Quantity": 934
}