From f710a598a9a68e58ed631a292adb0fca916e6c82 Mon Sep 17 00:00:00 2001 From: Elios Buzo Date: Tue, 10 Jun 2025 14:56:56 +0200 Subject: [PATCH 1/3] [DURACOM-372] Added audit documentation --- endpoints.md | 1 + 1 file changed, 1 insertion(+) diff --git a/endpoints.md b/endpoints.md index 1c385f5..bb17647 100644 --- a/endpoints.md +++ b/endpoints.md @@ -36,6 +36,7 @@ * [/api/submission/workspaceitems](workspaceitems.md) * [/api/submission/vocabularies](vocabularies.md) * [/api/submission/vocabularyEntryDetails](vocabularyEntryDetails.md) +* [/api/system/auditevents](auditevents.md) * [/api/system/systemwidealerts](systemwidealerts.md) * [/api/versioning/versions](versions.md) * [/api/versioning/versionhistories](versionhistories.md) From 87d4b5dbad55dd276af1deaf5aba4ef69e225fd6 Mon Sep 17 00:00:00 2001 From: Elios Buzo Date: Tue, 10 Jun 2025 14:59:21 +0200 Subject: [PATCH 2/3] [DURACOM-372] Added audit documentation --- auditevents.md | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 auditevents.md diff --git a/auditevents.md b/auditevents.md new file mode 100644 index 0000000..5c58e43 --- /dev/null +++ b/auditevents.md @@ -0,0 +1,68 @@ +# Admin Audit Events Endpoints +[Back to the list of all defined endpoints](endpoints.md) + +This endpoint allows administrators to check the events recorded in the audit log. + +## Main Endpoint +**GET /api/system/auditevents** + +This endpoint will return a list of all the events recorded in the audit log. + +The supported parameters are: +* page, size [see pagination](README.md#Pagination) +* sort, only timeStamp is supported + +Return codes: +* 200 OK - if the operation succeed +* 401 Unauthorized - if you are not authenticated +* 403 Forbidden - if you are not logged in with sufficient permissions. Only system administrators can access the audit events +* 404 Not Found - if the audit system is not enabled + +## Single Event +**GET /api/system/auditevents/<:event-uuid>** + +This endpoint will return details about the event + +```json +{ + "id" : "954e5cfa-6990-4c85-ae42-f30d8c7888e2", + "eventType" : "ADD", + "timeStamp" : "2017-11-22T10:29:11Z", + "detail" : "...", + "subjectUUID" : "...uuid...", + "subjectType" : "Collection", + "objectUUID" : "...uuid...", + "objectType" : "Item", + "type" : "auditevent", + "_links" : { + "self" : { + "href" : "/api/system/auditevents/954e5cfa-6990-4c85-ae42-f30d8c7888e2" + }, + "eperson" : { + "href" : "/api/system/auditevents/954e5cfa-6990-4c85-ae42-f30d8c7888e2/eperson" + }, + "subject" : { + "href" : "/api/system/auditevents/954e5cfa-6990-4c85-ae42-f30d8c7888e2/subject" + }, + "object" : { + "href" : "/api/system/auditevents/954e5cfa-6990-4c85-ae42-f30d8c7888e2/object" + } + } +} +``` + +## Search Events +**GET /api/system/auditevents/search/findByObject?object=<:uuid>** + +This supports a basic search of events related to an object + +The supported parameters are: +* page, size [see pagination](README.md#Pagination) +* sort, only timeStamp is supported +* object: mandatory, the uuid of the object that is involved in the Event (as subject or otherObjet) + +Return codes: +* 200 OK - if the operation succeed +* 401 Unauthorized - if you are not authenticated +* 403 Forbidden - if you are not logged in with sufficient permissions. Only system administrators can access the audit events +* 404 Not Found - if the audit system is not enabled \ No newline at end of file From 09c422bd04b0e62e0c78d960a0e81e70b9efaba2 Mon Sep 17 00:00:00 2001 From: Piaget Bouaka Donfack Date: Tue, 22 Jul 2025 14:04:35 +0200 Subject: [PATCH 3/3] [DURACOM-372] Added audit documentation --- auditevents.md | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/auditevents.md b/auditevents.md index 5c58e43..e31fdf1 100644 --- a/auditevents.md +++ b/auditevents.md @@ -25,27 +25,35 @@ This endpoint will return details about the event ```json { - "id" : "954e5cfa-6990-4c85-ae42-f30d8c7888e2", - "eventType" : "ADD", - "timeStamp" : "2017-11-22T10:29:11Z", - "detail" : "...", - "subjectUUID" : "...uuid...", - "subjectType" : "Collection", - "objectUUID" : "...uuid...", - "objectType" : "Item", - "type" : "auditevent", - "_links" : { - "self" : { - "href" : "/api/system/auditevents/954e5cfa-6990-4c85-ae42-f30d8c7888e2" + "id": "d7ca31fc-50a4-4a85-89ea-599fc1494f12", + "epersonUUID": "685369f5-e169-48b3-bedc-70e5d03f8ce2", + "objectUUID": null, + "objectType": null, + "subjectUUID": "e173a574-2de3-4f4a-843d-62fcfc4d2109", + "subjectType": "COMMUNITY", + "eventType": "MODIFY_METADATA", + "timeStamp": "2025-07-21T14:49:54.718+00:00", + "detail": null, + "metadataField": "dc_identifier_uri", + "value": "http://localhost:4000/handle/123456789/7", + "authority": "", + "confidence": -1, + "place": 0, + "action": "ADD", + "checksum": null, + "type": "auditevent", + "_links": { + "eperson": { + "href": "http://localhost:8080/server/api/system/auditevents/d7ca31fc-50a4-4a85-89ea-599fc1494f12/eperson" }, - "eperson" : { - "href" : "/api/system/auditevents/954e5cfa-6990-4c85-ae42-f30d8c7888e2/eperson" + "object": { + "href": "http://localhost:8080/server/api/system/auditevents/d7ca31fc-50a4-4a85-89ea-599fc1494f12/object" }, - "subject" : { - "href" : "/api/system/auditevents/954e5cfa-6990-4c85-ae42-f30d8c7888e2/subject" + "subject": { + "href": "http://localhost:8080/server/api/system/auditevents/d7ca31fc-50a4-4a85-89ea-599fc1494f12/subject" }, - "object" : { - "href" : "/api/system/auditevents/954e5cfa-6990-4c85-ae42-f30d8c7888e2/object" + "self": { + "href": "http://localhost:8080/server/api/system/auditevents/d7ca31fc-50a4-4a85-89ea-599fc1494f12" } } }