Hello, I think this probably requires a relatively official response from Microsoft, but I'm looking to make batch requests via the SharePoint V2.0 method to push Graph $batch
json POST bodies.
I cannot seem to get the request right, and I know that Graph can be persnicketty with how the request is formatted, so I thought I'd ask, here.
The Method for my request is: POST
The Uri I am posting to is the following, where TENANCY_NAME is the subdomain and SITE_PATH is the accepted path of the site: https://TENANCY_NAME.sharepoint.com/sites/SITE_PATH/_api/v2.0/$batch
My headers are as follows and I have also tried them with "application/json;odata.metadata=none
" values:
{
"Content-Type": "application/json",
"Accept": "application/json"
}
The body that is being sent is as follows, where LIST_ID is the ID of the list I wish to get or post information to:
{
"requests": [
{
"id": "01",
"method": "GET",
"url": "/lists/LIST_ID/items",
"headers": {
"Content-Type": "application/json;odata.metadata=none"
}
}
]
}
I have also tried the requests to include the full graph URL as such being as follows where SITE_ID
is the ID of the site: https://graph.microsoft.com/v1.0/sites/SITE_ID/lists/LIST_ID/items