|
| 1 | +# Admin Audit Events Endpoints |
| 2 | +[Back to the list of all defined endpoints](endpoints.md) |
| 3 | + |
| 4 | +This endpoint allows administrators to check the events recorded in the audit log. |
| 5 | + |
| 6 | +## Main Endpoint |
| 7 | +**GET /api/system/auditevents** |
| 8 | + |
| 9 | +This endpoint will return a list of all the events recorded in the audit log. |
| 10 | + |
| 11 | +The supported parameters are: |
| 12 | +* page, size [see pagination](README.md#Pagination) |
| 13 | +* sort, only timeStamp is supported |
| 14 | + |
| 15 | +Return codes: |
| 16 | +* 200 OK - if the operation succeed |
| 17 | +* 401 Unauthorized - if you are not authenticated |
| 18 | +* 403 Forbidden - if you are not logged in with sufficient permissions. Only system administrators can access the audit events |
| 19 | +* 404 Not Found - if the audit system is not enabled |
| 20 | + |
| 21 | +## Single Event |
| 22 | +**GET /api/system/auditevents/<:event-uuid>** |
| 23 | + |
| 24 | +This endpoint will return details about the event |
| 25 | + |
| 26 | +```json |
| 27 | +{ |
| 28 | + "id" : "954e5cfa-6990-4c85-ae42-f30d8c7888e2", |
| 29 | + "eventType" : "ADD", |
| 30 | + "timeStamp" : "2017-11-22T10:29:11Z", |
| 31 | + "detail" : "...", |
| 32 | + "subjectUUID" : "...uuid...", |
| 33 | + "subjectType" : "Collection", |
| 34 | + "objectUUID" : "...uuid...", |
| 35 | + "objectType" : "Item", |
| 36 | + "type" : "auditevent", |
| 37 | + "_links" : { |
| 38 | + "self" : { |
| 39 | + "href" : "/api/system/auditevents/954e5cfa-6990-4c85-ae42-f30d8c7888e2" |
| 40 | + }, |
| 41 | + "eperson" : { |
| 42 | + "href" : "/api/system/auditevents/954e5cfa-6990-4c85-ae42-f30d8c7888e2/eperson" |
| 43 | + }, |
| 44 | + "subject" : { |
| 45 | + "href" : "/api/system/auditevents/954e5cfa-6990-4c85-ae42-f30d8c7888e2/subject" |
| 46 | + }, |
| 47 | + "object" : { |
| 48 | + "href" : "/api/system/auditevents/954e5cfa-6990-4c85-ae42-f30d8c7888e2/object" |
| 49 | + } |
| 50 | + } |
| 51 | +} |
| 52 | +``` |
| 53 | + |
| 54 | +## Search Events |
| 55 | +**GET /api/system/auditevents/search/findByObject?object=<:uuid>** |
| 56 | + |
| 57 | +This supports a basic search of events related to an object |
| 58 | + |
| 59 | +The supported parameters are: |
| 60 | +* page, size [see pagination](README.md#Pagination) |
| 61 | +* sort, only timeStamp is supported |
| 62 | +* object: mandatory, the uuid of the object that is involved in the Event (as subject or otherObjet) |
| 63 | + |
| 64 | +Return codes: |
| 65 | +* 200 OK - if the operation succeed |
| 66 | +* 401 Unauthorized - if you are not authenticated |
| 67 | +* 403 Forbidden - if you are not logged in with sufficient permissions. Only system administrators can access the audit events |
| 68 | +* 404 Not Found - if the audit system is not enabled |
0 commit comments