-
Notifications
You must be signed in to change notification settings - Fork 0
Network POST
Set network configuration.
URL : /api/network/
Method : POST
Auth required : NO (subject to change)
{
"ssid": "my ssid",
"psk": "my psk",
"isAP": false
}
This endpoint only accepts POST
requests using the application/json
content header.
Failure to provide this header will result in a 404
response.
Not all parameters must be supplied when POSTing to the endpoint.
Only the parameters specified in your body will be changed.
- Both
SSID
andPSK
must be supplied if you wish to change either of those.- Only supplying one of these parameters will result in an error.
- Changes POSTed to this endpoint will not result in an automatic reboot.
The ESP32 only sets up its WiFi connection once at boot time.
Below is a list of all parameters that can be presented in the request body:
Saves the SSID and PSK of a network you wish to connect do.
This data will be used at boot time.
Payload
{
"ssid": <string>,
"psk": <string>
}
Specifies if the ESP32 should act as an Access Point or not.
This is only checked at boot.
Payload
{
"isAP": <bool>
}
-
true
- The ESP32 wll start as an Access Point.
-
false
- The ESP32 will attempt to connect to a network using saved SSID and PSK data.
- These parameters can be
- The ESP32 will attempt to connect to a network using saved SSID and PSK data.
The whole request body gets validated once received by the system.
If a parameter or value violates the authentication set as dictated by the system, the whole request gets discarded and will instead return a 400
response.