Task · MDE-0004

MV: migrate off the deprecated camera analytics endpoints

Status
Parked
Labels
area:mv, enhancement, priority:low, migrated-from-github
Updated
2026-09-01

Description

Migrated from GitHub issue #691 (enhancement, priority: low, area:mv) on 2026-08-14. Standalone, not part of the hardening programme. Surfaced via the drift tracker #686; apidrift began reporting these as INFO op-deprecated under #690.

Problem

All five /devices/{serial}/camera/analytics/* operations are marked deprecated: true in the Meraki OpenAPI spec (1.72.0 and 1.73.0 — pre-existing, not new drift). The exporter consumes two, in src/meraki_dashboard_exporter/collectors/devices/mv.py:

consumed op used for metric
getDeviceCameraAnalyticsZones zone config + names meraki_mv_analytics_zones, meraki_mv_zone_info
getDeviceCameraAnalyticsRecent per-zone person count meraki_mv_people_count

No removal date is published and the spec carries no x-sunset or replacement pointer, only a generic x-deprecation-notice. So this is not urgent, but it is a known future BREAKING missing-op and should be planned rather than discovered. Deprecated operations: https://developer.cisco.com/meraki/api-v1/deprecated-operations/

Replacement surface

The org-level boundaries + detections API is the successor, and none of it is deprecated:

deprecated replacement params
getDeviceCameraAnalyticsZones getOrganizationCameraBoundariesAreasByDevice organizationId (req), serials (opt)
getOrganizationCameraBoundariesLinesByDevice organizationId (req), serials (opt)
getDeviceCameraAnalyticsRecent getOrganizationCameraDetectionsHistoryByBoundaryByInterval organizationId, boundaryIds, ranges (all req); duration, perPage, boundaryTypes (opt)

Two things make this attractive beyond clearing the deprecation. It is org-wide bulk, replacing per-device loops — today _collect_analytics_zones and _collect_analytics_recent each fire once per camera, and boundaries collapse to one or two calls per org, the direction the rate-limit budget prefers. And boundaries come back already keyed by networkId + serial, so the existing zone-info join survives.

The semantics problem

Detections are flow, not occupancy. There is no field that reproduces averageCount, so the migration cannot preserve meraki_mv_people_count as-is. Options:

The issue recommended C. A later run recorded a preference for A, conditional on live evidence supporting it — the migration must remove occupancy semantics rather than silently reuse their metric name. Record the decision explicitly before coding, and if ranges, counterMode, the ID namespaces or the request caps cannot be verified against a capable org, park this task rather than encoding a guessed request shape or a fabricated fixture.

Live verification needed first (read-only GETs only)

A working key for a personal org is in the gitignored .env. Gate on the key being valid and the selected org owning an MV camera with a configured boundary before probing; do not turn an exploratory failure into an unbounded probe loop; never make a mutating request.

Acceptance Criteria

Definition of Done

Implementation Plan

Root capability gate first: verify the configured key and a capable MV organization with read-only calls; only then record A/B/C and commission code. If the capability gate cannot establish the undocumented ranges/cap contract, park without guessed shapes.

Implementation Notes

Current Cisco documentation and installed SDK 4.4.0 confirm the three successor operations and required boundaryIds/ranges arguments, but do not define the ranges item shape or boundaryIds request cap. Root attempted the required read-only capability gate on 2026-08-23 using the configured .env key without printing any identifiers. Direct network reachability returned the expected unauthenticated 401, but the configured SDK request returned None internally and raised AttributeError before an HTTP status/organization list could be established. A second attempt using the repository client settings had the same result. Therefore key validity, an MV-capable organization, boundary response shapes, ranges, counterMode, and ID caps remain unproven. No A/B/C implementation decision was recorded because AC1 makes it conditional on live evidence and AC7 forbids guessed shapes.

2026-09-01 live capability evidence: the available organisation contains MR x1, MS x2, and MT x16, with no MV hardware. This is a structural capability gap for this organisation, not a transient probe failure. No A/B/C decision was taken because AC1 makes that decision conditional on live evidence from a capable organisation. Resume only after acquiring MV hardware with a configured boundary, or Cisco announces a sunset date.

Final Summary

Parked at the task-defined live-capability boundary. Current docs and SDK signatures remain insufficient for the undocumented detections request contract, and the configured read-only capability probe could not establish a valid organization response. No code, guessed request, fabricated fixture, or live mutation was made. Resume when a valid key and an organization with an MV camera plus configured boundary are available.

Parked permanently on live structural evidence: the available organisation has no MV hardware, so AC2 and AC3 cannot be satisfied here without guessing. No implementation decision or code change was made. Resume only after acquiring MV hardware with a configured boundary, or Cisco announces a sunset date.

Authoritative 2026-09-01 disposition, superseding the earlier temporary-probe summaries: Parked permanently at the task-defined live-capability boundary. The available organisation has no MV hardware, so AC2 and AC3 cannot be satisfied here without guessing; no A/B/C decision or code change was made because AC1 requires live evidence from a capable organisation. Resume only after acquiring MV hardware with a configured boundary, or Cisco announces a sunset date.

View the source file on GitHub