View Source
  Class UmbracoAuthorizedApiController
  
  Provides a base class for authorized auto-routed Umbraco API controllers.
 
  
  
    Inheritance
      System.Object
      Microsoft.AspNetCore.Mvc.ControllerBase
      
      
      
   
  
  Assembly: Umbraco.Web.BackOffice.dll
  Syntax
  
    [AngularJsonOnlyConfiguration]
[JsonExceptionFilter]
[UmbracoUserTimeoutFilter]
[Authorize(Policy = "BackOfficeAccess")]
[MiddlewareFilter(typeof(UnhandledExceptionLoggerFilter))]
public abstract class UmbracoAuthorizedApiController : UmbracoApiController
   
  
  
  Methods
  
  
    View Source
  
  GetValidationProblemDetails(String, String, Nullable<Int32>, String, String, ModelStateDictionary)
  
  
  Declaration
  
    protected ValidationProblemDetails GetValidationProblemDetails(string detail = null, string instance = null, int? statusCode = null, string title = null, string type = null, [ActionResultObjectValue] ModelStateDictionary modelStateDictionary = null)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        detail | 
         | 
      
      
        | System.String | 
        instance | 
         | 
      
      
        | System.Nullable<System.Int32> | 
        statusCode | 
         | 
      
      
        | System.String | 
        title | 
         | 
      
      
        | System.String | 
        type | 
         | 
      
      
        | Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary | 
        modelStateDictionary | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ValidationProblemDetails | 
         | 
      
    
  
  
    View Source
  
  ValidationProblem(ModelStateDictionary)
  Overridden to return Umbraco compatible errors
 
  
  Declaration
  
    [NonAction]
public override ActionResult ValidationProblem(ModelStateDictionary modelStateDictionary)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary | 
        modelStateDictionary | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ActionResult | 
         | 
      
    
  
  
    View Source
  
  ValidationProblem(Nullable<IErrorModel>, ModelStateDictionary, Int32)
  Returns a validation problem result for the  and the Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary
 
  
  Declaration
  
    protected virtual ActionResult ValidationProblem(IErrorModel? model, ModelStateDictionary modelStateDictionary, int statusCode = 400)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Nullable<IErrorModel> | 
        model | 
         | 
      
      
        | Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary | 
        modelStateDictionary | 
         | 
      
      
        | System.Int32 | 
        statusCode | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ActionResult | 
         | 
      
    
  
  
    View Source
  
  ValidationProblem(Nullable<INotificationModel>, Int32)
  Returns an Umbraco compatible validation problem for the given notification model
 
  
  Declaration
  
    protected virtual ActionResult ValidationProblem(INotificationModel? model, int statusCode = 400)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Nullable<INotificationModel> | 
        model | 
         | 
      
      
        | System.Int32 | 
        statusCode | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ActionResult | 
         | 
      
    
  
  
    View Source
  
  ValidationProblem(Object, Int32)
  Returns an Umbraco compatible validation problem for the object result
 
  
  Declaration
  
    protected virtual ActionResult ValidationProblem(object value, int statusCode)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Object | 
        value | 
         | 
      
      
        | System.Int32 | 
        statusCode | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ActionResult | 
         | 
      
    
  
  
    View Source
  
  ValidationProblem(String)
  Returns an Umbraco compatible validation problem for the given error message
 
  
  Declaration
  
    protected virtual ActionResult ValidationProblem(string errorMessage)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        errorMessage | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.AspNetCore.Mvc.ActionResult | 
         |