Network static IP devices DNS configuration script

Here to help

Network static IP devices DNS configuration script


I am currently working on a simple script that provides a user-friendly interface to automatically modify an entire network static IP devices DNS configuration.


Here is the repository if you want to check it out & test it :

On a previous script, I used to test out the api_key validity by using the function meraki.myorgaccess(api_key), but since apiV1, I cannot find any other way than trying to get the organization list with the provided API key.


This is what I currently do :


# Creates a persistent Meraki Dashboard API session with the given api_key
self._dashboard = meraki.DashboardAPI(api_key=api_key)


# Tries a function to see if the API Key is valid

# Return true the key is valid
return True

# Catches the error if the API Key isn't valid
except meraki.APIError as e:

# Prints the error message

# Returns false if the key is invalid
return False




Does anyone have a better way of testing an api_key validity ?


Also, I would like to share this script on Cisco Code Exchange, but since I am totally new, do you have any best practices for this ? Should I wait to implement new features before submitting it ?


Thank you in advance for your answers / feedback !


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.