0

Not sure what I am doing wrong. I am trying to convert a POST request (which is working) to a batch but I am encountering this error/response.

--batchresponse_f248d33f-065b-43a0-8dd7-d69e63e98579
Content-Type: application/http
Content-Transfer-Encoding: binary

HTTP/1.1 400 Bad Request
CONTENT-TYPE: application/json;odata=verbose;charset=utf-8

{"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"Invalid request."}}}
--batchresponse_f248d33f-065b-43a0-8dd7-d69e63e98579--

Would appreciate any help/hints.

via PostMan

1 Answer 1

0

Use items instead of get items to compare the result:

 POST https://fabrikam.sharepoint.com/_api/Web/lists/getbytitle('OldList')/items HTTP/1.1

More information for your reference:

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/make-batch-requests-with-the-rest-apis

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.