Collecting logs via LogDoc HTTP
A REST API for sending logs over HTTP/HTTPS. Universal integration with any system or programming language through standard HTTP requests with JSON payloads. Supports batch sending and authentication.
Sending with curl
# Send a single log
$ curl -X POST https://logdoc-server/api/v1/logs \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"level": "ERROR",
"source": "payment-service",
"message": "Transaction failed",
"fields": {"order_id": "ORD-123"}
}'
# Batch sending
$ curl -X POST https://logdoc-server/api/v1/logs/batch \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{"logs": [{...}, {...}, {...}]}'
Available endpoints
POST /api/v1/logs # Send a single log POST /api/v1/logs/batch # Batch sending (up to 1000 entries) GET /api/v1/health # Server health check GET /api/v1/stats # Log ingestion statistics # Response formats 200 OK # Log accepted 207 Multi-Status # Partial acceptance (batch) 401 Unauthorized # Invalid token 429 Too Many Requests # Rate limit exceeded
HTTP API capabilities
•Batch sending of up to 1000 entries per request to reduce network overhead
•Authentication via Bearer tokens and API keys
•Integration with any language or platform over standard HTTP — perfect for serverless and edge functions