avclogs
AvcLedger API · v1

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.

Base URL: https://logs-api.avctech.in

Quick Start

Get your first log ingested in under 2 minutes. No SDK, no config files — just a single HTTP request.

1

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.

2

Send your first log

bash
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"
  }'
3

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.

4

Use in Node.js / Serverless functions

javascript
// 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

info
Informational events
warning
Non-critical issues
error
Handled exceptions
critical
System-breaking faults

Authentication

AvcLedger uses two types of tokens:

JWT Token

Used for all dashboard actions — listing projects, fetching logs, managing workflows. Obtained by exchanging a Google OAuth ID token.

API Key

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.

© 2024 AVCLEDGER KINETIC. ENGINEERED FOR THE VOID.