Skip to content
PharmaFlow Knowledgebase
Esc
↑↓navigate↵open⌘Jpreview

Read an audit entry

Admin only. Returns one entry with both stored payloads parsed back into JSON. An id that matches no row answers 404, and invalid JSON comes back as its stored string.

GET/api/v1/audit/{auditId}
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT from POST /api/v1/auth/login sent as Authorization Bearer.

Path parameters
auditIdstringrequired

The audit entry id.

Responses
200

The audit entry

idstringrequired
user_idstringrequired
branch_idstringrequired
device_idstring | nullrequired
entitystringrequired
entity_idstring | nullrequired
actionstringrequired
before_jsonanyrequired
after_jsonanyrequired
ipstringrequired
created_atstringrequired
user_namestring | nullrequired
401

Not authenticated

detailstringrequired
403

Caller is not an admin

detailstringrequired
404

Audit entry not found

detailstringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET 'http://localhost:8000/api/v1/audit/string' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "id": "string",
  "user_id": "string",
  "branch_id": "string",
  "device_id": "string",
  "entity": "string",
  "entity_id": "string",
  "action": "string",
  "before_json": null,
  "after_json": null,
  "ip": "string",
  "created_at": "string",
  "user_name": "string"
}