Node Audit API
Node Audit API
The Node Audit API provides access to audit trail and change history of a node in a JSON format.
It allows retrieval of events such as node creation, modification, and deletion, including who performed the action and when it occurred.
The Audit API is available in opCore from opCharts version 4.9.1 and later.
Authentication is required to access all methods described below.
Public API for Node Audit
You can view and retrieve audit history data using these endpoints:http[s]://server/omk/opCore/v2/audit/"node_uuid"
API Routes:
Request Method | Operation | URL Example | id required | Notes |
|---|---|---|---|---|
GET | read audit details |
| y | Returns audit information for a specific record, including the what, who, when, and status of actions (e.g. create, edit, delete). |
API Responses:
Condition | HTTP Code |
| Typical | Example |
|---|---|---|---|---|
Record found | 200 | 0 or omitted | (none) | JSON object with |
No record found | 400 | 1 |
| {
"error": 1,
"message": "Error loading data, No data found for requested match"
} |
Invalid UUID | 400 | 1 |
| Same structure |
Permission issue | 200 or 403 | 1 |
| Depends on user role |
Examples:
Success:
{
"created": {
"details": "1d2b430b-fc0e-4f79-88e3-8c8a790d9fed",
"extra": "my-node-1\n",
"status": "ok",
"what": "create node",
"when": "2025-09-02T05:19:18",
"who": "omkapiha"
},
"deleted": {
"details": "1d2b430b-fc0e-4f79-88e3-8c8a790d9fed",
"extra": "my-node-12\n",
"status": "ok",
"what": "delete node",
"when": "2025-09-02T05:20:44",
"who": "omkapiha"
},
"last_updated": {
"details": "1d2b430b-fc0e-4f79-88e3-8c8a790d9fed",
"extra": "my-node-12\n",
"status": "ok",
"what": "edit node",
"when": "2025-09-02T05:19:43",
"who": "omkapiha"
}
}
Failure:
{
"error": 1,
"message": "Error loading data, No data found for requested match"
}