Package org.saidone.controller
Class AuditApiController
java.lang.Object
org.saidone.controller.AuditApiController
REST controller exposing read-only operations for the audit log.
All endpoints require basic authentication and delegate the retrieval of
entries to AuditServiceImpl
.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<List<AuditEntry>> getEntries
(String auth, String type, Instant from, Instant to, int page, int size) Retrieves audit entries optionally filtered by type and timestamp range.
-
Constructor Details
-
AuditApiController
public AuditApiController()
-
-
Method Details
-
getEntries
@GetMapping public org.springframework.http.ResponseEntity<List<AuditEntry>> getEntries(@RequestHeader(value="Authorization",required=false) String auth, @RequestParam(required=false) String type, @RequestParam(required=false) Instant from, @RequestParam(required=false) Instant to, @RequestParam(required=false,defaultValue="0") int page, @RequestParam(required=false,defaultValue="20") int size) Retrieves audit entries optionally filtered by type and timestamp range.- Parameters:
auth
- optional Basic authentication headertype
- filter by entry typefrom
- start timestamp (inclusive)to
- end timestamp (inclusive)page
- page numbersize
- page size- Returns:
- the list of matching audit entries
-