Solaris

Solaris Control API v1 — REST Endpoints & Action Control System

This document provides a comprehensive REST endpoint reference for Solaris Control API v1, including state query endpoints, Granular Security masking rules (ApiPermissionsFilter), per-monitor resolution via Friendly Slugs, and complete documentation for all 26 Action Control System commands (POST /api/v1/control).


📑 Table of Contents

  1. State Query Endpoints & Granular Data Privacy
    • GET /api/v1/health (Unrestricted Liveness Probe)
    • GET /api/v1/status (Full State Snapshot & Masking)
    • GET /api/v1/presets (Partial Presets Masking)
    • GET /api/v1/solar
    • GET /api/v1/sleep/sessions
  2. Per-Monitor Endpoints & Slug Resolver
    • GET /api/v1/monitors
    • GET /api/v1/monitors/:slug
    • POST /api/v1/monitors/:slug/brightness
    • POST /api/v1/monitors/:slug/temperature
    • POST /api/v1/monitors/:slug/control
  3. Action Control System (POST /api/v1/control)
  4. Webhook & Legacy Sleep Endpoints
    • /api/v1/webhooks*
    • /api/sleep/*

🔍 State Query Endpoints & Granular Data Privacy

1. GET /api/v1/health

Lightweight health check endpoint. Useful for liveness probes, load balancers, and status pinging.


2. GET /api/v1/status

Returns the complete application state graph: connected monitors, hardware brightness/temperature readings, active presets, solar elevation/azimuth, weather adjustments, sleep tracking engine status, smart circadian state, and LAN API server configuration.


3. GET /api/v1/presets

Returns all built-in brightness presets, color temperature presets, and custom user-defined presets.


4. GET /api/v1/solar

Returns real-time solar tracking parameters, elevation, azimuth, zenith angle, day phase, and upcoming solar events (sunset/sunrise).


5. GET /api/v1/sleep/sessions

Returns paginated sleep tracking sessions stored in the SQLite database.


🖥️ Per-Monitor Endpoints & Slug Resolver

Solaris Control API features a Friendly Slug Resolver (MonitorSlugResolver) allowing monitors to be targeted by easy-to-read identifiers instead of long Windows device paths (\\\\.\\DISPLAY1).

Supported Slug Matchers:

  1. Ordinal Slugs: display-1, display-2, display-3 (Recommended)
  2. Friendly Name Slugs: lg-ultragear-a1f9, dell-u2720q-e34b (Generated from Monitor Name + 4-char Device ID hash)
  3. Keyword Slugs: primary, main (Resolves to primary display), all (Targets all displays).

1. GET /api/v1/monitors

Returns a list of all currently connected physical monitors with their calculated slugs.


2. GET /api/v1/monitors/:slug

Returns detailed status for a single monitor identified by :slug (e.g. display-1 or lg-ultragear-a1f9).


3. Point-Mutation Endpoints

[!IMPORTANT] Payload Field Name: Point-mutation endpoints require the field name "value" (number). Passing "brightness" or "temperature" as key name will result in HTTP 400 Bad Request.

Example Request:

POST /api/v1/monitors/display-1/brightness HTTP/1.1
Content-Type: application/json
X-API-Key: sol_sec_ae1302d9e99a8b6aad30264417a64cec8ac1b17c20f5abc5cea38b5dea368eae

{
  "value": 70.0
}

Example Response (HTTP 202 Accepted):

{
  "status": "accepted",
  "action": "set_monitor_brightness",
  "slug": "display-1",
  "target_monitor": "\\\\.\\DISPLAY1",
  "queued": {
    "value": 70.0
  },
  "timestamp": "2026-07-25T14:30:00.000Z"
}

⚙️ Action Control System (POST /api/v1/control)

The Action Control System provides a unified mutation gateway supporting 25 canonical action types and 17 convenience aliases for controlling all aspects of Solaris.

Per-Action Precision & Alias Normalization (getCanonicalAction)

Before permission evaluation (ApiPermissionsChecker.checkAction), every incoming action string is normalized via ApiPermissionsConfig.getCanonicalAction(action):

Incoming Action / Shortcut Alias Canonical Action Key Parent Category Auto-Injected Payload Parameters
set_monitor_brightness set_brightness monitors
set_monitor_temperature set_temperature monitors
brightest, bright, dim, dimmest set_brightness_preset presets preset: "<alias>"
coolest, cool, warm, warmest set_temperature_preset presets preset: "<alias>"
toggle_auto_brightness set_auto_brightness circadian
toggle_auto_temperature, set_color_temperature_enabled set_auto_temperature circadian
openmeteo, weatherapi, auto set_weather_provider environment provider: "<alias>"
clear_failed_webhooks manage_webhooks system

[!TIP] Convenience Shortcut Execution: Sending {"action": "brightest"} or {"action": "openmeteo"} automatically injects the required preset or provider fields into mutablePayload and routes cleanly without requiring manual nested parameters.

Internal-Only Event Rejection Guard

Non-mutating system broadcast events (on_system_resume, on_hardware_error) cannot be invoked externally via POST /api/v1/control. Attempts to execute them are rejected with HTTP 422 Unprocessable Entity ("Unknown Action").


Single Action vs. Batch Execution

Single Action Payload:

{
  "action": "set_brightness",
  "value": 85.0,
  "monitor_id": "display-1"
}

Batch Execution Payload:

Batch payloads allow executing multiple commands in a single HTTP request.

{
  "mode": "fail_fast",
  "actions": [
    { "action": "set_brightness", "value": 75.0 },
    { "action": "set_temperature", "value": 5000 }
  ]
}

[!IMPORTANT] Pre-flight ACL Batch Pass (mode = "fail_fast"): BEFORE executing any state mutation (safeStateMutator), the server performs a Pre-flight ACL pass over the entire actions array (including alias normalization). If ANY command or alias in the batch belongs to a prohibited action/category, the ENTIRE request is rejected immediately with HTTP 403 Forbidden at line 0, ensuring 100% atomic rollback without partial state application.

Mode "continue": In continue mode, prohibited commands return individual 403 error objects in the results array while valid commands execute cleanly.

[!NOTE] HTTP Status Codes for Actions: Actions that apply hardware-level DDC/CI adjustments or debounced smooth transitions return HTTP 202 Accepted. Immediate state toggles return HTTP 200 OK.

Universal Privilege Escalation Guard

Any request payload containing keys apiPermissions, permissions, or nested access control toggles is rejected with HTTP 403 Forbidden (Privilege Escalation Prohibited).


Catalog of All 25 Canonical Action Commands

1. set_brightness

Sets manual monitor brightness level (0.0 to 100.0%). Automatically disables Auto Brightness.

2. set_auto_brightness

Enables or disables automatic brightness adjustment based on solar/circadian algorithm.

3. toggle_auto_brightness

Toggles automatic brightness mode on/off.

4. set_temperature

Sets manual color temperature in Kelvin (3300 K to 6500 K). Automatically disables Auto Temperature.

5. set_color_temperature_enabled

Master toggle for color temperature software/hardware filtering.

6. set_auto_temperature

Enables or disables automatic color temperature curve adjustments.

7. toggle_auto_temperature

Toggles automatic color temperature mode on/off.

8. set_brightness_preset

Applies a built-in brightness preset.

9. set_temperature_preset

Applies a built-in color temperature preset.

10. set_user_preset

Applies a custom user-created preset by ID.

11. cycle_preset

Cycles to the next or previous preset in sequence.

12. set_game_mode

Enables or disables Gaming Mode override manually.

13. set_game_mode_brightness

Configures target brightness level applied during Gaming Mode activation.

14. manage_game_mode_whitelist

Adds or removes executable process names from automatic Gaming Mode detection whitelist.

15. set_monitor_offset

Applies a relative brightness offset (-50.0% to +50.0%) to a specific monitor.

16. set_weather_adjustment

Toggles weather-driven brightness and temperature dynamic compensation.

17. set_weather_temperature_adjustment

Toggles temperature weather compensation specifically.

18. set_weather_intensity

Configures weather adjustment intensity factor (0.0 to 1.0).

19. set_smart_circadian

Master toggle for Smart Circadian rhythm engine.

20. set_smart_circadian_submodules

Toggles individual sub-modules of the Smart Circadian algorithm.

21. set_map_animations

Controls map GUI particle weather animation effects.

22. set_manual_location

Sets manual geographic coordinates for solar calculations.

23. set_weather_provider

Configures weather data provider service.

24. trigger_sun_sync

Forces immediate recalculation and API refetch for solar position and weather.

25. push_sleep_status

Pushes sleep state relay status from external tracking applications (e.g. mobile app, smart watch, Home Assistant) without polluting SQLite session history.

26. clear_failed_webhooks

Clears dead-letter queue (DLQ) entries for a specific webhook ID.


🔔 Webhook & Legacy Sleep Endpoints

Webhook Management (/api/v1/webhooks*)

Legacy Sleep Endpoints (/api/sleep/*)