Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions api-docs/Audit-Manager-Controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,31 @@ paths:
application/json:
schema:
"$ref": "#/components/schemas/RequestWrapperAuditRequestDto"
examples:
AuditExmaple:
summary: Example audit request
value:
id: "REQ-001"
version: "1.0"
requesttime: "2025-07-06T10:45:00Z"
metadata: {}
request:
eventId: "EVT-20230704-001"
eventName: "UserLogin"
eventType: "Authentication"
actionTimeStamp: "2025-07-06T10:45:00Z"
hostName: "auth-server-1"
hostIp: "192.168.1.100"
applicationId: "APP-001"
applicationName: "IdentityManagement"
sessionUserId: "USR-001"
sessionUserName: "johndoe"
id: "ENTITY-001"
idType: "USER_ID"
createdBy: "system"
moduleName: "LoginModule"


required: true
responses:
'200':
Expand All @@ -34,6 +59,17 @@ paths:
application/json:
schema:
"$ref": "#/components/schemas/ResponseWrapperAuditResponseDto"
examples:
AuditSuccessResponse:
summary: Succesful audit record creation
value:
id: "RESP-001"
version: "1.0"
responsetime: "2025-07-06T10:45:30Z"
metadata: {}
response:
status: true
errors: []
'401':
description: Unauthorized
'403':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
*/
@RestController
@Tag(name = "Audit manager controller", description = "Rest endpoints which consist of operations related to Audit Management")
@Tag(name = "Audit Manager Controller", description = "Rest endpoints which consist of operations related to Audit Management")
public class AuditManagerController {

@Value("${mosip.kernel.auditmanager.add-audit.api-id:mosip.kernel.auditmanager.addAudit}")
Expand All @@ -52,9 +52,9 @@ public class AuditManagerController {
* @param requestDto {@link AuditRequestDto} having required fields for auditing
* @return The {@link AuditResponseDto} having the status of audit
*/
@Operation(summary = "Persist a audit", description = "persist a audit", tags = { "auditmanager" })
@Operation(summary = "Persist a audit", description = "persist a audit", tags = { "Audit Manager Controller" })
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Success or you may find errors in error array in response"),
@ApiResponse(responseCode = "200", description = "Success or you may find errors in error array in response", content = @Content(mediaType = "application/json",schema = @Schema(implementation = ResponseWrapper.class))),
@ApiResponse(responseCode = "401", description = "Unauthorized" ,content = @Content(schema = @Schema(hidden = true))),
@ApiResponse(responseCode = "403", description = "Forbidden" ,content = @Content(schema = @Schema(hidden = true))),
@ApiResponse(responseCode = "404", description = "Not Found" ,content = @Content(schema = @Schema(hidden = true)))})
Expand Down