title: Using the SharePoint REST API to update a list item
body: <p>I am attempting to <a href="https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest#update-list-item" rel="nofollow noreferrer">update a list item</a> using the SharePoint REST API but am encountering the following error:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"&gt;
      &lt;m:code&gt;-1, Microsoft.SharePoint.Client.InvalidClientQueryException&lt;/m:code&gt;
      &lt;m:message xml:lang="en-US"&gt;The expression "web/lists/GetByTitle('Drop Off Library')/items("http:/example.com/_api/Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')")" is not valid.&lt;/m:message&gt;
  &lt;/m:error&gt;
  </code></pre>
  
  <p>After adding the file, I receive the following response:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;entry xml:base="http://example.com/_api/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"&gt;
      &lt;id&gt;http://example.com/_api/Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')&lt;/id&gt;
      &lt;category term="SP.File" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /&gt;
      &lt;link rel="edit" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')" /&gt;
      &lt;link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Author" type="application/atom+xml;type=entry" title="Author" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/Author" /&gt;
      &lt;link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/CheckedOutByUser" type="application/atom+xml;type=entry" title="CheckedOutByUser" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/CheckedOutByUser" /&gt;
      &lt;link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/EffectiveInformationRightsManagementSettings" type="application/atom+xml;type=entry" title="EffectiveInformationRightsManagementSettings" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/EffectiveInformationRightsManagementSettings" /&gt;
      &lt;link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/InformationRightsManagementSettings" type="application/atom+xml;type=entry" title="InformationRightsManagementSettings" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/InformationRightsManagementSettings" /&gt;
      &lt;link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ListItemAllFields" type="application/atom+xml;type=entry" title="ListItemAllFields" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/ListItemAllFields" /&gt;
      &lt;link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/LockedByUser" type="application/atom+xml;type=entry" title="LockedByUser" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/LockedByUser" /&gt;
      &lt;link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ModifiedBy" type="application/atom+xml;type=entry" title="ModifiedBy" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/ModifiedBy" /&gt;
      &lt;link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Properties" type="application/atom+xml;type=entry" title="Properties" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/Properties" /&gt;
      &lt;link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Versions" type="application/atom+xml;type=feed" title="Versions" href="Web/GetFileByServerRelativeUrl('/DropOffLibrary/b.txt')/Versions" /&gt;
      &lt;title /&gt;
      &lt;updated&gt;2019-01-11T14:47:13Z&lt;/updated&gt;
      &lt;author&gt;
          &lt;name /&gt;
      &lt;/author&gt;
      &lt;content type="application/xml"&gt;
          &lt;m:properties&gt;
              &lt;d:CheckInComment&gt;&lt;/d:CheckInComment&gt;
              &lt;d:CheckOutType m:type="Edm.Int32"&gt;0&lt;/d:CheckOutType&gt;
              &lt;d:ContentTag&gt;{2BDD4E2D-79C8-4F6B-8DD7-AC745D9360A8},1,1&lt;/d:ContentTag&gt;
              &lt;d:CustomizedPageStatus m:type="Edm.Int32"&gt;0&lt;/d:CustomizedPageStatus&gt;
              &lt;d:ETag&gt;"{2BDD4E2D-79C8-4F6B-8DD7-AC745D9360A8},1"&lt;/d:ETag&gt;
              &lt;d:Exists m:type="Edm.Boolean"&gt;true&lt;/d:Exists&gt;
              &lt;d:IrmEnabled m:type="Edm.Boolean"&gt;false&lt;/d:IrmEnabled&gt;
              &lt;d:Length m:type="Edm.Int64"&gt;4&lt;/d:Length&gt;
              &lt;d:Level m:type="Edm.Byte"&gt;255&lt;/d:Level&gt;
              &lt;d:LinkingUrl&gt;&lt;/d:LinkingUrl&gt;
              &lt;d:MajorVersion m:type="Edm.Int32"&gt;1&lt;/d:MajorVersion&gt;
              &lt;d:MinorVersion m:type="Edm.Int32"&gt;0&lt;/d:MinorVersion&gt;
              &lt;d:Name&gt;b.txt&lt;/d:Name&gt;
              &lt;d:ServerRelativeUrl&gt;/DropOffLibrary/b.txt&lt;/d:ServerRelativeUrl&gt;
              &lt;d:TimeCreated m:type="Edm.DateTime"&gt;2019-01-11T14:47:13Z&lt;/d:TimeCreated&gt;
              &lt;d:TimeLastModified m:type="Edm.DateTime"&gt;2019-01-11T14:47:13Z&lt;/d:TimeLastModified&gt;
              &lt;d:Title m:null="true" /&gt;
              &lt;d:UIVersion m:type="Edm.Int32"&gt;512&lt;/d:UIVersion&gt;
              &lt;d:UIVersionLabel&gt;1.0&lt;/d:UIVersionLabel&gt;
              &lt;d:UniqueId m:type="Edm.Guid"&gt;2bdd4e2d-79c8-4f6b-8dd7-ac745d9360a8&lt;/d:UniqueId&gt;
          &lt;/m:properties&gt;
      &lt;/content&gt;
  &lt;/entry&gt;
  </code></pre>
  
  <p>My assumption here is that the item id is either the value of the <code>&lt;id&gt;</code> tag or the value of the <code>&lt;UniqueId&gt;</code> tag, but neither have worked.</p>