Cisco Meraki Organization API Requests Downloader

Project Overview

This Python script allows you to download all API requests made to a Cisco Meraki organization's dashboard within a specified period (using seconds for convenience), handling pagination automatically. The results are output as a CSV file for easy analysis or record-keeping.

  • Purpose: Efficiently retrieve and archive Cisco Meraki Dashboard API requests for your organization over any user-specified period—useful for audits, troubleshooting, compliance, or analytics.
  • Features:
    • Handles all Meraki API pagination (fetches >1000 records if present)
    • User input for API Key, Org ID, and any timespan (in seconds)
    • Outputs a complete CSV log of API request data

Dependencies

Python Version

  • Python 3.7+ (Recommended)

Required Python Libraries

  • requests (HTTP API requests)
  • csv (Standard library; for CSV output)

Installation Example

pip install requests


Usage

1. Input Required

When run, the script interactively prompts the user for:

  • Cisco Meraki API Key: Obtain from your Meraki Dashboard account
  • Organization ID: Also available in the Meraki Dashboard or via the organizations API
  • Timespan (in seconds): For example, 86400 for the last 24 hours, 3600 for one hour

2. Running the Script

Save the script as Meraki-get-api-calls.py and run:

python Meraki-get-api-calls.py

Follow the prompts and provide the requested information.


Output

  • The script creates a CSV file named:

meraki_api_requests_timespan.csv

  • This file contains all Meraki Dashboard API request records matching the given time window, with each request as a row and all available fields as columns.

Example Output

id,timestamp,adminId,method,path,responseCode,responseBody...
12345,2025-07-15T14:00:05.000Z,54321,GET,/networks/1111/clients,200,...


Notes

  • You must have appropriate API permissions to access the chosen organization’s request logs.
  • The script handles full pagination using the Meraki API Link headers; it will retrieve all records for the timespan, even when the count greatly exceeds 1,000.
  • For security, do not share your API key/Org ID with others or commit them to version control.

License

MIT License


Acknowledgements

  • Cisco Meraki Dashboard API Documentation
  • Written by Perplexity.ai (I'm not a developer!!)
  • Inspired by best practices for Python project documentation
View code on GitHub
  • Owner

  • Contributors

    +1Github contributor
  • Categories

  • Products

    Meraki
  • Programming Languages

    Python
  • License

    Other

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.