Class GroupedObservationsController
- Namespace
- adas_core.Controllers
- Assembly
- adas-core.dll
[Route("grouped-observations")]
[ApiController]
public class GroupedObservationsController : ControllerBase
- Inheritance
-
GroupedObservationsController
- Inherited Members
- Extension Methods
Constructors
GroupedObservationsController(IGroupedObservationService)
public GroupedObservationsController(IGroupedObservationService groupedObservationService)
Parameters
groupedObservationServiceIGroupedObservationService
Methods
GetGroupedObservationAsync(string, GroupedField)
Generates a grouped observation for the specified source identifier based on the provided grouping configuration. Validates that the supplied identifier is a valid ObjectId before delegating to the grouped observation service.
[HttpPost]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
[PermissionAuthorize("Source", "DisplayId")]
public Task<IActionResult> GetGroupedObservationAsync(string id, GroupedField groupedConfig)
Parameters
idstringThe string identifier of the source for which the grouped observation is generated; must be a valid ObjectId.
groupedConfigGroupedFieldThe configuration that defines how observations should be grouped.
Returns
- Task<IActionResult>
An IActionResult containing the generated grouped observation wrapped in an HTTP 200 OK response.
Exceptions
- BadRequestException
Thrown when
idis null, empty, or not in a valid ObjectId format.