Skip to content

Tài Liệu API

Tài liệu tham khảo đầy đủ cho tất cả các API endpoints của Lunar Stream Partner.

Base URL

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

Cấu Hình Môi Trường

Thay thế api.xxxxxx.xxx bằng domain API thực tế của bạn:

  • Production: api.lunarstream.kozow.com
  • Development: api-dev.lunarstream.kozow.com

Xem API Endpoints để biết cấu hình chi tiết.

Xác Thực

Tất cả endpoints yêu cầu xác thực API Key:

HeaderGiá trị
ls-api-keyAPI Key của bạn từ Lunar Stream admin

Ví dụ:

bash
curl -X GET "https://api.xxxxxx.xxx/api/v1/livestream?projectId=YOUR_PROJECT_ID" \
  -H "ls-api-key: YOUR_API_KEY"

Response Format

All responses follow this structure:

json
{
  "data": { ... },
  "meta": { ... }
}

Pagination

List endpoints support pagination:

json
{
  "data": [...],
  "meta": {
    "pagination": {
      "page": 1,
      "limit": 10,
      "total": 100,
      "totalPages": 10
    }
  }
}

Error Responses

json
{
  "statusCode": 400,
  "message": "Validation failed",
  "error": "Bad Request"
}
Status CodeDescription
200Success
201Created
400Bad Request - Invalid parameters
401Unauthorized - Invalid/missing API Key
403Forbidden - No permission
404Not Found - Resource doesn't exist
500Internal Server Error

API Endpoints

Streaming APIs

Public APIs (No Auth Required)

  • Public - Stream info for viewers

Rate Limits

Endpoint TypeRate Limit
Livestream CRUD100 req/min
Public APIs1000 req/min

SDKs & Tools

Released under the MIT License.