API - danielperna84/hass-configurator GitHub Wiki
Since 0.2.5 you can add / remove IP addresses and networks from and to the ALLOWED_NETWORKS
and BANNED_IPS
lists at runtime. Keep in mind though, that these changes are not persistent and will be lost when the service is restarted. The API can be used through the UI in the Network status menu or by sending POST requests. A possible use case could be programmatically allowing access from your dynamic public IP, which can be required for some setups involving SSL.
API targets:
api/allowed_networks
Methods:
add
remove
Example:
curl -d "method=add&network=1.2.3.4" -X POST http://127.0.0.1:3218/api/allowed_networks
api/banned_ips
Methods:
ban
unban
Example:
- Example:
curl -d "method=ban&ip=9.9.9.9" -X POST http://127.0.0.1:3218/api/banned_ips