API Reference
Web Resolve API
RESTful API for ingesting logs, querying data, and managing your organization.
Base URL
https://api.webresolve.netRequired Headers for Log Ingestion
For successful log ingestion, the following headers are required:
X-API-Key- Your API key for authenticationX-Environment- The environment name (e.g., "production", "staging", "development")
Example:
X-API-Key: obs_xxxxxxxxxxxxx
X-Environment: productionAuthentication
API Key (Log Ingestion)
Use API keys for log ingestion from your applications.
X-API-Key: obs_xxxxxxxxxxxxx
Bearer Token (Management)
Use Bearer tokens for management API calls.
Authorization: Bearer eyJhbG...
Endpoints
POST
API Key/api/logsIngest Log
Send a single log entry to Web Resolve with metadata and AI analysis support
Request Body
{
"timestamp": "2026-03-29T10:30:00Z",
"level": "error",
"message": "Database connection failed",
"service": "user-service",
"logType": "APPLICATION",
"severity": "ERROR",
"metadata": {
"userId": "user_123",
"ip": "192.168.1.1",
"traceId": "trace_abc123"
},
"tags": ["database", "critical"]
}Response200 OK
{
"id": "log_abc123",
"status": "received",
"timestamp": "2026-03-29T10:30:00.123Z",
"aiAnalysisQueued": true
}POST
API Key/api/logs/batchBatch Ingest Logs
Send multiple log entries in a single request for high-volume ingestion
Request Body
{
"logs": [
{
"timestamp": "2026-03-29T10:30:00Z",
"level": "info",
"message": "Request completed",
"service": "api-gateway",
"logType": "API",
"statusCode": 200,
"latencyMs": 150
},
{
"timestamp": "2026-03-29T10:30:01Z",
"level": "error",
"message": "Database connection failed",
"service": "user-service",
"logType": "APPLICATION"
}
]
}Response200 OK
{
"received": 2,
"ids": ["log_abc123", "log_def456"],
"status": "received",
"aiAnalysisQueued": 2
}GET
Bearer Token/api/logsQuery Logs
Search and filter logs with advanced targeting options
Query:
?startTime=2026-03-29T00:00:00Z&endTime=2026-03-29T23:59:59Z&level=error&logType=SECURITY&service=auth-serviceResponse200 OK
{
"logs": [
{
"id": "log_abc123",
"timestamp": "2026-03-29T10:30:00Z",
"level": "error",
"message": "Database connection failed",
"service": "api-gateway",
"logType": "APPLICATION",
"metadata": {},
"aiAnalysis": {
"id": "analysis_123",
"status": "completed",
"confidence": 0.95
}
}
],
"total": 1,
"page": 1,
"pageSize": 100
}GET
Bearer Token/api/logs/:idGet Log
Retrieve a specific log entry with full AI analysis details
Response200 OK
{
"id": "log_abc123",
"timestamp": "2026-03-29T10:30:00Z",
"level": "error",
"message": "Database connection failed",
"service": "api-gateway",
"logType": "APPLICATION",
"metadata": {},
"aiAnalysis": {
"id": "analysis_123",
"status": "completed",
"analysisType": "ROOT_CAUSE",
"title": "Database Pool Exhaustion",
"summary": "Connection pool exhausted due to high concurrent requests",
"probableCause": "Insufficient max connection limit",
"impact": "High - Affecting user authentication",
"nextSteps": ["Increase pool size", "Implement retry logic"],
"confidence": 0.95,
"tokensUsed": 1250
}
}POST
Bearer Token/api/alert-rulesCreate Alert Rule
Create intelligent alert rules with AI analysis configuration
Request Body
{
"name": "High Error Rate",
"description": "Alert when error rate exceeds 5%",
"conditionType": "ERROR_RATE",
"operator": "GT",
"threshold": 5.0,
"windowMinutes": 5,
"scope": "PROJECT",
"projectId": "proj_123",
"aiConfig": {
"analysisTypes": ["ROOT_CAUSE", "IMPACT", "RECOMMENDATION"],
"autoTrigger": true
},
"channels": [
{
"type": "EMAIL",
"recipients": ["[email protected]"]
}
]
}Response200 OK
{
"id": "rule_abc123",
"name": "High Error Rate",
"status": "ACTIVE",
"createdAt": "2026-03-29T10:30:00Z"
}POST
Bearer Token/api/alert-rules/:id/analyzeTrigger AI Analysis
Manually trigger AI analysis for an alert rule
Request Body
{
"analysisTypes": ["ROOT_CAUSE", "TREND", "ANOMALY"],
"timeRange": "24h"
}Response200 OK
{
"analysisId": "analysis_abc123",
"status": "QUEUED",
"estimatedCompletion": "2026-03-29T10:35:00Z"
}GET
Bearer Token/api/organizations/:id/retention-policiesList Retention Policies
Get hierarchical retention policies with targeting rules
Response200 OK
{
"policies": [
{
"id": "policy_123",
"name": "Security Logs",
"scope": "ORGANIZATION",
"retentionDays": 2555,
"isDefault": false,
"targeting": {
"logTypes": ["SECURITY", "AUDIT"],
"severities": ["ERROR", "FATAL"],
"includeAllLogs": false
}
}
]
}Rate Limits
| Plan | Requests/minute | Logs/day |
|---|---|---|
| Free | 100 | 1,000 |
| Pro | 1,000 | 100,000 |
| Enterprise | 10,000+ | Unlimited |
WebSocket Streaming
Connect to our WebSocket endpoint for real-time log streaming.
wss://api.webresolve.net/stream?apiKey=obs_xxxxxxxxxxxxx