Im trying to test getting info from my Org to learn building scripts.
I want to get the list of switch ports from a specific Network ID. I am able to pull the device ports if I use the switch's serial number:
response = dashboard.switch.getDeviceSwitchPorts(
serial
)
print(response)
https://developer.cisco.com/meraki/api-v1/get-device-switch-ports/
Im trying to expand upon this by getting the switch ports from a net ID
import meraki
API_KEY = 'c4............................................'
dashboard = meraki.DashboardAPI(API_KEY)
organization_id = 'XXXXXX'
# Get the list of networks in your organization
networks = dashboard.organizations.getOrganizationNetworks(
organization_id, total_pages='all'
)
# Find the network that you want
network_id = 'L_6................................'
# Get the list of switchports
switchports = dashboard.switch.getDeviceSwitchPorts(
network_id
)
# Print the list of switchports
for switchport in switchports:
print(switchport)
I get an error
ERROR > switch, getDeviceSwitchPorts - 404 Not Found, b''