Giter VIP home page Giter VIP logo

Comments (5)

mpapazog avatar mpapazog commented on August 21, 2024

As documented by the original creator of that script, "report_statuses.py" should be used instead, as "uplink.py" is deprecated. Added command line option "-o /all" to "report_statuses.py" that iterates through all organizations accessible by the given API key.

Please test and let me know if this achieves what you are looking for.

from automation-scripts.

rhinbourgeois avatar rhinbourgeois commented on August 21, 2024

Thanks mpapazog. That script is bugged for me with the following:

'base_url': 'https://api.meraki.com/api/v1', 'single_request_timeout': 60, 'certificate_path': '', 'requests_proxy': '', 'wait_on_rate_limit': True, 'nginx_429_retry_wait_time': 60, 'action_batch_retry_wait_time': 60, 'retry_4xx_error': False, 'retry_4xx_error_wait_time': 60, 'maximum_retries': 2, 'simulate': False, 'be_geo_id': None, 'caller': None}
2020-12-11 10:27:11 meraki: INFO > GET https://api.meraki.com/api/v1/organizations//all/appliance/uplink/statuses
2020-12-11 10:27:12 meraki: ERROR > appliance, getOrganizationApplianceUplinkStatuses - 404 Not Found, b' '
Traceback (most recent call last):
File "report_statuses.py", line 121, in
main()
File "report_statuses.py", line 40, in main
appliance_statuses = dashboard.appliance.getOrganizationApplianceUplinkStatuses(org_id, total_pages='all')
File "C:\Python38\lib\site-packages\meraki\api\appliance.py", line 1522, in getOrganizationApplianceUplinkStatuses
return self._session.get_pages(metadata, resource, params, total_pages, direction)
File "C:\Python38\lib\site-packages\meraki\rest_session.py", line 283, in get_pages
response = self.request(metadata, 'GET', url, params=params)
File "C:\Python38\lib\site-packages\meraki\rest_session.py", line 262, in request
raise APIError(metadata, response)
meraki.exceptions.APIError: appliance, getOrganizationApplianceUplinkStatuses - 404 Not Found, please wait a minute if the key or org was just newly created.

I believe it has to do with the -o /all

Look here:

GET https://api.meraki.com/api/v1/organizations//all/appliance/uplink/statuses

Which would explain the 404 error, because the page doesn't exist. I also looked at the code and don't see a note about the -o /all

My command looked like this:

python report_statuses.py -k 1234 -o /all

Is there another switch for the all portion I should be using? Thanks for your help. I really appreciate your patience.

from automation-scripts.

mpapazog avatar mpapazog commented on August 21, 2024

Sounds like an older version of the script. Could you please make sure you are using the latest one: https://raw.githubusercontent.com/meraki/automation-scripts/master/report_statuses.py

from automation-scripts.

rhinbourgeois avatar rhinbourgeois commented on August 21, 2024

mpapazog, sorry for the delay. The newer version worked. It's weird because I don't loaded the script back about a week back and I assumed everything in there was up to date. Sorry about that, and it is greatly appreciated that you pointed me in the right direction. This issue is closed.

from automation-scripts.

mpapazog avatar mpapazog commented on August 21, 2024

The feature was added just for you, following your support request. ;)

from automation-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.