implement post apis #8

Closed
opened 2026-10-04 22:56:48 +02:00 by adam · 0 comments
Owner

POST /api/nodes

example node which should be upserted to the nodes table:

{"!43b7c694":{"num":1136117396,"user":{"id":"!43b7c694","longName":"Freifunk-Vaterhaus868","shortName":"FFVH","macaddr":"48:ca:43:b7:c6:94","hwModel":"HELTEC_V3","publicKey":"+XY0fmPonw3Jq7X1tbV0VWbNMaJ1YAG5uYmib+rnRiY="},"position":{"latitudeI":524649417,"longitudeI":134852833,"time":1757421217,"locationSource":"LOC_MANUAL","latitude":52.4649417,"longitude":13.4852833},"snr":-9.5,"lastHeard":1757596854,"deviceMetrics":{"batteryLevel":101,"voltage":-0.001,"channelUtilization":19.016666,"airUtilTx":4.991889,"uptimeSeconds":91324},"hopsAway":0,"isFavorite":true}}

POST /api/messages

example message which should be appended to the messages table:

{"rx_time":1757918014,"rx_iso":"2025-09-15T06:33:34Z","from_id":"!bba83318","to_id":"^all","channel":0,"portnum":"TEXT_MESSAGE_APP","text":"Moin Moin Umland ☕️","rssi":-77,"hop_limit":3,"raw_json":null,"snr":11.5,"node":3148362520}

require API_TOKEN (cannot be empty) to match as authentication

## POST /api/nodes example node which should be upserted to the nodes table: ``` {"!43b7c694":{"num":1136117396,"user":{"id":"!43b7c694","longName":"Freifunk-Vaterhaus868","shortName":"FFVH","macaddr":"48:ca:43:b7:c6:94","hwModel":"HELTEC_V3","publicKey":"+XY0fmPonw3Jq7X1tbV0VWbNMaJ1YAG5uYmib+rnRiY="},"position":{"latitudeI":524649417,"longitudeI":134852833,"time":1757421217,"locationSource":"LOC_MANUAL","latitude":52.4649417,"longitude":13.4852833},"snr":-9.5,"lastHeard":1757596854,"deviceMetrics":{"batteryLevel":101,"voltage":-0.001,"channelUtilization":19.016666,"airUtilTx":4.991889,"uptimeSeconds":91324},"hopsAway":0,"isFavorite":true}} ``` ## POST /api/messages example message which should be appended to the messages table: ``` {"rx_time":1757918014,"rx_iso":"2025-09-15T06:33:34Z","from_id":"!bba83318","to_id":"^all","channel":0,"portnum":"TEXT_MESSAGE_APP","text":"Moin Moin Umland ☕️","rssi":-77,"hop_limit":3,"raw_json":null,"snr":11.5,"node":3148362520} ``` require API_TOKEN (cannot be empty) to match as authentication <!-- github-sync-id:3416527675 -->
adam closed this issue 2026-10-04 22:56:48 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/potato-mesh#8