Alerts endpoint returning 404

bryand23
Here to help

Alerts endpoint returning 404

Edit: Nevermind, I'm using an Org ID instead of a network ID. I should know better, I've made this mistake before 🙂

 

I'm trying to access the API endpoint for Network Alert settings, and I'm getting a 404 for that URL.

I'm able to access other endpoints just fine, sample code below.

 

 

 

 

from meraki_sdk.meraki_sdk_client import MerakiSdkClient
from meraki_sdk.exceptions.api_exception import APIException

x_cisco_meraki_api_key = my_api_key
client = MerakiSdkClient(x_cisco_meraki_api_key)
alert_settings_controller = client.alert_settings
network_id = 'NETWORK_ID' # I've tried with multiple networks

try:
    result = alert_settings_controller.get_network_alert_settings(network_id)
except APIException as e:
    print(e)
HTTP response not OK.

 

 

 

 

I tried accessing the same endpoint with the requests module to rule out an issue with the Python SDK:

 

 

 

 

import requests

headers = {'X-Cisco-Meraki-API-Key': 'my_api_key', 'Accept': 'application/json'}
url = '<a href="https://api.meraki.com/api/v0/networks/NETWORK_ID/alertSettings" target="_blank">https://api.meraki.com/api/v0/networks/NETWORK_ID/alertSettings</a>'
response = requests.get(url, headers=headers)
print(response.status_code)
404

 

 

 

 

Other URL's such as list organizations, list admins, etc. all seem to work fine with the same code.

2 Replies 2
BrechtSchamp
Kind of a big deal

Good to see it's solved. And great to see the syntax highlighting feature put to use.

Yea, it's nice! Though it appears to be autoformatting my URL and adding a bunch of extra HTML.

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.