Let’s Capture Missing or Insufficient SharePoint REST Endpoints
Today I got an alert that the SharePoint UserVoice suggestion from Corey Roth (@coreyroth) entitled Add managed metadata term store operations to REST API got the coveted “Thinking About It” tag from the Product Group. I like to tweet out changes like this to let people know the Product Group is listening and acting on our feedback – beyond saying “That’s good feedback!” It’s not all wine and roses, though:
Thank you for your feedback! Just letting you know that we absolutely have this in our backlog, but unfortunately this currently is not included in our short term engineering tasks. We absolutely understand the request and seeing vote counts around this, will help to further prioritize this work for next sprints.
I got a couple of tweets back right away pointing out some other current holes in the REST APIs.
https://twitter.com/ChrispyBites/status/864832429143601153
Finally !! Couple of things missing – getting Publishing fields like PublishingPageContent,PublishingPageImage etc via REST API, 1/n
— Gautam Sheth (@gautamdsheth) May 17, 2017
If you think there are other endpoints the REST APIs need or endpoints that don’t work well, please add them to the comments here. I’ll work them up into a list for the Product Group and let’s see what we can get moving! We’ll play by the rules and add the list to UserVoice, but I think all the individual suggestions get lost and it’s harder to see the bigger picture. For each item on the list, I’ve tried to capture related UserVoice suggestions.
The list so far:
Lists
- Editing/adding Property Bag values (@alexaterentiev)
- Allow all list/library advanced settings be accessible via CSOM/REST
- “Better support for folders”? (@robwindsor)
- The ability to filter by a multiline column (@Rodrigo_Romano)
- Ability to use $filter on Calculated column and Single value Taxonomy column label (@gautamdsheth)
- Enable support for lookup columns in other webs in the REST API (Me!) https://sharepoint.uservoice.com/forums/329220-sharepoint-dev-platform/suggestions/9065329-enable-support-for-lookup-columns-in-other-webs-in
- Create list item in a folder (@jfj1997)
- Query for a null date (Nathan Malovrh)
Calendars
- Recurring Events – I have a long post in the works explaining how I handle this with a combination of REST and SOAP (with SPServices), and it isn’t pretty
Libraries
- Document Set creation still requires listdata.svc (@ChrispyBites)
- Version history (@merill) – Provide the Version History feature on list items with CSOM and/or REST, i.e. provide which metadata has changed with the previous value. Currently, the only way to retrieve versions is through the FileVersionCollection/FileVersion objects which provides only the VersionLabel, CreatedBy, CreationDate and Version Url. Ideally, we would need a ListItem object holding all the attributes and values for each version. (John Gunning)
Permissions
- It’s nearly impossible to query properly and easily the Site administrators. First the property is not there, second if you try other methods like filtering on IsOwner, you get exceptions if current user has low permissions. Querying on a permissions level base is slow when we have a lot of security entries and leads to exceptions as well. (@baywet)
https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spweb.siteadministrators.aspx
https://msdn.microsoft.com/en-us/library/office/dn499819.aspx#bk_Web - Getting all users that have “this permission level” is a really difficult thing with REST (@baywet)
Managed Metadata / Taxonomy
- Managed Metadata (aka Term Sets or Taxonomy – please stop making up multiple names for things Microsoft!!!)
Search
- Recurring events via the Search endpoint (Derek Gusoff)
Publishing
- Publishing – PublishingPageContent, PublishingPageImage (@gautamdsheth)
Workflows
- Starting a site workflow – StartWorkflowOnListItemBySubscriptionId & StartWorkflow are only for list items (@BradOrluk)
Microsoft Graph
- Easily get a graph access token (anonymous)
Groups
- SharePoint groups – Changing group owners has a bug such that you can’t change them using REST (Mike)
User Profiles
- Allow custom user profile property to be filtered using the $filter parameter (@gautamdsheth)
Other
- Edit and manage web parts (anonymous)
Content Types
From an issue in the PnPjs repo: While we can create Content Types and Site Columns through REST, there’s no way to add a Site Column to a Content Type. We can do this in Site Designs (I’ll hold my tongue about these) and PnP Provisioning Templates, so the underlying capability exists.
Enable / disable email notifications on Task lists (EnableAssignToEmail property of SPList)
Ability to overwrite list item attachments. We don’t have this support , so we need to delete the existing attachment and re-upload the attachment.
Hey Marc,
Thanks for helping us getting a better API.
Today one of my dev’s asked me a question, which I thinks points out to a gap in the REST API.
It’s nearly impossible to query properly and easily the Site administrators. First the property is not there, second if you try other methods like filtering on IsOwner, you get exceptions if current user has low permissions. Querying on a permissions level base is slow when we have a lot of security entries and leads to exceptions as well
https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spweb.siteadministrators.aspx
https://msdn.microsoft.com/en-us/library/office/dn499819.aspx#bk_Web
Server Side Object model has an SPSite.AllWebs property that contained all the webs (and not just immediate subweb or rootweb of the site collection.
https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spsite.allwebs.aspx
It would be nice to have this in CSOM and REST – Site.AllWebs should return a collection of WebInformation classes.
https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.client.webinformation_members.aspx
Note, because of the nature of CSOM and REST – this will have to be security trimmed so you won’t see webs that you can’t see.
Along with the Recurring Events issue with calendars, include the issues that you cannot obtain the RecurrenceData without making a separate call as well as the fact you cannot filter on EventDate and EndDate (“the field end date of type datetime cannot be used in the query filter expression”).
Much appreciated.
Update my user profile via REST? Would that be a good candidate? I cannot find that at the moment looking at the REST endpoints.
@VelinGeorgiev:
That’s available in the Microsoft Graph API, I believe.
M.
Hey Marc, trying to filter by null dates with a rest call is unsupported.
@Nathan:
Added to the list!
M.
Hi Marc, nice initiative!
One I recently encountered was the lack of REST endpoint to capture a version of a document set!
@Nils:
Thanks! Document Sets are definitely an area where REST needs some love. The MS folks are well aware of that, but no time frame yet.
M.