Audit Search Generic API
Overview
The Audit Search Generic API retrieves audit history for business resources.
The API has the following characteristics:
-
Uses a root resource as the entry point.
-
Requires the root resource identifier as mandatory in search queries.
-
Returns audit records for the specified root resource together with the list of entities and users referenced by the returned audit records.
Request
To retrieve the audit history for a root resource, send the following POST request:
http://[hostName]:[portNumber]/[api-context-root]/generic/<resource>/audit/search
Sample Request
{
"resource": {
"q": "(rootIdentifier.eq('<GID>'))",
"limit": 50,
"offset": 0,
"orderBy": "updatedDate:desc"
}
}
Sample Response
{
"totalResults": 1000,
"offset": 0,
"count": 50,
"hasMore": true,
"limit": 50,
"items": [
{
"id": 123,
"baseTableId": 42489248540,
"identifier": "POL42489248540",
"entityName": "Policy",
"parentId": 42489248540,
"primaryIdentifier": "POL42489248540",
"fieldName": "status",
"oldValue": "EDIT",
"newValue": "Approved",
"updateById": "1",
"updateByName": "John",
"updatedDate": {
"value": "2026-04-03T11:10:34.171+01:00"
},
"operation": "UPDATE"
},
{
"id": 124,
"baseTableId": 42489248540,
"identifier": "POL42489248540",
"entityName": "Policy",
"parentId": 42489248540,
"primaryIdentifier": "POL42489248540",
"fieldName": "brand",
"oldId": 6132934,
"oldValue": "BRAND-A1",
"newValue": "BRAND-X",
"newId": "5957817",
"updateById": "7",
"updateByName": "James",
"updatedDate": {
"value": "2026-04-03T11:10:34.171+01:00"
},
"operation": "UPDATE"
},
{
"id": 125,
"baseTableId": 40310184017,
"identifier": "POL42489248540-41321412142",
"entityName": "PolicyEnrollmentProduct",
"parentId": 42489248540,
"primaryIdentifier": "POL42489248540",
"fieldName": "startDate",
"oldValue": "2026-04-23",
"newValue": "2026-04-25",
"updateById": "7",
"updateByName": "James",
"updatedDate": {
"value": "2026-04-03T11:10:34.171+01:00"
},
"operation": "UPDATE"
},
{
"id": 126,
"baseTableId": 40310184017,
"identifier": "POL42489248540-41321412142",
"entityName": "PolicyEnrollmentProduct",
"parentId": 42489248540,
"primaryIdentifier": "POL42489248540",
"fieldName": "charge",
"oldValue": "875",
"type": "Amount",
"oldCurrencyCode": "USD",
"newValue": "789",
"newCurrencyCode": "USD",
"updateById": "7",
"updateByName": "James",
"updatedDate": {
"value": "2026-04-03T11:10:34.171+01:00"
},
"operation": "UPDATE"
}
],
"links": [
{
"rel": "self",
"href": "/api/generic/audit/policies/search",
"httpMethod": "POST",
"body": {
"resource": {
"q": "(primaryIdentifier.eq('POL42489248540'))",
"totalResults": true,
"offset": 0,
"limit": 50,
"name": "<rootResource>",
"orderBy": "updatedDate:desc"
}
}
},
{
"rel": "next",
"href": "/api/generic/audit/policies/search",
"httpMethod": "POST",
"body": {
"resource": {
"q": "(primaryIdentifier.eq('POL42489248540'))",
"totalResults": true,
"offset": 50,
"limit": 50,
"name": "<rootResource>",
"orderBy": "updatedDate:desc"
}
}
}
],
"users": [
{
"displayName": "James",
"id": 7
},
{
"displayName": "John",
"id": 8
}
],
"entities": [
{
"entityName": "PolicyEnrollmentProduct",
"id": "8092905"
},
{
"entityName": "Policy",
"id": 7994305
}
]
}
Authorization and Access Control
The API enforces the same access restrictions as the underlying business resources.
-
Users can retrieve audit data only for resources they are authorized to access.
-
If access to an entity, record, or field is restricted, the corresponding audit data is not returned.
-
These checks ensure that audit data does not bypass existing security controls or expose sensitive information.
Response Messages
| HTTP Status | Description |
|---|---|
204 |
No Content |
401 |
Unauthorized |
404 |
Not Found |
422 |
Unprocessable Entity - Missing mandatory |
See Response Messages for more details.