Reputation: 2005
I try to execute the MS Graph API call described there https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/list_create
It is a creation of a list for a sharepoint site.
I need to create it to be able to make folders in root of my sharepoint sites using the MS graph API . My initial request and problem was described there MS graph API sharepoint site. Create a folder in root
Noone offered a solution. It looks like the only way to create folders in root of sites is to use this BETA API to create lists.
However, the API doesn't work as described in docs.
When i try to do
POST https://graph.microsoft.com/beta/sites/{site-id}/lists
Content-Type: application/json
{
"name": "Books",
"columns": [
{
"name": "Author",
"text": { }
},
{
"name": "PageCount",
"number": { }
}
],
"list": {
"template": "generic"
}
}
I have an error response with the message
Cannot define a 'name' for a list as it is assigned by the server. Instead, provide 'displayName'
If i change 'nme' to 'displayName' in the JSON document then error is "One of the provided arguments is not acceptable."
Also i tried to set
,"list":{"template":"documentLibrary"}
and still same errors
What do i do wrong? Or that BETA API just doesn't work ?
Upvotes: 2
Views: 261
Reputation: 2005
This API now works. It is released and works as normal v1 (not beta) There are history on how i communicated with microsoft about this
https://github.com/microsoftgraph/microsoft-graph-docs/issues/1484
Upvotes: 1