Skip to content

Commit f297534

Browse files
committed
fix: update endpoint links in zap-local-api documentation for consistency
1 parent f947d97 commit f297534

1 file changed

Lines changed: 27 additions & 27 deletions

File tree

docs/developer/zap-local-api.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ Complete endpoint documentation for the Zap firmware.
2222
- [Connection Types](#get-apidevicestypes)
2323
- [List Devices](#get-apidevices)
2424
- [Add Device](#post-apidevices)
25-
- [Remove Device](#delete-apidevices-sn)
26-
- [Device Data](#get-apidevices-sn-datajson)
27-
- [Update DER Types](#post-apidevices-sn-types)
28-
- [Get DER Metadata](#get-apidevices-sn-ders)
29-
- [Update DER Metadata](#post-apidevices-sn-ders)
30-
- [Read Registers](#get-apidevices-sn-registersaddress)
31-
- [Write Register](#post-apidevices-sn-registersaddress)
25+
- [Remove Device](#delete-apidevicessen)
26+
- [Device Data](#get-apidevicessndatajson)
27+
- [Update DER Types](#post-apidevicessentypes)
28+
- [Get DER Metadata](#get-apidevicessnders)
29+
- [Update DER Metadata](#post-apidevicessnders)
30+
- [Read Registers](#get-apidevicessnregistersaddress)
31+
- [Write Register](#post-apidevicessnregistersaddress)
3232
3. [Control & Operations](#control--operations)
33-
- [Init Control](#post-apicontrol-sn-init)
34-
- [Battery Control](#post-apicontrol-sn-battery)
35-
- [PV Curtailment](#post-apicontrol-sn-curtail)
36-
- [Disable Curtailment](#post-apicontrol-sn-curtaildisable)
37-
- [Deinit Control](#post-apicontrol-sn-deinit)
33+
- [Init Control](#post-apicontrolsninit)
34+
- [Battery Control](#post-apicontrolsnbattery)
35+
- [PV Curtailment](#post-apicontrolsncurtail)
36+
- [Disable Curtailment](#post-apicontrolsncurtaildisable)
37+
- [Deinit Control](#post-apicontrolsndeinit)
3838
- [MQTT Topics](#mqtt-control-topics)
3939
4. [Identity & Security](#identity--security)
4040
- [Crypto Info](#get-apicrypto)
@@ -479,7 +479,7 @@ Add device. Connects immediately, saved only on success.
479479
- 409 - Device exists or conflicts (UART/TCP endpoint)
480480
- 503 - Connection failed or insufficient memory (requires >55KB free heap)
481481

482-
### DELETE /api/devices/{sn}
482+
### DELETE `/api/devices/{sn}`
483483

484484
Remove device by serial number.
485485

@@ -507,7 +507,7 @@ Remove all devices. Clears runtime memory and deletes all device configurations
507507
**Errors**:
508508
- 500 - Failed to clear devices (e.g. SPIFFS error)
509509

510-
### GET /api/devices/{sn}/data/json
510+
### GET `/api/devices/{sn}/data/json`
511511

512512
Latest device data snapshot in JSON format.
513513

@@ -542,7 +542,7 @@ Latest device data snapshot in JSON format.
542542
- 204 - No harvest data yet
543543
- 404 - Device not found
544544

545-
### POST /api/devices/{sn}/types
545+
### POST `/api/devices/{sn}/types`
546546

547547
Enable/disable publishing for detected DERs on a device. Only included DERs in the request are modified. Omitted entries remain unchanged.
548548

@@ -568,7 +568,7 @@ By default, all detected DERs have `enabled = false` on first connection.
568568
- 404 - Device not found
569569
- 500 - Failed to persist config
570570

571-
### GET /api/devices/{sn}/ders
571+
### GET `/api/devices/{sn}/ders`
572572

573573
Fetch publish state plus configured DER metadata. The fields returned are the user-configurable fields that can be updated via POST.
574574

@@ -618,7 +618,7 @@ Fetch publish state plus configured DER metadata. The fields returned are the us
618618
**Errors**:
619619
- 404 - Device not found
620620

621-
### POST /api/devices/{sn}/ders
621+
### POST `/api/devices/{sn}/ders`
622622

623623
Update publish flags and static DER metadata in one request. For PV entries, supply `rated_power` in watts. For battery entries, supply `rated_power` (W) and `capacity` (Wh). For v2x_charger entries, supply `capacity` (Wh); power limits are read-only from the device. `enabled` is optional here; omit it to leave the current publish state untouched. Only the DERs included in the payload are modified.
624624

@@ -650,7 +650,7 @@ Update publish flags and static DER metadata in one request. For PV entries, sup
650650
- 404 - Device not found
651651
- 500 - Failed to persist config
652652

653-
### GET /api/devices/{sn}/registers/{address}
653+
### GET `/api/devices/{sn}/registers/{address}`
654654

655655
Read Modbus register(s).
656656

@@ -697,7 +697,7 @@ Read Modbus register(s).
697697
- 404 - Device not found
698698
- 500 - Read failed
699699

700-
### POST /api/devices/{sn}/registers/{address}
700+
### POST `/api/devices/{sn}/registers/{address}`
701701

702702
Write single holding register.
703703

@@ -722,7 +722,7 @@ Write single holding register.
722722
- 404 - Device not found
723723
- 500 - Write failed
724724

725-
### POST /api/devices/{sn}/registers
725+
### POST `/api/devices/{sn}/registers`
726726

727727
Batch write multiple holding registers.
728728

@@ -750,7 +750,7 @@ Batch write multiple holding registers.
750750
- 404 - Device not found
751751
- 207 - Partial success (check success/failed counts)
752752

753-
### POST /api/devices/{sn}/write
753+
### POST `/api/devices/{sn}/write`
754754

755755
Write single holding register (Legacy/Alternative).
756756

@@ -779,7 +779,7 @@ Write single holding register (Legacy/Alternative).
779779

780780
## Control & Operations
781781

782-
### POST /api/control/{sn}/init
782+
### POST `/api/control/{sn}/init`
783783

784784
Initialize control for a device (e.g. take control of inverter).
785785

@@ -792,7 +792,7 @@ Initialize control for a device (e.g. take control of inverter).
792792
}
793793
```
794794

795-
### POST /api/control/{sn}/battery
795+
### POST `/api/control/{sn}/battery`
796796

797797
Set battery charge/discharge power.
798798

@@ -815,7 +815,7 @@ Set battery charge/discharge power.
815815
}
816816
```
817817

818-
### POST /api/control/{sn}/curtail
818+
### POST `/api/control/{sn}/curtail`
819819

820820
Set PV curtailment (limit solar generation).
821821

@@ -834,7 +834,7 @@ Set PV curtailment (limit solar generation).
834834
}
835835
```
836836

837-
### POST /api/control/{sn}/curtail/disable
837+
### POST `/api/control/{sn}/curtail/disable`
838838

839839
Disable PV curtailment.
840840

@@ -847,7 +847,7 @@ Disable PV curtailment.
847847
}
848848
```
849849

850-
### POST /api/control/{sn}/deinit
850+
### POST `/api/control/{sn}/deinit`
851851

852852
Release control of device (return to default/self-consumption mode).
853853

@@ -1059,7 +1059,7 @@ curl -X DELETE http://192.168.1.100/api/devices
10591059

10601060
### Notes
10611061

1062-
- Device configs persist in `/spiffs/devices/{sn}.json`
1062+
- Device configs persist in `/spiffs/devices/\{sn\}.json`
10631063
- Auto-reconnect every 10s for disconnected devices
10641064
- Modbus timeout: 1000ms per request
10651065
- UART pins fixed by firmware (RTU only configures baud/unit_id)

0 commit comments

Comments
 (0)