Skip to content

Network API

Requires JWT with access_level: ENCHANTER or ADMIN.

Configure Wi-Fi

  • Endpoint: /api/{{ API_VERSION }}/network/configure/
  • Function: Add/update Wi-Fi and connect.
  • Method: POST
  • Shell Command:
curl -X POST "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/network/configure/" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"ssid":"MyWiFi","password":"secret","band":"2.4GHz"}'
  • Python Command:
import requests

url = "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/network/configure/"
headers = {"Authorization": "Bearer <token>"}
data = {"ssid":"MyWiFi","password":"secret","band":"2.4GHz"}
resp = requests.post(url, json=data, headers=headers)
print(resp.json())

List Wi-Fi Networks

  • Endpoint: /api/{{ API_VERSION }}/network/get_wifi_list
  • Function: Scan & list APs plus current connection.
  • Method: GET
  • Shell Command:
curl -L "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/network/get_wifi_list" \
  -H "Authorization: Bearer <token>"
  • Python Command:
import requests

url = "https://<ROBOT_IP>/rest/api/{{ API_VERSION }}/network/get_wifi_list"
headers = {"Authorization": "Bearer <token>"}
resp = requests.get(url, headers=headers)
print(resp.json())