API Reference
Integrate DB Audit into your applications with our comprehensive RESTful API. Query audit events, manage policies, and receive real-time alerts programmatically.
Quick Start
Get started with the DB Audit API in minutes. All API requests require authentication via API key or OAuth token.
Base URL
https://api.dbaudit.ai/v1 Example Request
# Authenticate and list databases
curl -X GET "https://api.dbaudit.ai/v1/databases" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
# Response
{
"databases": [
{
"id": "db_123abc",
"name": "production-postgres",
"type": "postgresql",
"status": "connected",
"events_count": 1234567
}
],
"total": 1,
"page": 1
} Endpoint Quick Reference
Common API endpoints for database auditing operations.
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/databases | List all connected databases |
| POST | /v1/databases | Add a new database connection |
| GET | /v1/events | Query audit events with filters |
| GET | /v1/policies | List all audit policies |
| POST | /v1/policies | Create a new audit policy |
| GET | /v1/alerts | Get security alerts |
| POST | /v1/webhooks | Register a webhook endpoint |
Rate Limits
API requests are rate limited to ensure fair usage and system stability.
1,000
Requests/minute (Free)
10,000
Requests/minute (Pro)
Unlimited
Enterprise
Rate Limit Headers
Check X-RateLimit-Remaining and X-RateLimit-Reset headers in API responses to monitor your usage.
Official SDKs
Use our official SDKs for a streamlined integration experience with built-in authentication, retry logic, and type definitions.
pip install dbaudit npm install @dbaudit/sdk go get github.com/dbaudit/dbaudit-go gem install dbaudit API Versioning
The DB Audit API uses URL-based versioning. The current stable version is v1.
- Breaking changes are released in new major versions
- Deprecated versions are supported for 12 months after a new version release
- New features and non-breaking changes are added to the current version
Get Started
Ready to integrate DB Audit into your application? Start with authentication.
Need Help?
Our team is here to help you integrate DB Audit into your applications.