Skip to main content
GET
/
api
/
v1
/
school
/
audit-logs
List audit logs
curl --request GET \
  --url https://test-api.afrainity.com/api/v1/school/audit-logs/ \
  --header 'Authorization: Bearer <token>'
[
  {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "actor": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "actor_name": "<string>",
    "action": "CREATE",
    "table_name": "<string>",
    "record_id": "<string>",
    "changes": "<unknown>",
    "timestamp": "2023-11-07T05:31:56Z",
    "ip_address": "<string>"
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

action
enum<string>
  • CREATE - CREATE
  • UPDATE - UPDATE
  • DELETE - DELETE
Available options:
CREATE,
DELETE,
UPDATE
ordering
string

Which field to use when ordering the results.

A search term.

table_name
string

Response

200 - application/json
id
string<uuid>
actor
string<uuid>
actor_name
string
action
enum<string>
  • CREATE - CREATE
  • UPDATE - UPDATE
  • DELETE - DELETE
Available options:
CREATE,
UPDATE,
DELETE
table_name
string

Model name (e.g., 'StudentAdmission')

record_id
string

Primary key of the affected record

changes
any

Stores field changes as {field_name: {'from': old_value, 'to': new_value}}

timestamp
string<date-time>
ip_address
string | null

IP address of the actor