- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DHCP updates are not applied to MX when calling `appliance/singleLan` endpoint
I'm trying to update DHCP settings under security&sdwan->DHCP via API call to the following end point (not totally sure why the example body is empty in the documentation):
https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-single-lan.
Although the call is returning success code (200), the setting never got really updated.
For example, if the current dhcpLeaseTime is 4 hours and I send the following request:
url = f"https://api.meraki.com/api/v1/networks/{_my_net_id}/appliance/singleLan"
headers = {'Accept': "*/*", 'Content-Type': "application/json", "X-Cisco-Meraki-API-Key": API_KEY}
data = {"subnet":"192.168.128.0/24",
"applianceIp":"192.168.128.1",
"dhcpLeaseTime":"1 day",
}
res = requests.put(url, headers=headers, data=json.dumps(data))
The request will be successful, but the dhcpLeaseTime will never be actually updated. So, the res variable in the last line will still show "4 hours"
what do I miss ?
Solved! Go to solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The single LAN GET returns the existing settings, but the PUT endpoint does not update those settings.
If you'd like to control these settings via API, your best bet is to GET the existing settings, enable VLANs on the appliance (even if you only plan to use one VLAN), and then PUT the settings to the endpoints that modify DHCP settings for VLANs.
Single LAN mode has a place for small deployments where users don't use advanced features like the API. If you want to use API, then you'll be better served enabling VLANs as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The single LAN GET returns the existing settings, but the PUT endpoint does not update those settings.
If you'd like to control these settings via API, your best bet is to GET the existing settings, enable VLANs on the appliance (even if you only plan to use one VLAN), and then PUT the settings to the endpoints that modify DHCP settings for VLANs.
Single LAN mode has a place for small deployments where users don't use advanced features like the API. If you want to use API, then you'll be better served enabling VLANs as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
