I am trying to update the SP document library meta data using the below API call via postman. But getting the below error, it does not match what i am trying to achieve.
Please share thoughts on it,
POST - https://graph.microsoft.com/v1.0/$batch Valid bearer token But getting the below response
"body": {
"error": {
"code": "invalid Request",
"message": "Files and folders should only be added to a Document Library via the One Drive API",
}
}
My Sample request Body :
{
"requests": [
{
"id": "1",
"method": "POST",
"URL": "/sites/xxxxx.sharepoint.com:/sites/testsplist:/lists/9b2e99d1-c067-4122-bcb5-b5b00c413153/items/",
"headers": {
"Content-Type": "application/JSON"
},
"body": {
"Dept_No": "5Z3dd96869",
"Case_Name": "CONNIE-ESBTest001",
"Client": "Humane Treatment",
"Open_Date": "02/24/2016",
"Initial_Court_Date": "04/12/2016",
}
},
{
"id": "2",
"method": "POST",
"URL": "/sites/xxxxx.sharepoint.com:/sites/testsplist:/lists/9b2e99d1-c067-4122-bcb5-b5b00c413153/items/",
"headers": {
"Content-Type": "application/JSON"
},
"body": {
"Dept_No": "4Z4qq90233",
"Case_Name": "BBB ",
"Client": "Animal",
"Open_Date": "02/16/2017",
"Initial_Court_Date": "04/11/2017"
},
},
{
"id": "3",
"method": "POST",
"URL": "/sites/xxxxx.sharepoint.com:/sites/testsplist:/lists/9b2e99d1-c067-4122-bcb5-b5b00c413153/items/",
"headers": {
"Content-Type": "application/JSON"
},
"body": {
"Dept_No": "0Z4uu803",
"Case_Name": "ABIMALEK-ESBTest002",
"Client": "Health",
"Open_Date": "07/07/2020",
"Initial_Court_Date": "10/21/2020"
}
}
]
}