# Audit Trail

Complete log of all admin and investor actions

The Audit Trail provides a complete, chronological record of all significant actions taken by admins and investors in your offerings. Use it to maintain compliance, investigate incidents, and monitor operational activity.

## Accessing the Audit Trail

1. Sign in to the Offering Manager at <https://om.bitbond.com>.
2. From the left-hand menu, select **Audit Trail** or go directly to:

   ```
   https://om.bitbond.com/admin/audit-trail
   ```

## Event Types

The Audit Trail captures the following categories of events:

* **Status Change**\
  Updates to offering or order status (e.g. Draft → Active, Pending → Settled).
* **Bank Reconciliation**\
  Entries related to reconciliation of bank transfer payments.
* **Investor Created**\
  Manual creation of an investor by an admin.
* **Investor Edited**\
  Edits to an investor’s profile or KYC status by an admin.
* **KYC Override**\
  Manual override of an investor’s KYC result.
* **Order Created**\
  Manual order creation by an admin (including manual payment methods).
* **Order Edited**\
  Edits to an existing order by an admin.
* **Order Placed**\
  Orders submitted by investors through the Invest Page.
* **Wallet Updated**\
  Investor-initiated changes to their wallet address or chain.
* **Profile Updated**\
  Investor-initiated edits to profile information.
* **Other Actions**\
  Any actions not covered above will appear under their raw action name.

## Filtering and Searching

Use the controls at the top of the page to narrow down entries:

* **Search**\
  Enter part of an actor’s name or email, an action label, or an entity ID. This full-text search is applied client-side.
* **Entity Type**\
  Choose **All Types**, **Investor**, or **Order** to filter entries by entity.
* **Refresh**\
  Click the Refresh icon to reload the current filter and page.
* **Pagination**\
  Navigate through pages of 30 entries each using the Prev/Next buttons.

## Reviewing Entries

Each row in the audit list shows:

* **Timestamp**\
  The date and time when the action occurred, formatted in your browser locale.
* **Actor**\
  The admin or investor who performed the action. If the system performed it automatically, the actor is shown as “System.”
* **Action Label**\
  A color-coded label corresponding to the event type.
* **Entity Details**\
  The type (Investor or Order) and the unique ID.
* **Change Details**\
  Click an entry to expand a diff view:
  * **New records**: all initial values in green.
  * **Updates**: old values in red with a strikethrough, new values in green.

## Use Cases

* Conduct compliance audits of investor onboarding and order processing.
* Investigate exceptions in payment reconciliation and KYC overrides.
* Monitor manual actions by admins, such as creating investors or orders.

## API Access

For programmatic access to audit logs, see the interactive OpenAPI reference at <https://om.bitbond.com/api/docs>.

You can scope and paginate audit logs using query parameters on the `/issuer/audit-logs` endpoint:

* **entityType** (string)\
  Filter by entity type (`User` for investors, `Order`).
* **entityId** (string)\
  Filter by a specific entity ID.
* **actorId** (string)\
  Filter by the ID of the admin or system actor.
* **offeringId** (string)\
  Scope logs to a particular offering. Only entries for orders and investors related to that offering are returned.
* **page** (integer)\
  Page number for pagination (default: 1).
* **limit** (integer)\
  Number of entries per page (1–100, default: 50).

Example:

```bash
GET https://om.bitbond.com/api/public/issuer/audit-logs?offeringId=123&page=2&limit=30
```

The response includes an array of log entries plus metadata:

```json
{
  "logs": [ /* array of audit log records */ ],
  "total": 250,
  "page": 2,
  "limit": 30
}
```

For details on each log field, refer to the OpenAPI reference.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bitbond.com/asset-tokenization-suite/offering-manager/audit-trail.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
