U4-6231 - Move all Umbraco.Web.WebServices back office controllers to be proper back office controllers

Created by Shannon Deminick 04 Feb 2015, 00:12:20 Updated by Stephan 26 Jul 2018, 09:27:06

Tags: Up For Grabs

Subtask of: U4-5419

Currently these are all routed to /umbraco/restservices which is bad because half of these are back office and half are front-end, there needs to be a clear separation so people can easily configure firewall rules.


James Coxhead 29 May 2018, 11:31:21

@Shandem is this still up for grabs? I'd like to take it on if it is.

Shannon Deminick 30 May 2018, 06:22:57

Hi! Yup! but first we need to just remove anything that's not used. It may very well be that most things there are not actually used anymore and anything that is still used we'd make a proper back office controller for. Then we remove the routing for the /umbraco/restservices stuff.

If you are up for doing the above that would be amazing! (for v8 of course!)

James Coxhead 31 May 2018, 09:17:20

Great ok, I'll try and put something together over the next week or so.

James Coxhead 07 Jun 2018, 20:41:36

I've gone through the controllers and removed anything that's not being used. Any other controllers have been moved to a more suitable place (Umbraco.Web.Editors) or combined with existing controllers. The exception to that is the Tags Controller, which appears to be a public endpoint for querying data saved with the tags property editor. I wasn't sure where to move this (or even if it's still needed), what are your thoughts?

The UmbracoAuthorizedWebService is still used by some of the older webforms components in the back office (i.e. the sort dialog in the content tree). Should I move this to sit with the services which inherit from this class ( in umbraco.presentation.webservices) so that these are all in one place?

Finally, the UmbracoHttpHandler and UmbracoAuthorizedHttpHandler aren't used in the core - is the intention to keep these and if so what should I do with them?

Shannon Deminick 07 Jun 2018, 23:18:49

Amazing! I think it would be best to submit a PR so we can see the work done and comment on stuff there which is easier to provide feedback than here.

I think the base classes like UmbracoAuthorizedWebService, UmbracoHttpHandler, UmbracoAuthorizedHttpHandler, etc... are fine to keep even if we don't use them. Anything that we are keeping should be moved into proper namespaces since we want to kill anything that is 'umbraco.presentation' :)

Might be a good start to add a TODO to the Tags Controller asking where this is used and then you can decide where best to put these other classes. From there we can see all these things in the PR which will be easier to visualize.

James Coxhead 10 Jun 2018, 19:20:01

I've created the PR [https://github.com/umbraco/Umbraco-CMS/pull/2684 here].

I've moved the remaining classes into the root of the Web project for now - I don't think it's ideal but I couldn't find a more suitable place. The one exception is the UmbracoAuthorizedWebService which I've moved to sit alongside the services which inherit from this to keep them together until they get moved/removed.

Stephan 24 Jul 2018, 13:32:15

Reviewing. I have merged the latest temp8 branch into the PR so if you let me, I can push.

Is it OK to assume that things that are gone (such as CoreStringsController and others) were not used?

James Coxhead 25 Jul 2018, 20:28:48

@zpqrtbnk, yes - anything that has been deleted was not used. I've given you push access to my fork (assuming that's what you need).

Stephan 26 Jul 2018, 09:25:28

Have pushed the temp8 merge to the PR. I am not entirely happy with moving things to the root of the web project, as you mention, but I cannot think of a better place for now - we'll do that later. You've done all the hard work, it seems. So, going to merge.

Priority: Up for grabs

Type: Task

State: Fixed


Difficulty: Normal


Backwards Compatible: False

Fix Submitted:

Affected versions:

Due in version: 8.0.0


Story Points: