<aside> <img src="/icons/code_red.svg" alt="/icons/code_red.svg" width="40px" /> Welcome to the Lumi Labs API Reference Guide! This comprehensive resource provides you with the tools and information you need to seamlessly integrate with our smart lighting ecosystem. This guide covers API endpoints, request/response formats, authentication mechanisms, error handling, and best practices to help you unlock the full potential of Lumi Labs.
</aside>
Getting Started
https://api.lumilabs.com
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.).POST /lights/{lightId}/effects
: Apply a lighting effect to a specific light (e.g., pulse, strobe).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 /energy/usage
: Get energy usage statistics for all lights.GET /energy/usage/{lightId}
: Get energy usage statistics for a specific light.Request and Response Formats
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.Rate Limiting