Skip to content

API Endpoints

Base URLs

Lunar Stream provides different API endpoints for development and production environments.

Production Environment

https://api.xxxxxx.xxx/api/v1

Use this endpoint for production applications.

Development Environment

https://api-dev.lunarstream.kozow.com/api/v1

Use this endpoint for development and testing.

Environment Configuration

Environment Variables

We recommend using environment variables to configure the API URL:

bash
# Production
LUNAR_STREAM_API_URL=https://api.xxxxxx.xxx/api/v1

# Development
LUNAR_STREAM_API_URL=https://api-dev.lunarstream.kozow.com/api/v1

Code Examples

Node.js:

javascript
const apiUrl = process.env.LUNAR_STREAM_API_URL || 'https://api.xxxxxx.xxx/api/v1';

Python:

python
import os
api_url = os.getenv('LUNAR_STREAM_API_URL', 'https://api.xxxxxx.xxx/api/v1')

PHP:

php
$apiUrl = getenv('LUNAR_STREAM_API_URL') ?: 'https://api.xxxxxx.xxx/api/v1';

Go:

go
apiURL := os.Getenv("LUNAR_STREAM_API_URL")
if apiURL == "" {
    apiURL = "https://api.xxxxxx.xxx/api/v1"
}

Java:

java
String apiUrl = System.getenv().getOrDefault(
    "LUNAR_STREAM_API_URL",
    "https://api.xxxxxx.xxx/api/v1"
);

API Versioning

The current API version is v1. All endpoints are prefixed with /api/v1.

When we release new API versions, we will:

  • Maintain backward compatibility for at least 12 months
  • Provide migration guides
  • Announce deprecation schedules in advance

Rate Limiting

Both environments have the same rate limits:

  • 100 requests per minute per API Key
  • 1000 requests per hour per API Key

Health Check

Check API availability:

bash
# Production
curl https://api.xxxxxx.xxx/api/v1/health

# Development
curl https://api-dev.lunarstream.kozow.com/api/v1/health

Next Steps

Released under the MIT License.