Audit Trail Management API
{ urn:com.soa.audit.admin } AuditTrailService
The API used to report and manage audit trails.
POST/audittrailAdd Audit Record
Adds an audit trail record.
Sample Request
POST /rest/audittrail HTTP/1.1
Content-Type: application/json
{
"userName" : "jdoe",
"appName" : "console-1",
"action" : "Add Policy",
"description" : "Policy [P1] added.",
"generatedAt" : "2015-05-01T16:21:17
}
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"id" : "10001",
"userName" : "jdoe",
"appName" : "console-1",
"action" : "Add Policy",
"description" : "Policy [P1] added.",
"generatedAt" : "2015-05-01T16:21:17
"workflow" : {
"state" : "UNOBSERVED
"receivedAt" : "2015-05-01T16:21:18",
}
}
Note the id property is not provided in the request but is provided in the response message. The id can then be used when performing workflow actions. The workflow is also auto-generated and provided in the response where it indicates the initial state and when the system received the record.
Parameters
auditWorkflow {
auditComment {
Reponse
auditWorkflow {
auditComment {
GET/audittrailGet Audit Trail
Retrieves the audit records meeting the given criteria. The following usage example illustrates a query for all OBSERVED or RESOLVED records operated on by jdoe between 2015-05-01T16:21:17 and now. It also illustrates paging by asking for records starting from position 50 and to only return 50 records.
Sample Request
GET /rest/audittrail?state=OBSERVED&state=RESOLVED&actor=jdoe&from=2015-05-01T16:21:17&start=50&count=50 HTTP/1.1
Accept: application/json
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"totalCount" : "50",
"records" : [
{
"id" : "10001",
"userName" : "jdoe",
"appName" : "console-1",
"action" : "Add Policy",
"description" : "Policy [P1] added.",
"generatedAt" : "2015-05-01T16:21:17
"workflow" : {
"state" : "RESOLVED",
"receivedAt" : "2015-05-01T16:21:18",
"observedBy" : "jdoe",
"observedAt" : "2015-05-01T17:20:10",
"resolvedBy" : "jdoe",
"resolvedAt" : "2015-05-01T18:32:40",
"comments" : [
{
"commentId" : "1",
"comment" : "Will investigate.",
"userName" : "jdoe",
"createdAt" : "2015-05-01T17:20:10"
},
{
"commentId" : "2",
"comment" : "Figured it out.",
"userName" : "jdoe",
"createdAt" : "2015-05-01T18:32:40"
}
]
}
},
... not shown for brevity ...
],
"listIncomplete" : "true"
}
The *listIncomplete* field in the response indicates there are more records
beyond the 50 that match the given criteria.
Parameters
Reponse
auditRecord {
auditWorkflow {
auditComment {
PUT/audittrail/{id}/workflowPerform Workflow Action
Performs a workflow action on the audit record with the given ID. A usage example is as follows:
Sample Request
PUT /rest/audittrail/10001/workflow HTTP/1.1
{
"action" : "OBSERVE",
"comment" : "Observed record, no action taken",
"userName" : "jdoe"
}
Sample Response
HTTP/1.1 200 OK
Parameters
Reponse
auditComment {