Community Record
6
Posts
1
Kudos
0
Solutions
Badges
2 weeks ago
Hi Raphael, API beta with early access was making the difference! Thanks for your help! Kind regards, Oliver
... View more
2 weeks ago
Hi Raphael, sorry to bother you again, but I do not get it working. I've tried it with "extendedParams" with same result. Now I've created another sample code without Meraki SDK, but same result again. import os
import json
import requests
api_key = os.environ.get('MERAKI_DASHBOARD_API_KEY')
org_id:str = 'xxxx'
serial:str = 'xxxx'
url:str = "https://api.meraki.com/api/v1/organizations/{org_id}/switch/ports/bySwitch"
headers:dict = {
'X-Cisco-Meraki-API-Key' : api_key,
'Content-Type': 'application/json'
}
payload:str = json.dumps(
{
"extendedParams": True,
"serial": serial
}
)
response = requests.request('GET', url, headers=headers, data=payload, timeout=60)
print(response.text.encode('utf8')) Do you have a working example for me? Kind regards, Oliver
... View more
3 weeks ago
Hi Raphael, I still did not get where to add the extendedParams. Here's a sample code: import os
import meraki
import meraki.exceptions
debug: bool = False
api_key = os.environ.get('MERAKI_DASHBOARD_API_KEY')
org_id:str = 'xxxx'
serial:str = 'xxxx'
dashboard: meraki.DashboardAPI = meraki.DashboardAPI(
api_key=api_key,
log_path='',
output_log=debug,
print_console=debug,
suppress_logging=not debug)
all_ports_config:list = dashboard.switch.getOrganizationSwitchPortsBySwitch(
org_id,
extendedParam=True,
total_pages=-1,
serial=serial
)
print(all_ports_config[0]['ports'][0]) Where do I have to add the extendedParams=True? Kind regards, Oliver
... View more
3 weeks ago
Hi Raphael, I'm not aware of an "extendedParams" parameter and could not find it on the documentation either. Where should I add it, to the getOrganizationSwitchPortsBySwitch request? This does not change anything on the reply. Here's an example output for one port. It does not contain UDLD: {
'portId': '2',
'name': 'Test',
'tags': ['test'],
'enabled': True,
'poeEnabled': True,
'type': 'access',
'vlan': 1,
'voiceVlan': 2,
'allowedVlans': 'all',
'rstpEnabled': True,
'stpGuard': 'bpdu guard',
'linkNegotiation': 'Auto negotiate',
'accessPolicyType': 'Open'
} Kind regards, Oliver
... View more
3 weeks ago
Hi folks, I'm struggeling a bit with getOrganizationSwitchPortsBySwitch API endpoint. https://developer.cisco.com/meraki/api-v1/get-organization-switch-ports-by-switch/ It does include mostly all configuration parameters of switch ports. But for reasons I do not understand UDLD configuration is not included. To get UDLD config, I must use inefficient getDeviceSwitchPort in addition. Does anybody here know why UDLD config has been excluded?!? Are there any plans to add it? Kind regards, Oliver Buchholz
... View more