API Overview
REST API reference for Logstack endpoints.
API Overview
Logstack provides a RESTful API for log ingestion, querying, and management.
Base URLs
| Environment | URL |
|---|---|
| Production | https://api.logstack.tech/v1 |
| Self-hosted | https://your-domain.com/v1 |
Authentication
Logstack uses two authentication methods:
JWT Tokens (Dashboard Access)
For user-facing operations (projects, alerts, settings):
Obtain tokens via /auth/login endpoint.
API Keys (Log Ingestion)
For SDK and log ingestion:
API keys are created per-project in the dashboard.
API keys start with ls_live_ for production or ls_test_ for development.
Rate Limits
| Endpoint Type | Rate Limit | Window |
|---|---|---|
| Log Ingestion | 1000 requests | per minute |
| API Queries | 100 requests | per minute |
| Authentication | 10 requests | per minute |
Rate limit headers are included in responses:
Response Format
All responses use JSON format:
Success Response
Error Response
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid authentication |
FORBIDDEN | 403 | Insufficient permissions |
NOT_FOUND | 404 | Resource not found |
VALIDATION_ERROR | 400 | Invalid request parameters |
RATE_LIMITED | 429 | Too many requests |
INTERNAL_ERROR | 500 | Server error |
Pagination
List endpoints support offset/limit pagination (use offset starting at 0):
Response includes pagination metadata: