[Epic] M2M API — keyed third-party data API + guest throttling
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 8/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Tranquilo
- Área
- api, authorization, backend
Línea de trabajo
This is an epic with no code change of its own; the design lives in docs/features/m2m-api/README.md on the branch named in the body. Read that doc first, then the linked child issues, starting with pskillen/meshflow-api#417 (guest endpoint throttling), which the epic says ships independently. Done means the child issues close and the epic's listed deliverables exist, so a newcomer should pick up one child issue rather than this epic.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
A read-only, versioned machine-to-machine API at /api/m2m/v1/ for third-party dashboards and analytics. It is separate from the bot ingest API (NodeAPIKey) and the web UI API (JWT).
- Approved users (Django group
m2m_api) mint their own API keys, several per user, after accepting versioned terms: acceptable use, good faith, non-commercial, attribution. Data is licensed CC BY-NC 4.0. - Data is aggregates first (packets today, nodes heard, role mix, feeder counts, time series), plus infrastructure nodes with health metrics. Meshtastic and MeshCore are strictly split. No positions.
- This epic also adds throttling to the existing guest-readable endpoints, which are currently unthrottled, so the M2M terms can't be bypassed by scraping.
Motivating request: a scotmesh-style dashboard (cf. https://meshcore.scotmesh.net/) for the Meshtastic side, linking back to Meshflow node pages.
Design doc: docs/features/m2m-api/README.md (on branch claude/elegant-ramanujan-llmcka until merged)
Key decisions
| Topic | Decision |
|---|---|
| Path | /api/m2m/v1/ on the existing domain; key management at /api/m2m/keys/ (JWT) |
| Mint permission | Django group m2m_api (or staff), checked only when minting |
| Request auth | API key only: exists, hash matches, not revoked, owner.is_active. No group check per request. |
| Disabling a user | Kills all their keys immediately and stamps them revoked |
| Group removal | Stops new mints only; existing keys keep working |
| Withdraw | One staff operation: remove from group and revoke all keys |
| Terms bump | 90-day grace period, then 403 until re-accepted |
| "Today" | UTC calendar day, documented in feature docs and OpenAPI |
| Infra roles (MT) | nodes.constants.INFRASTRUCTURE_ROLES (ROUTER, ROUTER_CLIENT, REPEATER, ROUTER_LATE). Not CLIENT_BASE. |
| Infra types (MC) | adv_type repeater, room |
| Feeders | Aggregate counts only |
| Positions | Omitted |
| Opt-out | ObservedNode.m2m_opt_out, settable by claimant, managed-node owner or staff. Excluded from per-node output, still counted in aggregates. |
| Ingress | Prod reaches Django only via Cloudflare Tunnel, so CF-Connecting-IP is trusted in prod (behind a setting) |
| Initial rates | Guest 120/min/IP · guest expensive 10/min/IP · JWT user 600/min · M2M 60/min + 5000/day per key, same ceiling per owner |
Breakdown (delivery order)
API (meshflow-api)
- pskillen/meshflow-api#417 Guest endpoint throttling. Ships independently.
- pskillen/meshflow-api#418 API keys: model, auth, terms, CRUD, throttles
- pskillen/meshflow-api#419 Staff "withdraw M2M access" (needs #418)
- pskillen/meshflow-api#420 Node opt-out flag
- pskillen/meshflow-api#421 v1 Meshtastic data endpoints (needs #418, #420). Unblocks the requester.
- pskillen/meshflow-api#422 Usage metering (needs #418)
- pskillen/meshflow-api#423 v1 MeshCore endpoints (needs #421)
- pskillen/meshflow-api#424 History: role-mix snapshots, infra health (later)
UI (meshflow-ui)
- pskillen/meshflow-ui#362 Developer / API access page (with #418)
- pskillen/meshflow-ui#363 Opt-out toggle (with #420)
Done when
- Guest endpoints are throttled in prod with CF-aware client IPs, and ingest is untouched.
- An approved user can mint a key in the UI, and the scotmesh-style dashboard can be built against
/api/m2m/v1/meshtastic/*. - MeshCore endpoints reach parity.
openapi-m2m.yamlis published, andENV_VARS.md,REDIS.mdandpermissions/README.mdare updated.
- Lenguaje dominante
- Python
- Estrellas
- 1
- Forks
- 0
- Merge medio
- 23 h 9 min
- PR fusionados (30 d)
- 15
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de pskillen/meshflow-api
-
enhancement meshtastic-2.8
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
pskillen/meshflow-api#459 ·
Los mantenedores suelen responder en 1 día
-
bug tech-debt
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
pskillen/meshflow-api#480 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 Medio día Aptitud para principiantes 55/100
pskillen/meshflow-api#479 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
pskillen/meshflow-api#478 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 73/100
pskillen/meshflow-api#472 ·
Los mantenedores suelen responder en 1 día
Todos los issues de pskillen/meshflow-api
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
SpikeInterface/spikeinterface#4924 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
aws-samples/sample-per-model-bedrock#782 ·
Los mantenedores suelen responder en 1 día
-
bug javascript
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
No-op PreToolUse:Bash hook (bash_hook.py) still registered synchronously; adds latency and can time out at 10 sPosiblemente ocupada @alexgr-agent la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
alexgreensh/token-optimizer#313 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100