Audit Records¶
Retrieve audit record instance¶
-
GET
/api/v1/local/audit_records/
(string: internal_id)/
¶ Retrieve a audit record instance.
Example request:
GET /api/v1/local/audit_records/8eac277c-090e-41c4-adfc-1ecaf14a0134-1565195028.58351993560791015625/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "internal_id": "8eac277c-090e-41c4-adfc-1ecaf14a0134-1565195028.58351993560791015625", "end_point_name": "svc_v1:apio.tenant.group.user.acr", "end_point_full_url": "/api/v1/tenants/ApioSpTest/groups/ApioGrpTest/users/ApioUserTest@sip.netaxis.be/services/acr/", "http_method": "GET", "impacted_tenant_id": "ApioSpTest", "impacted_group_id": "ApioGrpTest", "impacted_user_id": "ApioUserTest@sip.netaxis.be", "impacted_specific_id": "", "author_id": "ApioTenantAdminTest@sip.netaxis.be", "author_role": "12", "request_time": "2019-08-07T18:23:48.583556+02:00", "request_data": "{}", "request_payload": "application/octet-stream", "status_code": 200, "answer_time": "2019-08-07T18:23:48.664234+02:00", "answer_data": "{\"active\": False, \"_record_internal_id\": \"8eac277c-090e-41c4-adfc-1ecaf14a0134-1565195028.58351993560791015625\"}", "answer_payload": "application/json", "extra_data": None, "south_data": "", }
- Response JSON Object:
internal_id (string) – The Id of the audit record
end_point_name (string) – The end point name in APIO notation
end_point_full_url (string) – The url really triggered
http_method (string) – The HTTP method
impacted_tenant_id (string) – The Tenant Id
impacted_group_id (string) – The Group Id
impacted_user_id (string) – The User Id
impacted_specific_id (string) – The Specific Id, aka the Instance Name
author_id (string) – the Id of the user who isued this command
author_role (string) – The role (level) of that user
request_time (string) – The time of the request
request_data (string) – The input data
request_payload (string) – The input data paylaod
answer_time (string) – the tilme of the answer
answer_data (string) – The answer data
answer_payload (string) – The answer data payload
extra_data (string) – for future use
south_data (string) – the messages exchanged at South level if the APIO has been configured to save them
- Status Codes:
200 OK – no error
403 Forbidden – not allowed
404 Not Found – not found
Retrieve audit records for an entity¶
-
GET
/api/v1/local/audit_records/
¶ Retrieve all the audit records for Group, and End User or an Instance
Example request:
GET /api/v1/local/audit_records/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "groupId" : "netaxis" }
- Request JSON Object:
groupId (string) – Filter on that groupId
userId (string) – Filter on that userId
instanceName (string) –
Filter on that instanceName (for example a schedule name)
Note
At least one of the filters must be present
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "auditRecords" : [ { "internal_id": "8eac277c-090e-41c4-adfc-1ecaf14a0134-1565195028.58351993560791015625", "end_point_name": "svc_v1:apio.tenant.group.user.acr", "end_point_full_url": "/api/v1/tenants/ApioSpTest/groups/ApioGrpTest/users/ApioUserTest@sip.netaxis.be/services/acr/", "http_method": "GET", "impacted_tenant_id": "ApioSpTest", "impacted_group_id": "ApioGrpTest", "impacted_user_id": "ApioUserTest@sip.netaxis.be", "impacted_specific_id": "", "author_id": "ApioTenantAdminTest@sip.netaxis.be", "author_role": "12", "request_time": "2019-08-07T18:23:48.583556+02:00", "request_data": "{}", "request_payload": "application/octet-stream", "status_code": 200, "answer_time": "2019-08-07T18:23:48.664234+02:00", "answer_data": "{\"active\": False, \"_record_internal_id\": \"8eac277c-090e-41c4-adfc-1ecaf14a0134-1565195028.58351993560791015625\"}", "answer_payload": "application/json", "extra_data": None, "south_data": "", } ] }
- Response JSON Object:
auditRecords (list) – a list of AuditRecords objects (same structure as for the individual record access)
- Status Codes:
200 OK – no error
403 Forbidden – not allowed
404 Not Found – not found
The South Data¶
The south_data field is a json dump of an array of objects. It contains each request / answer with a Network Element that have been recorded in the context the handling of that API call.
Each object contains the description of a message. Each pair message/answer has a unique internal id in order to be able to correlate them.
It is composed of the following fields (all of type string):
timestamp: The current time in seconds since the Epoch when the message has been sent/received
id: The unique id of the pair message - answer/error
type: One of “request”, “answer”, “error”
protocol: It is indicating the rtype of NE element
BS-OCI: Broadworks OCI message
BS-XSI: Broadworks XSI message
TR: Transcribe server
CR: Call Recording server
PV: Phone Vendor server
content: The message body sent/received (can be empty in some cases if no body). In some error cases it can also be an indication of the type of error.
format: The format of the message: “xml” or “json”.
vendorType: The type of vendor (not for all NE):
for TR: Currently only “Mutare”
for CR: Currently only “Dubber”
for PV: One fo “Cisco”, “Yealink”, “Panasonic”, “Snom”, “Polycom”, “Grandstream”
action: The type of action done as sometimes it is not easy to find out from the content (only in request and for PV, TR, CR): “create”, “read”, “update”, “delete”.
method: For REST based NE (PV, TR, CR), for request only, the HTTP method used.
endpoint: For REST based NE (PV, TR, CR), for request only, the end point (without the FQDN) triggered.
status_code: For REST based NE (PV, TR, CR), for answer only, the HTTP status code received.