Skip to content

Explore FritzBox /api/v0/ REST API for richer data accessΒ #185

@itsDNNS

Description

@itsDNNS

Context

DOCSight currently uses the data.lua endpoint for all FritzBox communication (DOCSIS channels, device info, connection info). While functional, this approach has limitations:

  • data.lua responses mix HTML and JSON depending on firmware version and page
  • Some data (e.g. segment utilization) is only available via the newer /api/v0/ REST API
  • The REST API likely exposes additional data that data.lua does not

Discovery

While investigating cable segment utilization (#182), we found the FritzBox serves a proper REST API:

Endpoint Purpose
/api/v0/generic/box Box info
/api/v0/generic/connections Connection details
/api/v0/generic/time Time reference
/api/v0/monitor/segment/subsets Segment utilization datasets
/api/v0/monitor/segment/{0-4} Individual segment series (DS/US total + own share)

The cable utilization page (#/cable/utilization) uses this API to display network-wide segment load as 0-100% over configurable timeranges (1h to 1y).

Problem

The /api/v0/ endpoints return permission denied (code 3001) when called with the standard SID authentication used by data.lua. The FritzBox SPA successfully loads these endpoints during page navigation, so there is a working auth mechanism - it just needs to be identified.

Goals

  1. Reverse-engineer /api/v0/ authentication by analyzing the FritzBox frontend JS (specifically /js3/views/internet/wan/utilization.html and related modules)
  2. Document all available /api/v0/ endpoints - map out what data is accessible
  3. Evaluate migration path - identify which current data.lua calls could be replaced with cleaner REST API equivalents
  4. Enable segment utilization feature - this is the immediate use case, tracked separately

Why This Matters

Research notes

See docs/plans/2026-03-09-segment-utilization-research.md for detailed findings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions