How to use Dashboard API to Got or Update port information which on the C9300 NM-8X module ?

Pancho_Cai
New here

How to use Dashboard API to Got or Update port information which on the C9300 NM-8X module ?

I have use Meraki Dashboard API to manage the devices, but some device use NM-8X module.
during I use  

cpa.png

when I update the 'NM-8X/4' it will update port 4

serial_num = 'XXXXXXXX'
portID = 'NM-8X/4'
dashboard = DashboardAPI(api_key)

try:

response = dashboard.switch.getDeviceSwitchPort(
serial_num,portID
)

print(response)

and try to get all of the ports  the ports on NM won`t be listed.

SN='XXXXXXXXX'
try:
# try to collect Alerts Information
response = dashboard.switch.getDeviceSwitchPorts(
SN
)

How to fix it.

1 Reply 1
Pancho_Cai
New here

I have try another switch can got port information 

{
"portId": "1_C9300-NM-8X_2",
"name": null,
"tags": [],
"enabled": true,
"poeEnabled": false,
"type": "trunk",
"vlan": 1,
"voiceVlan": null,
"allowedVlans": "1-1000",
"isolationEnabled": false,
"rstpEnabled": true,
"stpGuard": "disabled",
"linkNegotiation": "Auto negotiate",
"portScheduleId": null,
"schedule": null,
"udld": "Alert only",
"linkNegotiationCapabilities": [
"Auto negotiate"
],



but during try update this port it is fail 


try:

response = dashboard.switch.updateDeviceSwitchPort(
ZA01SN,portId='1_C9300-NM-8X_2',
#stpGuard='bpdu guard',

name='Test'
)


Failed to retrieve alert settings: switch, updateDeviceSwitchPort - 404 Not Found, {'errors': ['Switch port not found']}

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.
Labels