Unable to update the attributes of an SSID

trendkill
Here to help

Unable to update the attributes of an SSID

I am trying to update an attributes of an SSID, i am getting this error - 

 

Failed to create the new SSID. Status code: 404
Response content: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Page not found - Cisco Meraki</title>
<style type="text/css">
body { ....

i have verified the URL which i am trying in a browser, & it works . This means the URL is correct.

 

https://api.meraki.com/api/v1/networks/{{networkId}}/wireless/ssids/4 

 

 

import requests
import json

# Define the URL for creating a new SSID in your Meraki network.
url = "https://api.meraki.com/api/v1/networks/{{networkId}}/wireless/ssids/4" # Replace YOUR_NETWORK_ID with your actual network ID.

# Define your Meraki API key.
api_key = {{key}} # Replace with your Meraki API key.

# Define the headers for the request.
headers = {
"Content-Type": "application/json",
"X-Cisco-Meraki-API-Key": api_key
}

# Define the JSON payload as you provided.
payload = {
"number": 4,
"name": "test",
"enabled": True,
"splashPage": "Sponsored guest",
"ssidAdminAccessible": False,
"authMode": "open",
"ipAssignmentMode": "Bridge mode",
"useVlanTagging": True,
"defaultVlanId": 55,
"adminSplashUrl": "",
"splashTimeout": "10080 minutes",
"walledGardenEnabled": False,
"splashGuestSponsorDomains": [
"yyy.com"
],
"minBitrate": 12,
"bandSelection": "Dual band operation with Band Steering",
"perClientBandwidthLimitUp": 51200,
"perClientBandwidthLimitDown": 51200,
"perSsidBandwidthLimitUp": 0,
"perSsidBandwidthLimitDown": 0,
"mandatoryDhcpEnabled": False,
"lanIsolationEnabled": False,
"visible": True,
"availableOnAllAps": True,
"availabilityTags": [],
"speedBurst": {
"enabled": True
}
}

# Send a POST request to create the new SSID.
response = requests.post(url, headers=headers, json=payload)

# Check the response status and content.
if response.status_code == 201:
print("New SSID created successfully.")
else:
print("Failed to create the new SSID. Status code:", response.status_code)
print("Response content:", response.text)
1 Reply 1
DexterLaBora
Meraki Employee
Meraki Employee

Hi, to modify wireless SSIDs you should use a PUT request, not a POST.

 

https://developer.cisco.com/meraki/api/update-network-wireless-ssid/

Get notified when there are additional replies to this discussion.