API Reference

Complete REST API documentation for LogFlux

The LogFlux API is a RESTful API that allows you to programmatically interact with your log data. All API endpoints are served over HTTPS and return JSON responses.

Downloads

Base URLs

LogFlux provides customer-specific endpoints to ensure data residency compliance and optimal performance:

Each customer receives a unique subdomain for enhanced security and isolation:

  • EU Region: https://[customer-id].ingest.eu.logflux.io
  • US Region: https://[customer-id].ingest.us.logflux.io

Example: https://c94731.ingest.eu.logflux.io

Benefits of Customer-Specific URLs

  • Enhanced Security: Dedicated subdomain for your organization
  • Better Isolation: Logical separation from other customers
  • Custom Configuration: Tailored rate limits and settings
  • Easier Monitoring: Clear identification in logs and metrics

Data Residency

When you choose a region, all your log data is stored and processed exclusively in that region. This ensures:

  • Compliance: Meet GDPR, data sovereignty, and other regulatory requirements
  • Performance: Lower latency by keeping data close to your infrastructure
  • Data Control: Your data never leaves the selected region

Choose the endpoint closest to your infrastructure or based on your compliance requirements.

Authentication

All API requests (except health and version endpoints) require authentication using an API key. Include your API key in the Authorization header:

1
Authorization: Bearer lf_your_api_key_here

Get your API key from the dashboard settings.

Rate Limits

  • Per API Key: 10,000 requests per minute
  • Per IP Address: 1,000 requests per minute
  • Maximum Payload Size: 10MB per request

Rate limit headers are included in all responses:

1
2
3
X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 9998
X-RateLimit-Reset: 1705316400

HTTP Status Codes

Code Description
200 Success
201 Created
202 Accepted (used for log ingestion)
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
405 Method Not Allowed
413 Payload Too Large
429 Too Many Requests
500 Internal Server Error

Error Responses

Errors return a standardized JSON structure:

1
2
3
4
5
{
  "error": "Error description",
  "code": "ERROR_CODE",
  "details": "Additional context if available"
}

Example:

1
2
3
4
5
{
  "error": "Invalid API key",
  "code": "INVALID_API_KEY",
  "details": "The provided API key does not exist or has been revoked"
}

Common Error Codes

Code Description
INVALID_REQUEST Request validation failed
UNAUTHORIZED Invalid or missing API key
FORBIDDEN Insufficient permissions
RATE_LIMITED Rate limit exceeded
NOT_FOUND Resource not found
INTERNAL_ERROR Server error

API Endpoints

SDKs and Libraries

While you can use the API directly, we recommend using our official SDKs:

Examples

Send a Log Entry

1
2
3
4
5
6
7
8
9
curl -X POST https://c94731.ingest.eu.logflux.io/v1/ingest \
  -H "Authorization: Bearer lf_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "node": "web-server-01",
    "payload": "User authentication successful",
    "loglevel": 1,
    "timestamp": "2024-01-15T10:30:00Z"
  }'

Check Service Health

1
curl https://c94731.ingest.eu.logflux.io/health

Get API Version

1
curl https://c94731.ingest.eu.logflux.io/version

Next Steps