// ========================================================================== // Squidex Headless CMS // ========================================================================== // Copyright (c) Squidex UG (haftungsbeschränkt) // All rights reserved. Licensed under the MIT license. // ========================================================================== using Microsoft.AspNetCore.Mvc; using Squidex.Infrastructure.Commands; using Squidex.Pipeline; using Squidex.Shared; namespace Squidex.Areas.Api.Controllers.Ping { /// /// Makes a ping request. /// [ApiExplorerSettings(GroupName = 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. /// [HttpGet] [Route("ping/{app}/")] [ApiPermission(Permissions.AppCommon)] [ApiCosts(0)] public IActionResult GetAppPing(string app) { return NoContent(); } } }