Provided following body content for a SharePoint REST api call:
{
'__metadata': { 'type': 'SP.View' },
'Title': 'Awesome View',
'PersonalView': false
}
This creates a new view named Amesome View
for the list on which the api call is executed. The type of this view will be a default view.
My question is: is there a way to create a datasheet view using the REST api?
I have found nothing on this and I searched for the SharePoint Client ViewType property on MSDN, and it shows that this is a get
property, no set
available.
So, using CSOM it won't be possible at all I assume. I've also tried providing the ViewType
property, just to be sure:
{
'__metadata': { 'type': 'SP.View' },
'Title': 'Awesome View',
'PersonalView': false,
"ViewType": "GRID"
}
The GRID
value comes from the ViewType enumeration. (Also tried using the in value or lower-case). But all this didn't work.
So, is there a way to achieve this through the REST api?
Edit:
To clarify: sadly, CSOM or PowerShell are not an option.