API Documentation
The AvcLedger API lets you ingest logs, fetch stored events, and manage workflows — all from any serverless environment. No SDK required. Just HTTP.
https://logs-api.avctech.inQuick Start
Get your first log ingested in under 2 minutes. No SDK, no config files — just a single HTTP request.
Create a project and copy your API key
Go to Dashboard → Provision New Project. Once created, copy your API key from the modal or from the Settings page.
Send your first log
curl -X POST https://logs-api.avctech.in/api/ingest \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"level": "info",
"message": "Hello from AvcLedger!",
"environment": "production"
}'View logs in the Explorer
Open your project in the Explorer tab. Your log will appear in real time. Click any row to expand the full trace and metadata.
Use in Node.js / Serverless functions
// log.js — drop this into any Edge/Lambda function
const LF_KEY = process.env.LF_API_KEY
export async function log(level, message, metadata = {}) {
await fetch('https://logs-api.avctech.in/api/ingest', {
method: 'POST',
headers: {
'Authorization': `Bearer ${LF_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ level, message, environment: 'production', metadata }),
})
}
// Usage
await log('error', 'Payment gateway timeout', { userId: 'usr_881' })
await log('info', 'Request completed', { duration: '42ms' })Log Level Reference
Authentication
AvcLedger uses two types of tokens:
Used for all dashboard actions — listing projects, fetching logs, managing workflows. Obtained by exchanging a Google OAuth ID token.
Used exclusively for log ingestion. Pass as Authorization: Bearer or x-api-key header.
Ingest Logs
Push log events to AvcLedger from your serverless functions, edge workers, or backend services. Requires your project's API Key.
Fetch Logs
Query stored logs for a specific project with pagination and level filtering. Requires a JWT token.
Projects
Manage your logging projects. All endpoints require a JWT token.
Workflows
Create routing rules that forward matching log events to third-party providers (currently Discord). Requires a JWT token.