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.

MethodPathWhat it does
GET/api/db-devops/auditList audit log entries
GET/api/db-devops/audit/searchSearch the audit log
GET/api/db-devops/audit/exportExport the audit log
GET/api/db-devops/audit/evidenceBuild a change-control evidence report
GET/api/db-devops/audit/facetsList the users and actions in the audit log
GET/api/db-devops/audit/user/:emailList audit entries by user
GET/api/db-devops/audit/action/:actionList audit entries by action
GET/api/db-devops/audit/entity/:type/:idList audit entries for one item
GET/api/db-devops/audit/rangeList audit entries in a period
GET/api/db-devops/audit/countCount audit log entries
GET/api/db-devops/audit/summarySummarize the audit log
GET/api/db-devops/audit/integrityVerify the audit log hash chain
DELETE/api/db-devops/audit/cleanupPurge old audit log entries
GET/api/db-devops/audit/streamShow the audit stream status
PUT/api/db-devops/audit/streamSet up the audit stream
DELETE/api/db-devops/audit/streamRemove the audit stream
POST/api/db-devops/audit/stream/testSend 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

InputTypeDescription
limit (query)integer, 1 or more, optionalHow many entries to return, newest first. Defaults to 100
offset (query)integer, 0 or more, optionalHow 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

InputTypeDescription
users (query)string, optionalComma-separated user email addresses to include
actions (query)string, optionalComma-separated action names to include, as listed by audit_facets
start (query)string, optionalStart of the period, an ISO 8601 date or time. Applied only together with end
end (query)string, optionalEnd of the period, an ISO 8601 date or time. Applied only together with start
limit (query)integer, 1 to 500, optionalHow many entries to return, newest first. Defaults to 100, at most 500
offset (query)integer, 0 or more, optionalHow 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

InputTypeDescription
format (query)one of csv, json, requiredThe file format
users (query)string, optionalComma-separated user email addresses to include
actions (query)string, optionalComma-separated action names to include, as listed by audit_facets
start (query)string, optionalStart of the period, an ISO 8601 date or time. Applied only together with end
end (query)string, optionalEnd 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

InputTypeDescription
start (query)string, requiredStart of the period, a date (YYYY-MM-DD) or ISO 8601 time
end (query)string, requiredEnd of the period, a date (YYYY-MM-DD, the whole day is included) or ISO 8601 time. Must be after start
environment (query)string, optionalOnly 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

InputTypeDescription
email (path)string, requiredThe user's email address
limit (query)integer, 1 or more, optionalHow 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

InputTypeDescription
action (path)string, requiredThe action name, for example CREATE_APPROVAL
limit (query)integer, 1 or more, optionalHow 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

InputTypeDescription
type (path)string, requiredThe item type as recorded, for example script, release or approval
id (path)string, requiredThe 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

InputTypeDescription
start (query)string, requiredStart of the period, an ISO 8601 date or time
end (query)string, requiredEnd 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

InputTypeDescription
olderThanDays (query)integer, 1 or more, optionalAlso 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

InputTypeDescription
days (query)integer, 1 or more, optionalDelete 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

InputTypeDescription
destination (body)one of syslog, https, requiredSyslog over TLS or HTTPS
host (body)string, optionalSyslog host name or IP address. Required for syslog
port (body)integer, 1 to 65535, optionalSyslog port, 1 to 65535. Defaults to 6514
url (body)string, optionalThe https:// address to post to. Required for https
format (body)one of splunk-hec, json, optionalHTTPS body format. Defaults to splunk-hec
headerName (body)string, optionalHTTPS header that carries the secret: letters, digits and hyphens, up to 64
headerSecret (body)string, optionalHTTPS secret, stored encrypted, without line breaks. Leave it out to keep the current one; send an empty string to remove it
appName (body)string, optionalApp name on each entry: 1 to 48 printable characters without spaces. Defaults to simcha-db-studio
ca (body)string, optionalA PEM certificate (-----BEGIN CERTIFICATE-----) to trust for the destination
startFrom (body)one of now, beginning, optionalDeliver 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.