diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index da5e0c3a3b..0e59124dc9 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -275,6 +275,24 @@ namespace Umbraco.Web.Editors return false; } + /// + /// Creates a blueprint from a content item + /// + /// The content id to copy + /// The name of the blueprint + /// + public IHttpActionResult CreateBlueprintFromContent(int contentId, string name) + { + var content = Services.ContentService.GetById(contentId); + if (content == null) return NotFound(); + + var blueprint = Services.ContentService.CreateContentFromBlueprint(content, name, Security.GetUserId()); + + Services.ContentService.SaveBlueprint(blueprint, Security.GetUserId()); + + return Ok(); + } + /// /// Saves content ///