Class HealthCheckController
The API controller used to display the health check info and execute any actions
Inheritance
System.Object
Microsoft.AspNetCore.Mvc.ControllerBase
Namespace: Umbraco.Cms.Web.BackOffice.HealthChecks
Assembly: Umbraco.Web.BackOffice.dll
Syntax
[PluginController("UmbracoApi")]
[Authorize(Policy = "SectionAccessSettings")]
public class HealthCheckController : UmbracoAuthorizedJsonController, IUmbracoFeature, IDiscoverable
Constructors
View SourceHealthCheckController(HealthCheckCollection, ILogger<HealthCheckController>, IOptions<HealthChecksSettings>)
Initializes a new instance of the Health
Declaration
public HealthCheckController(HealthCheckCollection checks, ILogger<HealthCheckController> logger, IOptions<HealthChecksSettings> healthChecksSettings)
Parameters
Type | Name | Description |
---|---|---|
Health |
checks | |
Microsoft. |
logger | |
Microsoft. |
healthChecksSettings |
Methods
View SourceExecuteAction(HealthCheckAction)
Executes a given action from a HealthCheck.
Declaration
[HttpPost]
public HealthCheckStatus ExecuteAction(HealthCheckAction action)
Parameters
Type | Name | Description |
---|---|---|
Health |
action |
Returns
Type | Description |
---|---|
Health |
GetAllHealthChecks()
Gets a grouped list of health checks, but doesn't actively check the status of each health check.
Declaration
public object GetAllHealthChecks()
Returns
Type | Description |
---|---|
System. |
Returns a collection of anonymous objects representing each group. |
GetStatus(Guid)
Gets the status of the HealthCheck with the specified id.
Declaration
[HttpGet]
public async Task<object> GetStatus(Guid id)
Parameters
Type | Name | Description |
---|---|---|
Guid | id |
Returns
Type | Description |
---|---|
Task<System. |