Audit Log endpoints
Search, export and stream the audit trail, and build change-control evidence. Paths are relative to the address of your Simcha DB Studio server.
Through the MCP server these endpoints are the Audit Log tool group, on by default.
| Method | Path | What it does |
|---|---|---|
| GET | /api/db-devops/audit | List audit log entries |
| GET | /api/db-devops/audit/search | Search the audit log |
| GET | /api/db-devops/audit/export | Export the audit log |
| GET | /api/db-devops/audit/evidence | Build a change-control evidence report |
| GET | /api/db-devops/audit/facets | List the users and actions in the audit log |
| GET | /api/db-devops/audit/user/:email | List audit entries by user |
| GET | /api/db-devops/audit/action/:action | List audit entries by action |
| GET | /api/db-devops/audit/entity/:type/:id | List audit entries for one item |
| GET | /api/db-devops/audit/range | List audit entries in a period |
| GET | /api/db-devops/audit/count | Count audit log entries |
| GET | /api/db-devops/audit/summary | Summarize the audit log |
| GET | /api/db-devops/audit/integrity | Verify the audit log hash chain |
| DELETE | /api/db-devops/audit/cleanup | Purge old audit log entries |
| GET | /api/db-devops/audit/stream | Show the audit stream status |
| PUT | /api/db-devops/audit/stream | Set up the audit stream |
| DELETE | /api/db-devops/audit/stream | Remove the audit stream |
| POST | /api/db-devops/audit/stream/test | Send a test event to the audit stream |
GET /api/db-devops/audit
Lists audit log entries newest first: who did what to which item, when, from which address, with the values before and after.
Reads only · Role: Approver, release manager or admin · MCP tool: audit_list
| Input | Type | Description |
|---|---|---|
limit (query) | integer, 1 or more, optional | How many entries to return, newest first. Defaults to 100 |
offset (query) | integer, 0 or more, optional | How many entries to skip |
GET /api/db-devops/audit/search
Lists audit log entries newest first, filtered by users, actions and a period. Refused when start or end is not a valid date.
Reads only · Role: Approver, release manager or admin · MCP tool: audit_search
| Input | Type | Description |
|---|---|---|
users (query) | string, optional | Comma-separated user email addresses to include |
actions (query) | string, optional | Comma-separated action names to include, as listed by audit_facets |
start (query) | string, optional | Start of the period, an ISO 8601 date or time. Applied only together with end |
end (query) | string, optional | End of the period, an ISO 8601 date or time. Applied only together with start |
limit (query) | integer, 1 to 500, optional | How many entries to return, newest first. Defaults to 100, at most 500 |
offset (query) | integer, 0 or more, optional | How many entries to skip |
GET /api/db-devops/audit/export
Downloads every audit log entry that matches the filters as a CSV or JSON file, oldest first, with each entry's sequence number and hash chain values. The export itself is recorded in the audit log.
Reads only · Role: Approver, release manager or admin · MCP tool: audit_export · Returns a file
| Input | Type | Description |
|---|---|---|
format (query) | one of csv, json, required | The file format |
users (query) | string, optional | Comma-separated user email addresses to include |
actions (query) | string, optional | Comma-separated action names to include, as listed by audit_facets |
start (query) | string, optional | Start of the period, an ISO 8601 date or time. Applied only together with end |
end (query) | string, optional | End of the period, an ISO 8601 date or time. Applied only together with start |
GET /api/db-devops/audit/evidence
Downloads a ZIP for a period with an HTML change-control report, a CSV of every run and rollback, the evidence as JSON and SHA-256 checksums. Each change is checked for an approval, a match between the SQL that ran and the SQL approved, independent approvers, a successful shadow run, a decision snapshot and a captured rollback, and the audit trail's integrity is included. The download is recorded in the audit log.
Reads only · Role: Approver, release manager or admin · MCP tool: audit_evidence · Returns a file
| Input | Type | Description |
|---|---|---|
start (query) | string, required | Start of the period, a date (YYYY-MM-DD) or ISO 8601 time |
end (query) | string, required | End of the period, a date (YYYY-MM-DD, the whole day is included) or ISO 8601 time. Must be after start |
environment (query) | string, optional | Only changes run in this environment |
GET /api/db-devops/audit/facets
Returns the distinct user email addresses and action names found in the audit log, for use as search filters.
Reads only · Role: Approver, release manager or admin · MCP tool: audit_facets
No inputs.
GET /api/db-devops/audit/user/:email
Lists the audit log entries made by one user, newest first.
Reads only · Role: Approver, release manager or admin · MCP tool: audit_by_user
| Input | Type | Description |
|---|---|---|
email (path) | string, required | The user's email address |
limit (query) | integer, 1 or more, optional | How many entries to return, newest first. Defaults to 100 |
GET /api/db-devops/audit/action/:action
Lists the audit log entries with one action name, newest first.
Reads only · Role: Approver, release manager or admin · MCP tool: audit_by_action
| Input | Type | Description |
|---|---|---|
action (path) | string, required | The action name, for example CREATE_APPROVAL |
limit (query) | integer, 1 or more, optional | How many entries to return, newest first. Defaults to 100 |
GET /api/db-devops/audit/entity/:type/:id
Lists every audit log entry about one item, newest first.
Reads only · Role: Approver, release manager or admin · MCP tool: audit_by_entity
| Input | Type | Description |
|---|---|---|
type (path) | string, required | The item type as recorded, for example script, release or approval |
id (path) | string, required | The item ID |
GET /api/db-devops/audit/range
Lists every audit log entry between two times, newest first. Both times are needed: a missing or invalid one is refused with 400.
Reads only · Role: Approver, release manager or admin · MCP tool: audit_range
| Input | Type | Description |
|---|---|---|
start (query) | string, required | Start of the period, an ISO 8601 date or time |
end (query) | string, required | End of the period, an ISO 8601 date or time |
GET /api/db-devops/audit/count
Returns the number of entries in the audit log.
Reads only · Role: Approver, release manager or admin · MCP tool: audit_count
No inputs.
GET /api/db-devops/audit/summary
Returns how many entries the audit log holds, when the oldest was made and, when olderThanDays is sent, how many are older than that.
Reads only · Role: Approver, release manager or admin · MCP tool: audit_summary
| Input | Type | Description |
|---|---|---|
olderThanDays (query) | integer, 1 or more, optional | Also count the entries older than this many days |
GET /api/db-devops/audit/integrity
Checks the hash chain of the whole audit log and returns whether it is intact, the sequence number of the first broken entry if any, and how many entries were checked.
Reads only · Role: Approver, release manager or admin · MCP tool: audit_integrity
No inputs.
DELETE /api/db-devops/audit/cleanup
Permanently deletes audit log entries older than the given number of days and returns how many were deleted. Admin only.
Changes data and can remove or overwrite it · Role: Admin · MCP tool: audit_purge
| Input | Type | Description |
|---|---|---|
days (query) | integer, 1 or more, optional | Delete entries older than this many days. Defaults to 90 |
GET /api/db-devops/audit/stream
Returns whether the audit log is streamed to a log service, where, whether a secret is set, its delivery state (off, delivering, up_to_date or failing), the backlog, failures, the last error and when it retries next.
Reads only · Role: Approver, release manager or admin · MCP tool: audit_stream_status
No inputs.
PUT /api/db-devops/audit/stream
Saves where audit log entries are streamed, over syslog with TLS or HTTPS (Splunk HEC or JSON), and starts delivering at once in sequence order with retries. A new stream starts from now unless startFrom says otherwise; an existing one keeps its position. Admin only.
Changes data · Role: Admin · MCP tool: audit_stream_configure
| Input | Type | Description |
|---|---|---|
destination (body) | one of syslog, https, required | Syslog over TLS or HTTPS |
host (body) | string, optional | Syslog host name or IP address. Required for syslog |
port (body) | integer, 1 to 65535, optional | Syslog port, 1 to 65535. Defaults to 6514 |
url (body) | string, optional | The https:// address to post to. Required for https |
format (body) | one of splunk-hec, json, optional | HTTPS body format. Defaults to splunk-hec |
headerName (body) | string, optional | HTTPS header that carries the secret: letters, digits and hyphens, up to 64 |
headerSecret (body) | string, optional | HTTPS secret, stored encrypted, without line breaks. Leave it out to keep the current one; send an empty string to remove it |
appName (body) | string, optional | App name on each entry: 1 to 48 printable characters without spaces. Defaults to simcha-db-studio |
ca (body) | string, optional | A PEM certificate (-----BEGIN CERTIFICATE-----) to trust for the destination |
startFrom (body) | one of now, beginning, optional | Deliver only entries made from now on, or the whole audit log from the beginning |
DELETE /api/db-devops/audit/stream
Stops streaming the audit log and deletes the stream settings and secret. Refused when no stream is set up. Admin only.
Changes data and can remove or overwrite it · Role: Admin · MCP tool: audit_stream_remove
No inputs.
POST /api/db-devops/audit/stream/test
Sends one AUDIT_STREAM_TEST event to the configured destination and reports whether it was delivered. Refused when no stream is set up. Admin only.
Changes data · Role: Admin · MCP tool: audit_stream_test
No inputs.