2016-08-04 75 views

回答

2

當指定無效的資源端點時,通常會發生此錯誤。

端點創建​​資源

Url : /_api/web/lists/getbytitle(<listTitle>)/items 
Method: POST 
Data: <item payload> 

Make sure endpoint for SP.ListItemEntityCollection resource is specified for that operation.

端點更新​​資源

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.