View Source
Class PackageController
A controller used for managing packages in the back office
Inheritance
System.Object
Microsoft.AspNetCore.Mvc.ControllerBase
Assembly: Umbraco.Web.BackOffice.dll
Syntax
[PluginController("UmbracoApi")]
[Authorize(Policy = "SectionAccessPackages")]
public class PackageController : UmbracoAuthorizedJsonController, IUmbracoFeature, IDiscoverable
Constructors
View Source
PackageController(IPackagingService, IBackOfficeSecurityAccessor, PackageMigrationRunner, ILogger<PackageController>)
Declaration
public PackageController(IPackagingService packagingService, IBackOfficeSecurityAccessor backofficeSecurityAccessor, PackageMigrationRunner packageMigrationRunner, ILogger<PackageController> logger)
Parameters
Methods
View Source
DeleteCreatedPackage(Int32)
Deletes a created package
Declaration
[HttpPost]
[HttpDelete]
public IActionResult DeleteCreatedPackage(int packageId)
Parameters
Type |
Name |
Description |
System.Int32 |
packageId |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.IActionResult |
|
View Source
DownloadCreatedPackage(Int32)
Declaration
[HttpGet]
public IActionResult DownloadCreatedPackage(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.IActionResult |
|
View Source
GetCreatedPackageById(Int32)
Declaration
public ActionResult<PackageDefinition> GetCreatedPackageById(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
View Source
GetCreatedPackages()
Declaration
public IEnumerable<PackageDefinition> GetCreatedPackages()
Returns
View Source
GetEmpty()
Declaration
public PackageDefinition GetEmpty()
Returns
View Source
GetInstalled()
Returns all installed packages - only shows their latest versions
Declaration
public IEnumerable<InstalledPackage> GetInstalled()
Returns
View Source
GetInstalledPackageByName(String)
Declaration
public ActionResult<InstalledPackage> GetInstalledPackageByName([FromQuery] string packageName)
Parameters
Type |
Name |
Description |
System.String |
packageName |
|
Returns
View Source
PostSavePackage(PackageDefinition)
Creates or updates a package
Declaration
public ActionResult<PackageDefinition> PostSavePackage(PackageDefinition model)
Parameters
Returns
View Source
RunMigrations(String)
Declaration
[HttpPost]
public ActionResult<IEnumerable<InstalledPackage>> RunMigrations([FromQuery] string packageName)
Parameters
Type |
Name |
Description |
System.String |
packageName |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.ActionResult<IEnumerable<InstalledPackage>> |
|