问题
I am trying to merge an item into an existing list in SharePoint Online, but receive the following error:
"The type SP.ListItemEntityCollection does not support HTTP PATCH method."
My configuration is as stated in Microsoft documentation. https://msdn.microsoft.com/en-us/library/office/jj164022.aspx
Is there a problem with the permissions for this type of item in the list? How can I modify that? I have seen no references to different types, or resolving this issue.
回答1:
This error usually occurs when invalid resource endpoint is specified.
Endpoint to create SP.ListItem
resource
Url : /_api/web/lists/getbytitle(<listTitle>)/items
Method: POST
Data: <item payload>
Make sure endpoint for
SP.ListItemEntityCollection
resource is specified for that operation.
Endpoint to update SP.ListItem
resource
Url : /_api/web/lists/getbytitle(<listTitle>)/items(<itemid>)
Method: POST
Headers:
"X-HTTP-Method": "MERGE",
"If-Match": "*"
Data: <item payload>
Make sure
SP.ListItem
resource url is specified for that operation. For example, the following url/_api/web/lists/getbytitle(<listTitle>)/items?$filter=Id eq 1
is invalid in that case and the specified error will occur while updating list item.
来源:https://stackoverflow.com/questions/38774918/sharepoint-online-merge-unsupported