Skip to content

Deprecate STORAGE_API_VERSION=1 (legacy meshflow-api ingest URLs) #95

@pskillen

Description

@pskillen

Summary

StorageAPIWrapper supports two URL layouts via api_version, selected in _get_url() (src/api/StorageAPI.py):

api_version Packet ingest Node upsert
1 (legacy) POST /api/raw-packet/ POST /api/nodes/
2 (current) POST /api/packets/{nodenum}/ingest/ POST /api/packets/{nodenum}/nodes/

v1 is the only use of the legacy paths in this repo. MeshCore upload already hard-codes api_version=2 in src/main.py.

Defaults today:

  • STORAGE_API_VERSION env default 1 in main.py (.env.example already documents 2)
  • StorageAPIWrapper(..., api_version: int = 1) constructor default

Goal

Remove v1 support so all Meshtastic feeders use v2 ingest URLs aligned with meshflow-api.

Scope (bot)

  • Delete the api_version == 1 branch in StorageAPIWrapper._get_url()
  • Drop api_version parameter (or fix at 2 with a deprecation warning period if needed)
  • Change STORAGE_API_VERSION default to 2 in main.py; remove env var if no longer needed
  • Same for STORAGE_API_2_VERSION if redundant after cleanup
  • Update tests, docs/MESHTASTIC.md, and any deploy snippets
  • Grep for api_version, STORAGE_API_VERSION, raw-packet

Coordination (API)

Acceptance

  • Meshtastic bot with default config talks only to /api/packets/{nodenum}/ingest/ and /api/packets/{nodenum}/nodes/
  • No code path references /api/raw-packet/ or v1 node upsert URL

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