LogstackLogstack

API Overview

REST API reference for Logstack endpoints.

API Overview

Logstack provides a RESTful API for log ingestion, querying, and management.

Base URLs

EnvironmentURL
Productionhttps://api.logstack.tech/v1
Self-hostedhttps://your-domain.com/v1

Authentication

Logstack uses two authentication methods:

JWT Tokens (Dashboard Access)

For user-facing operations (projects, alerts, settings):

Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

Obtain tokens via /auth/login endpoint.

API Keys (Log Ingestion)

For SDK and log ingestion:

Authorization: Bearer ls_live_abc123xyz789

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 TypeRate LimitWindow
Log Ingestion1000 requestsper minute
API Queries100 requestsper minute
Authentication10 requestsper minute

Rate limit headers are included in responses:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 950
X-RateLimit-Reset: 1705320000

Response Format

All responses use JSON format:

Success Response

{
  "data": { ... },
  "meta": {
    "page": 1,
    "limit": 50,
    "total": 1234
  }
}

Error Response

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request body",
    "details": [{ "field": "email", "message": "Invalid email format" }]
  }
}

Error Codes

CodeHTTP StatusDescription
UNAUTHORIZED401Missing or invalid authentication
FORBIDDEN403Insufficient permissions
NOT_FOUND404Resource not found
VALIDATION_ERROR400Invalid request parameters
RATE_LIMITED429Too many requests
INTERNAL_ERROR500Server error

Pagination

List endpoints support offset/limit pagination (use offset starting at 0):

GET /v1/logs?projectId=proj_123&offset=0&limit=50

Response includes pagination metadata:

{
  "data": [...],
  "meta": {
    "offset": 0,
    "limit": 50,
    "total": 1234,
    "hasMore": true
  }
}

Explore Endpoints

On this page