// ========================================================================== // Squidex Headless CMS // ========================================================================== // Copyright (c) Squidex UG (haftungsbeschränkt) // All rights reserved. Licensed under the MIT license. // ========================================================================== using Microsoft.AspNetCore.Mvc; using NSwag.Annotations; using Squidex.Infrastructure.Commands; using Squidex.Pipeline; namespace Squidex.Areas.Api.Controllers.Ping { /// /// Makes a ping request. /// [ApiExceptionFilter] [SwaggerTag(nameof(Ping))] public sealed class PingController : ApiController { public PingController(ICommandBus commandBus) : base(commandBus) { } /// /// Get ping status of the API. /// /// /// 204 => Service ping successful. /// /// /// Can be used to test, if the Squidex API is alive and responding. /// [HttpGet] [Route("ping/")] public IActionResult GetPing() { return NoContent(); } /// /// Get ping status. /// /// The name of the app. /// /// 204 => Service ping successful. /// /// /// Can be used to test, if the Squidex API is alive and responding. /// [ApiAuthorize] [ApiCosts(0)] [AppApi] [MustBeAppReader] [HttpGet] [Route("ping/{app}/")] public IActionResult GetPing(string app) { return NoContent(); } } }