---
search:
  tags:
    - Audit
    - GET
seo:
  description: >-
    Admin only. Returns a page of the trail, newest first, with the user name on
    each row.… Reference for the GET /api/v1/audit endpoint in the PharmaFlow
    API.
sidebar:
  label: List audit entries
  badge: GET
title: List audit entries
type: openapi-operation
---
Admin only. Returns a page of the trail, newest first, with the user name on each row. Filters are optional and combined; search spans entity, id, action, user name, and payloads.

`GET /api/v1/audit`

**Responses**

- `200` — A page of audit entries
- `401` — Not authenticated
- `403` — Caller is not an admin

Response example, 200:

```json
{
  "total": -9007199254740991,
  "page": -9007199254740991,
  "page_size": -9007199254740991,
  "items": [
    {
      "id": "string",
      "user_id": "string",
      "branch_id": "string",
      "device_id": "string",
      "entity": "string",
      "entity_id": "string",
      "action": "string",
      "before_json": "string",
      "after_json": "string",
      "ip": "string",
      "created_at": "string",
      "user_name": "string"
    }
  ]
}
```
