문제

I am doing the POST operation from Postman tool to SharePoint online list but getting the 400 bad request the request cannot be fulfilled due to bad syntax error.

Here are my configuration in Postman tool:

URL:

https://globalsharepoint2019.sharepoint.com/sites/SharePointRND/_api/Web/Lists/GetByTitle('TestList')/Items

Raw Request Body:

Raw request body

Headers Parameters:

Headers Parameters

POST request status: 400 bad request the request cannot be fulfilled due to bad syntax

400 bad request the request

Anyone could help me - what is the bad syntax error here?

도움이 되었습니까?

해결책

In order to include the "__metadata" object in your POST, you need to specify your content-type as "application/json;odata=verbose".

Alternatively, if you need to use the "application/json;odata=minimalmetadata" content-type, remove the whole "__metadata" json object, and instead specify the "ContentTypeId" in your body just like you are doing for your "Title", but you would need to first look up the ID of your TestListListItem ContentType.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top