# GET /audit

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the security group.

List audit log entries

- Who may call it: administrator, reseller
- Token scope, any of: security, read, all
- Answers: 200 OK

Returns one page of audit entries, newest first. Each entry records who acted, the action and its parameters, the origin and IP address, the result and the timestamp. Results for unsuccessful operations start with "refused:" or "failed:" and include the reason. For actors with an existing UrbeStack user account, the entry includes their current role and, when applicable, their reseller's name.

Administrators can see all entries. Resellers can see entries for actions they or their customers took. The response includes filter counts, the size of the full log and the timestamp of its oldest entry. An empty result has one page.

UrbeStack keeps entries for the number of days set by security.audit_retention_days. The response reports that setting in retention_days.

## Parameters

- `actor` (query, string, matching ^[\w.@-]{1,254}$): Actor's UrbeStack username, mailbox email address or shell account name.
- `action` (query, string, matching ^[a-z][a-z0-9-]{0,63}$): Action name, such as domain-add. The actions response field lists every action in the audit log.
- `about` (query, string, matching ^[a-z][a-z0-9_]{1,31}$): Account name to match against the actor or the name, user, owner or as operation parameter, where as identifies the customer whose panel an administrator was using. A reseller can specify their own account or one of their customers' accounts.
- `id` (query, integer, 1 or more): Numeric ID of a single audit entry.
- `origin` (query, string, one of panel, api, shell, mailbox, plugin): Origin of the operation. Use panel for UrbeStack's web interface, api for other API clients, shell for commands run from a shell, mailbox for a mailbox acting on its own behalf, or plugin for a plugin.
- `failed` (query, integer, one of 0, 1): Failure filter. Use 1 to include only unsuccessful operations or 0 to include operations with any result.
- `q` (query, string, up to 200 characters): Literal text of up to 200 characters to search for in the actor, action, parameters, IP address and result.
- `since` (query, string, matching ^\d{4}-\d\d-\d\d(?:[T ]\d\d:\d\d(?::\d\d)?)?Z?$): Earliest operation timestamp to include, specified as a UTC date or date and time.
- `until` (query, string, matching ^\d{4}-\d\d-\d\d(?:[T ]\d\d:\d\d(?::\d\d)?)?Z?$): Latest operation timestamp to include, specified as a UTC date or date and time. A date alone includes operations through the end of that day.
- `page` (query, integer, 1 or more): Page number from 1 to 999999, defaulting to 1 when omitted or invalid. Requests past the last page return the last page.
- `per_page` (query, integer, 1 to 1000): Number of entries per page, from 1 to 1000. Defaults to 200 when omitted or invalid.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/audit?actor=text&action=text&about=text&id=1&origin=panel&failed=0&q=text&since=text&until=text&page=1&per_page=1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "actions": [
    "text"
  ],
  "counts": {
    "all": 1,
    "api": 1,
    "failed": 1,
    "mailbox": 1,
    "panel": 1,
    "shell": 1
  },
  "entries": [
    {
      "action": "text",
      "actor": "text",
      "actor_id": 1,
      "actor_owner": "text",
      "actor_role": "admin",
      "address": "info@example.com",
      "at": "text",
      "id": 1,
      "origin": "panel",
      "params": {},
      "result": "text",
      "token": "ub_9f3c2a7e1b5d4082a6c1e7f0"
    }
  ],
  "oldest": "text",
  "page": 1,
  "pages": 1,
  "people": [
    {
      "name": "alice",
      "role": "admin"
    }
  ],
  "per_page": 1,
  "retention_days": 1,
  "rows_total": 1,
  "total": 1
}
```

## Errors

- 401: Authentication required
