<aside> <img src="/icons/light-bulb_red.svg" alt="/icons/light-bulb_red.svg" width="40px" /> Lumi Labs API 레퍼런스 가이드 페이지에 오신 것을 환영합니다! 이 가이드에는 스마트 조명 생태계와 통합하는 데 필요한 툴과 정보가 포함되어 있습니다. API 엔드포인트, 요청/응답 형식, 인증 메커니즘, 오류 처리 및 모범 사례를 참고해 Lumi Labs의 잠재력을 최대한 활용해 보세요.
</aside>
Getting Started
Obtain API Key:
Authentication:
Authorization
header of all requests using the following format:Authorization: Bearer YOUR_API_KEY
Base URL:
https://api.lumilabs.com/v1
API Endpoints
GET /lights
: Get a list of all registered lights.
GET /lights/{lightId}
: Get information about a specific light.
PUT /lights/{lightId}/state
: Update the state of a light (on/off, brightness, color, etc.).
JSON
{ "on": true, "brightness": 50, "color": { "hue": 240, "saturation": 80, "brightness": 100 } }
Use code with caution.
content_copy
POST /lights/{lightId}/effects
: Apply a lighting effect to a specific light (e.g., pulse, strobe).
GET /groups
: Get a list of all light groups.GET /groups/{groupId}
: Get information about a specific group.POST /groups
: Create a new group.PUT /groups/{groupId}
: Update a group.DELETE /groups/{groupId}
: Delete a group.PUT /groups/{groupId}/action
: Update the state of all lights in a group.GET /scenes
: Get a list of all created scenes.GET /scenes/{sceneId}
: Get information about a specific scene.POST /scenes
: Create a new scene.PUT /scenes/{sceneId}
: Update a scene.DELETE /scenes/{sceneId}
: Delete a scene.POST /scenes/{sceneId}/activate
: Activate a scene.GET /lights/{lightId}/energy
: Get energy usage statistics for a specific light.GET /groups/{groupId}/energy
: Get energy usage statistics for a group of lights.Error Handling
The Lumi Labs API uses standard HTTP status codes to indicate success or failure of a request. Here are some common error codes:
400 Bad Request
: The request is malformed or missing required parameters.401 Unauthorized
: The API key is invalid or missing.403 Forbidden
: You do not have permission to perform the requested action.404 Not Found
: The requested resource could not be found.500 Internal Server Error
: An unexpected error occurred on the server.Rate Limiting
To ensure the stability and availability of the API, we have implemented rate limiting. Each API key is allowed to make 100 requests per minute. If you exceed this limit, your requests will be temporarily throttled with a 429 Too Many Requests
status code.