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.
Top of my head, starting a site workflow – StartWorkflowOnListItemBySubscriptionId & StartWorkflow are only for list items
The current implementation supports site workflows. Try this little snippet out:
https://gist.github.com/iOnline247/1b3c26f7175296a44274
After chatting with Marc, I should elaborate…
The wrapper I wrote should highlight the hoops you have to jump through that aren’t necessary.
The major pain point dating back to the asmx days are you need the ID of the workflow. What we really need is to be able to fire these workflows via display name. You can’t have a duplicates of the same workflow name, just like lists work, so it should be a guarantee that using the name will work as expected
_api/web/workflows/wfName as a POST should fire; or site instead of web for site workflows. 2 cents from the front lines.
Recurring events via the Search endpoint. Suppose I query for all events in May 2017, and the recurring event was created earlier than that. Search won’t return the May instances, nor will it return the original event.
We need this… It’s a must have. <3
Editing/adding Property Bag values
Better support for folders. Access to more of the property bags.
@Rob:
What are you looking for with folders? Specifics are good!
M.
There is no REST API to read the column properties of a particular version history item in a document library. You can only read the latest version history.
The inconsistency is that it is possible to do so for a list library.
https://sharepoint.uservoice.com/forums/329220-sharepoint-dev-platform/suggestions/15147150-provide-items-version-history-with-csom
Better worded requirement for versioning
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
1) Publishing fields like – PublishingPageContent, PublishingPageImage etc.
2) Single Value taxonomy(managed metadata) column via a GET request
(/_api/web/lists/getbytitle(‘ListName’)/items) endpoint, currently get guid.
3) Ability to use $filter on Calculated column and Single value Taxonomy column label
4) Allow custom user profile property to be filtered using the $filter parameter
PS – Mark, minor correction , the twitter handle is @gautamdsheth and not @gautamsheth :)
Thanks Marc!
It’s already a serious list of missing features collected. Most of them aching from time to time causing face palms of how some issues or gaps could be there in SharePoint for years without any fixes. Like completely missing API to MMD or receiving single valued taxonomy column without switching to get by CAML method. Or Document Sets basics, even not a configuration, or file and documents versions API, or property bags.
Let me add one more not mentioned by folks above, it is extending UPS methods with managing/modifying properties for profiles of other users (the methods presented in CSOM).
Hello Marc,
Expand ($expand) fields shouldn’t return an error when the field is null, when using _api/web/Lists… it works when you are using the legacy api /_vti_bin/ListData.svc
The ability to filter by a multiline column.
Those are the ones off the top of my head.
Congratulations for the initiative.
@Rodrigo:
I haven’t seen that issue. Any specific conditions or field types?
M.
Sharepoint groups and changing sp group owners, which has a bug that you can’t change sp group owners using rest.