CINXE.COM

Meraki Developer Hub – Deploy, Build, & Engage - Meraki Developer Hub – Homepage - Cisco Meraki Developer Hub

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="shortcut icon" href="https://static.production.devnetcloud.com/images/favicon.ico"> <link rel="canonical" href="https://developer.cisco.com/meraki/"> <title>Meraki Developer Hub – Deploy, Build, &amp; Engage - Meraki Developer Hub – Homepage - Cisco Meraki Developer Hub</title> <meta name="description" content="Meraki Developer Hub – Deploy, Build, &amp; Engage - Meraki APIs make it possible to deploy and manage networks at scale, build on a platform of intelligent, cloud-connected IT products and technologies."> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="ssr_time" content="1732642519037"> <meta name="content_state" content="live"> <meta name="pubhub_id" content="1892"> <meta name="commit_id" content="02e7c72b"> <link href="https://static.production.devnetcloud.com/dwc-header-and-footer/style.css" rel="stylesheet"><link href="https://static.production.devnetcloud.com/fontawesome/css/fontawesome-all.min.css" rel="stylesheet"><link href="https://static.production.devnetcloud.com/platformsdk/sdk.css" rel="stylesheet"><link href="https://static.production.devnetcloud.com/pubhubsdk/pubhubsite.css" rel="stylesheet"> <meta property="og:title" name="og:title" content="Meraki Developer Hub – Deploy, Build, &amp; Engage - Meraki Developer Hub – Homepage - Cisco Meraki Developer Hub"> <meta property="og:type" name="og:type" content="website"> <meta property="og:url" name="og:url" content="https://developer.cisco.com/meraki/"> <meta property="og:site_name" name="og:site_name" content="Meraki Developer Hub – Homepage - Cisco Meraki Developer Hub"> <meta property="og:description" name="og:description" content="Meraki Developer Hub – Deploy, Build, &amp; Engage - Meraki APIs make it possible to deploy and manage networks at scale, build on a platform of intelligent, cloud-connected IT products and technologies."> <meta property="og:image" name="og:image" content="https://static.production.devnetcloud.com/images/cisco-devnet.jpg"> <meta property="og:image:alt" name="og:image:alt" content="DevNet image"> <meta property="og:image:width" name="og:image:width" content="1135"> <meta property="og:image:height" name="og:image:height" content="595"> <meta property="twitter:card" name="twitter:card" content="summary_large_image"> <meta property="twitter:site" name="twitter:site" content="@CiscoDevNet"> <meta property="twitter:title" name="twitter:title" content="Meraki Developer Hub – Deploy, Build, &amp; Engage - Meraki Developer Hub – Homepage - Cisco Meraki Developer Hub"> <meta property="twitter:url" name="twitter:url" content="https://developer.cisco.com/meraki/"> <meta property="twitter:description" name="twitter:description" content="Meraki Developer Hub – Deploy, Build, &amp; Engage - Meraki APIs make it possible to deploy and manage networks at scale, build on a platform of intelligent, cloud-connected IT products and technologies."> <meta property="twitter:image" name="twitter:image" content="https://static.production.devnetcloud.com/images/cisco-devnet.jpg"> <meta property="twitter:image:alt" name="twitter:image:alt" content="DevNet image"> <meta property="twitter:image:width" name="twitter:image:width" content="1135"> <meta property="twitter:image:height" name="twitter:image:height" content="595"> <style type="text/css">data,pubhub-content{visibility:hidden}dwc-meraki-subheader{min-height:60px;background:#282b2f;display:block}@media (max-width:992px){dwc-meraki-subheader{min-height:35px}}</style> <link href="https://pubhub.devnetcloud.com/media/create-meraki-io-homepage/site/styles/legacy.css" rel="stylesheet"><link href="https://pubhub.devnetcloud.com/media/create-meraki-io-homepage/site/styles/learnYourWay.css" rel="stylesheet"><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css" rel="stylesheet"><link href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.css" rel="stylesheet" type="text/css"><link href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick-theme.min.css" rel="stylesheet" type="text/css"><link href="https://pubhub.devnetcloud.com/media/create-meraki-io-homepage/site/styles/index.css" rel="stylesheet"><style>#create-meraki-body{display:none}</style> <link rel="preload" href="https://static.production.devnetcloud.com/dwc/dwc-countdown/latest/index.js" as="script"><link rel="preload" href="https://pubhub.devnetcloud.com/media/create-meraki-io-homepage/site/js/impt.js" as="script"><link rel="preload" href="https://pubhub.devnetcloud.com/media/create-meraki-io-homepage/site/js/index.js" as="script"> </head> <body> <div id="root"> <dwc-mini-header thin="true" theme="dark" container="small"></dwc-mini-header><dwc-meraki-subheader></dwc-meraki-subheader><script src="https://static.production.devnetcloud.com/dwc/dwc-meraki-subheader/v1.0.4/index.js"></script> <div id="main"> <pubhub-content> <dwc-countdown auto-hide="" background-color="#487059" background-image="{{__PUBHUB_PROJECT_PATH__}}images/buildforbetter-bg.jpg" countdown-color="#CBFF5C" day-unit="days" firsthalf-description="AI &amp; Sustainability Code Challenge" hide-clock-icon="" hour-unit="hours" logo="{{__PUBHUB_PROJECT_PATH__}}images/buildforbetter-logo.svg" minute-unit="minutes" primarycta-background-color="#0076d5" primarycta-background-hovercolor="#1E4471" primarycta-href=" https://developer.cisco.com/build-for-better/" primarycta-text="Enter contest" secondhalf-description="left to join" tip="We've extended the submission deadline to provide you extra time to code and join!" tip-text-color="#CBFF5C" utc-time="2024-05-07T06:59"> </dwc-countdown> <div id="create-meraki-body"> <section id="m-header-section"> <div id="m-header-left-container"> <div class="container"> <div class="row justify-content-center"> <div class="col-lg-12 col-md-12 col-sm-12"> <div class="hero-title" id="m-header-tagline"> Deploy, Build, &amp; Engage </div> <div id="m-header-subtitle-container"> <div class="body-text" id="m-header-small-text"> Meraki APIs make it possible to rapidly deploy and manage networks at scale, build on a platform of intelligent, cloud-connected IT products, and engage with users in powerful new ways </div> </div> </div> </div> </div> </div> </section> <div class="ph-impt-section" style="opacity:0;height:100px"> <div class="container slider-container"> <div id="slider"> <div class="card-container"> <a class="card" data-track-name="developer-blog" data-track-value="https://blogs.cisco.com/developer" href="https://community.meraki.com/t5/Developers-APIs/On-Demand-Cisco-Live-US-Meraki-DevNet-Zone-Interviews/m-p/201995#M8645" target="_blank"> <div class="title"> Now Available On-Demand </div> <div class="desc"> Cisco Live US - Meraki DevNet Zone Interviews </div> </a> </div> <div class="card-container"> <a class="card" data-track-name="developer-blog" data-track-value="https://blogs.cisco.com/developer" href="https://community.meraki.com/t5/Developers-APIs/OpenAPI-v3-Officially-Supported/m-p/197649/highlight/true#M8394" target="_blank"> <div class="title"> OpenAPI v3 Officially Supported </div> <div class="desc"> Introducing OpenAPI v3 Support for the Meraki Dashboard API </div> </a> </div> <div class="card-container"> <a class="card" href="https://developer.cisco.com/meraki/whats-new/" target="_blank"> <div class="title"> What's new? </div> <div class="desc"> Keep up with all updates in the What's New with Meraki API documentation </div> </a> </div> <div class="card-container"> <a class="card" href="https://teams.webex.com/" target="_blank"> <div class="title"> API Demo Platform </div> <div class="desc"> Ask meraki.bot@webex.bot (on Webex Teams) for an "API demo" </div> </a> </div> <div class="card-container"> <a class="card" data-track-name="slide-2-solutions-api" data-track-value="https://community.meraki.com/t5/Solutions-APIs/bd-p/api" href="https://community.meraki.com/t5/Solutions-APIs/bd-p/api?utm_source=devnet&amp;utm_medium=tile" target="_blank"> <div class="title"> Meraki Community </div> <div class="desc"> Share projects, ask questions, and get expert help on the Meraki Community! </div> </a> </div> <div class="card-container"> <a class="card" data-track-name="developer-blog" data-track-value="https://blogs.cisco.com/developer/merakiwebhooks01" href="https://blogs.cisco.com/developer/merakiwebhooks01" target="_blank"> <div class="title"> Developer News </div> <div class="desc"> Introducing Meraki Webhook Integrations </div> </a> </div> <div class="card-container"> <a class="card" data-track-name="developer-blog" data-track-value="https://blogs.cisco.com/developer/merakipayloadtemplates01" href="https://blogs.cisco.com/developer/merakipayloadtemplates01" target="_blank"> <div class="title"> Developer Blog </div> <div class="desc"> Join the Beta for Meraki Webhook Custom Payload Templates </div> </a> </div> </div> </div> </div> <section id="m-get-started-section"> <div class="container"> <div class="row justify-content-center"> <div class="col-md-8 col-lg-8 col-sm-12"> <div class="title" id="m-get-started-title"> What can you do with the Meraki API? </div> </div> </div> <div class="row no-gutters"> <div class="col-md-12 col-lg-12 col-sm-12"> <div class="selected-tab tab-header" id="m-get-started-step1-tab-container"> <div class="tab-icon" id="m-get-started-step1-tab-icon"> </div> <div class="tab-title body-text" id="m-get-started-step1-tab-title"> Application Development </div> </div> <div class="show-content tab-content" id="m-get-started-step1-content-container"> <div class="container"> <div class="row"> <div class="col-md-8 offset-md-1 offset-lg-1 col-lg-8 col-sm-12"> <div class="content-title title" id="m-get-started-step1-content-title"> Automate with Dashboard API </div> <div class="content-description body-text" id="m-get-started-step1-content-description"> <span id="m-get-started-step1-content-des"> The Meraki Dashboard API allows developers to handle tedious tasks quickly and simply. The API uses familiar REST conventions over HTTP with JSON data. </span> <br> <br> <span class="bold" id="m-get-started-step1-content-list-steps"> What can Dashboard API be used for? </span> </div> <ul class="body-text" id="m-get-started-step1-content-list"> <li id="m-get-started-step1-content-list1"> Add new organizations, admins, networks, devices, VLANs, and more </li> <li id="m-get-started-step1-content-list2"> Configure thousands of networks in minutes </li> <li id="m-get-started-step1-content-list3"> On-board and off-board new employees’ teleworker setup automatically </li> <li id="m-get-started-step1-content-list4"> Build your own dashboard for store managers, field techs, or unique use cases </li> </ul> </div> <div class="col-md-2 col-lg-2 col-sm-12"> <div class="step-picture" id="m-get-started-step1-pic"> </div> </div> </div> <div class="row"> <div class="col-md-10 offset-md-1 col-lg-10 offset-lg-1 col-sm-12"> <div class="content-description body-text" id="m-get-started-step1-content-open-api-description"> <span id="m-get-started-step1-content-openapi"> We're excited to announce the Dashboard API is now using the <strong> OpenAPI Specification! </strong> <a href="https://openapis.org/" target="_blank"> Read more on the official site </a> </span> <br> <br> <span class="bold" id="m-get-started-step1-content-list-openapi-steps"> What does this mean? </span> </div> <ul class="body-text" id="m-get-started-step1-content-list"> <li id="m-get-started-step1-content-openapi-list1"> Take advantage of our interactive API documentation with enhanced details </li> <li id="m-get-started-step1-content-openapi-list2"> Instantly start coding with one of our Python library or generate your own SDK </li> <li id="m-get-started-step1-content-openapi-list3"> Export the latest version to a Postman collection or other formats </li> <li id="m-get-started-step1-content-openapi-list4"> Take advantage of the hundreds of tools and resources that extend the OpenAPI spec </li> </ul> </div> </div> <div class="row"> <div class="col-md-6 offset-md-1 col-lg-6 offset-lg-1 col-sm-12"> <div class="step-title title" id="m-get-started-step1-content-step-title"> How does the Python SDK work? </div> </div> </div> <div class="row"> <div class="col-md-10 offset-md-1 col-lg-10 offset-lg-1 col-sm-12"> <div class="steps-title-container"> <div class="m-get-started-steps-icon"> 1 </div> <div class="m-get-started-steps-title body-text" id="m-get-started-step1-content-step1"> <a href="/meraki/api-v1/libraries-sdks-overview/" target="_blank"> Install the Meraki Python library/SDK </a> </div> </div> </div> </div> <div class="row"> <div class="col-md-9 offset-md-2 col-lg-9 offset-lg-2 col-sm-12"> <div class="special-subheading body-text" id="m-get-started-step1-content-step1-des"> Import the library and set your API key for authorization </div> </div> </div> <div class="row"> <div class="col-md-9 offset-md-2 col-lg-9 offset-lg-2 col-sm-12"> <div class="major-code-block" id="m-get-started-step1-code-block"> <pre><code class="python">API_KEY = "6bec40cf957de430a6f1f2baa056b99a4fac9ea0" # demo read-only API key import meraki dashboard = meraki.DashboardAPI(API_KEY) </code></pre> </div> </div> </div> <div class="row"> <div class="col-md-10 offset-md-1 col-lg-10 offset-lg-1 col-sm-12"> <div class="steps-title-container"> <div class="m-get-started-steps-icon"> 2 </div> <div class="m-get-started-steps-title body-text" id="m-get-started-step1-content-step2"> Test it out: try returning a list of the organizations and their IDs </div> </div> </div> </div> <div class="row"> <div class="col-md-9 offset-md-2 col-lg-9 offset-lg-2 col-sm-12"> <div class="major-code-block" id="m-get-started-step1-code-block2"> <pre><code class="python">response = dashboard.organizations.getOrganizations() print(response) &gt;&gt;&gt; [ {'id': '549236', 'name': 'DevNet Sandbox', 'url': 'https://n149.meraki.com/o/-t35Mb/manage/organization/overview'}, {'id': '463308', 'name': 'DevNet San Jose', 'url': 'https://n18.meraki.com/o/vB2D8a/manage/organization/overview'}, ... </code></pre> </div> </div> </div> <div class="row"> <div class="col-md-11 offset-md-1 col-lg-11 offset-lg-1 col-sm-12"> <div class="steps-title-container oversize-line-title"> <div class="m-get-started-steps-icon"> 3 </div> <div class="m-get-started-steps-title body-text"> <span id="m-get-started-step1-content-step3-des"> That's it! Easily integrate the Meraki cloud platform into your next application or workflow. </span> <br> <br> <span id="m-get-started-step1-content-step3-learn"> To learn more about Dashboard API, choose <strong> Complete the full tutorial </strong> to take the DevNet Meraki learning lab or head over to the <strong> <a href="/meraki/api" target="_blank"> API docs </a> </strong> to begin taking advantage of your newfound powers! </span> </div> </div> </div> </div> <div class="row"> <div class="col-md-3 offset-md-2 col-lg-3 offset-lg-2 col-sm-12"> <div class="m-get-started-button-container button"> <a class="m-get-started-start-button body-text" href="https://developer.cisco.com/learning/modules/dne-meraki-dashboard-api/" id="m-get-started-step1-complete" target="_blank"> Complete the full tutorial </a> </div> </div> </div> </div> </div> <div class="tab-header" id="m-get-started-step2-tab-container"> <div class="tab-icon" id="m-get-started-step2-tab-icon"> </div> <div class="tab-title body-text" id="m-get-started-step2-tab-title"> Guest Wi-Fi </div> </div> <div class="hide-content tab-content" id="m-get-started-step2-content-container"> <div class="container"> <div class="row"> <div class="col-md-8 offset-md-1 offset-lg-1 col-lg-8 col-sm-12"> <div class="content-title title" id="m-get-started-step2-content-title"> Build Your Own Captive Portal </div> <div class="content-description body-text" id="m-get-started-step2-content-description"> Leverage the captive portal integration to develop web portals that provide a host of services to on-site Wi-Fi users. These services can include custom authentication features, promotional information, or data-gathering surveys. </div> </div> <div class="col-md-2 col-lg-2 col-sm-12"> <div class="step-picture" id="m-get-started-step2-pic"> </div> </div> </div> <div class="row"> <div class="col-md-6 offset-md-1 col-lg-6 offset-lg-1 col-sm-12"> <div class="step-title title" id="m-get-started-step2-content-step-title"> Getting started </div> </div> </div> <div class="row"> <div class="col-md-10 offset-md-1 col-lg-10 offset-lg-1 col-sm-12"> <div class="steps-title-container oversize-line-title"> <div class="m-get-started-steps-icon"> 1 </div> <div class="m-get-started-steps-title body-text" id="m-get-started-step2-content-step1"> In this Python 3 example, run an API server on your local machine (make sure you have <a href="https://pypi.org/project/Flask/" target="_blank"> Flask </a> installed). Copy and paste this code and run using using this <a href="https://github.com/CiscoDevNet/dnav3-code/tree/master/intro-meraki/meraki-04-captive-portal" target="_blank"> Python script </a> locally to start a splash page web server. <br> <br> Click-through code snippet: <br> </div> </div> </div> </div> <div class="row"> <div class="col-md-9 offset-md-2 col-lg-9 offset-lg-2 col-sm-12"> <div class="major-code-block" id="m-get-started-step2-code-block"> <pre><code class="python"> from flask import Flask, request, render_template, redirect, url_for, json app = Flask(__name__) global base_grant_url base_grant_url = "" global user_continue_url user_continue_url = "" global success_url success_url = "" @app.route("/click", methods=["GET"]) def get_click(): global base_grant_url global user_continue_url global success_url host = request.host_url base_grant_url = request.args.get('base_grant_url') user_continue_url = request.args.get('user_continue_url') node_mac = request.args.get('node_mac') client_ip = request.args.get('client_ip') client_mac = request.args.get('client_mac ') splashclick_time = request.args.get('splashclick_time') success_url = host + "dev/success" network_id=request.args.get("network_id") camera_serial=request.args.get("camera_serial") api_key=request.args.get("api_key") return render_template("click.html", client_ip=client_ip, client_mac=client_mac, node_mac=node_mac, user_continue_url=user_continue_url,success_url=success_url) . . . if __name__ == "__main__": app.run(host="0.0.0.0", port=5004, debug=False) </code></pre> </div> </div> </div> <div class="row"> <div class="col-md-10 offset-md-1 col-lg-10 offset-lg-1 col-sm-12"> <div class="steps-title-container"> <div class="m-get-started-steps-icon"> 2 </div> <div class="m-get-started-steps-title body-text" id="m-get-started-step2-content-step2"> Run <a href="https://ngrok.com/" target="_blank"> ngrok </a> at your terminal (make sure you have ngrok installed) </div> </div> </div> </div> <div class="row"> <div class="col-md-9 offset-md-2 col-lg-9 offset-lg-2 col-sm-12"> <div class="minor-code-block"> $ ./ngrok http 5004 </div> <div class="special-subheading body-text" id="m-get-started-step2-content-step2-url"> You'll be assigned a URL that resembles: </div> <div class="minor-code-block"> https://0a5c1166.ngrok.io/click </div> </div> </div> <div class="row"> <div class="col-md-11 offset-md-1 col-lg-11 offset-lg-1 col-sm-12"> <div class="steps-title-container"> <div class="m-get-started-steps-icon"> 3 </div> <div class="m-get-started-steps-title body-text" id="m-get-started-step2-content-step3"> Access your Meraki dashboard or the <a href="https://devnetsandbox.cisco.com/RM/Diagram/Index/a9487767-deef-4855-b3e3-880e7f39eadc?diagramType=Topology" target="_blank"> DevNet Meraki Sandbox. </a> <br> Add your ngrok URL to your Meraki Dashboard. </div> </div> </div> </div> <div class="row"> <div class="col-md-9 offset-md-2 col-lg-9 offset-lg-2 col-sm-12"> <div class="minor-code-block"> Dashboard &gt; Wireless &gt; Configure &gt; Splash &gt; SSID </div> </div> </div> <div class="row"> <div class="col-md-10 offset-md-1 col-lg-10 offset-lg-1 col-sm-12"> <div class="steps-title-container oversize-line-title"> <div class="m-get-started-steps-icon"> 4 </div> <div class="m-get-started-steps-title body-text"> <span id="m-get-started-step2-content-step4-desc"> That’s it, now connect your client to that SSID and see your splash screen in action. </span> <br> <br> <span id="m-get-started-step2-content-step4-learn"> Learn how to use the captive portal API to create custom splash pages, by taking the captive portal Learning Lab </span> </div> </div> </div> </div> <div class="row"> <div class="col-md-4 offset-md-2 col-lg-4 offset-lg-2 col-sm-12"> <div class="m-get-started-button-container button"> <a class="m-get-started-start-button body-text" href="https://developer.cisco.com/learning/modules/meraki-captive-portal/" id="m-get-started-step2-complete" target="_blank"> Take the captive portal Learning Lab </a> </div> </div> </div> <div class="row" style="background-color:#efefef"> <div class="col-md-11 offset-md-1 col-lg-11 offset-lg-1 col-sm-12"> <div class="m-get-started-additional-title title" id="m-get-started-step2-additional"> Additional resources </div> </div> <div class="col-md-5 offset-md-1 col-lg-5 offset-lg-1 col-sm-12"> <div class="m-get-started-additional-resources-container body-text"> <a class="additional-link subtitle" href="/meraki/captive-portal-api" id="m-get-started-step2-solution" target="_blank"> Captive Portal API docs </a> <br> <span id="m-get-started-step2-solution-desc"> Check out the instructions on how to enable Meraki’s Captive Portal to more fully engage Wi-Fi customer engagements. </span> </div> </div> <div class="col-md-5 col-lg-5 col-sm-12 float-md-left float-lg-left"> <div class="m-get-started-additional-resources-container body-text"> <a class="additional-link subtitle" href="/meraki/explore/#tech=Captive%20Portal%20API" id="m-get-started-step2-Config" target="_blank"> Captive Portal Solutions </a> <br> <span id="m-get-started-step2-config-desc"> Explore the various ways that Meraki’s Captive Portal functionality can be utilized. </span> </div> </div> </div> </div> </div> <div class="tab-header" id="m-get-started-step3-tab-container"> <div class="tab-icon" id="m-get-started-step3-tab-icon"> </div> <div class="tab-title body-text" id="m-get-started-step3-tab-title"> Location Services </div> </div> <div class="hide-content tab-content" id="m-get-started-step3-content-container"> <div class="container"> <div class="row"> <div class="col-md-8 offset-md-1 offset-lg-1 col-lg-8 col-sm-12"> <div class="content-title title" id="m-get-started-step3-content-title"> Build Wi-Fi and BLE Location Apps </div> <div class="content-description body-text" id="m-get-started-step3-content-description"> Using the physical placement of each access point on the Map &amp; Floorplan of the Dashboard, the Meraki cloud aggregates raw client location data reported and provides a real-time estimate on the location of Wi-Fi (associated and non-associated) and Bluetooth Low Energy (BLE) devices in real-time. The Scanning API delivers this data to your real-time location application, data warehouse, or business intelligence systems. </div> </div> <div class="col-md-2 col-lg-2 col-sm-12"> <div class="step-picture" id="m-get-started-step3-pic"> </div> </div> </div> <div class="row"> <div class="col-md-6 offset-md-1 col-lg-6 offset-lg-1 col-sm-12"> <div class="step-title title" id="m-get-started-step3-content-step-title"> Getting started </div> </div> </div> <div class="row"> <div class="col-md-10 offset-md-1 col-lg-10 offset-lg-1 col-sm-12"> <div class="steps-title-container"> <div class="m-get-started-steps-icon"> 1 </div> <div class="m-get-started-steps-title body-text" id="m-get-started-step3-content-step1"> In this Python 3 example, run an API server on your local machine (make sure you have <a href="https://pypi.org/project/Flask/" target="_blank"> Flask </a> installed). </div> </div> </div> </div> <div class="row"> <div class="col-md-9 offset-md-2 col-lg-9 offset-lg-2 col-sm-12"> <div class="major-code-block" id="m-get-started-step3-code-block"> <pre><code class="python"> from flask import Flask, json, request # init a flash web app app = Flask(__name__) # validate web server from meraki @app.route('/', methods=['GET']) def get_validator(): return "&lt;Your validator from meraki dashboard&gt;" # receive location data @app.route('/', methods=['POST']) def get_cmxJSON(): cmxdata = request.json # Determine device type if cmxdata['type'] == "DevicesSeen": print("WiFi Devices Seen") elif cmxdata['type'] == "BluetoothDevicesSeen": print("Bluetooth Devices Seen") else: print("Unknown Device 'type'") return "CMX POST Received" if __name__ == '__main__': # run app app.run(port=5000, debug=False) </code></pre> </div> </div> </div> <div class="row"> <div class="col-md-10 offset-md-1 col-lg-10 offset-lg-1 col-sm-12"> <div class="steps-title-container"> <div class="m-get-started-steps-icon"> 2 </div> <div class="m-get-started-steps-title body-text" id="m-get-started-step3-content-step2"> Download and run <a href="https://ngrok.com" target="_blank"> ngrok </a> at your terminal. </div> </div> </div> </div> <div class="row"> <div class="col-md-9 offset-md-2 col-lg-9 offset-lg-2 col-sm-12"> <div class="minor-code-block"> $ ./ngrok http 5000 </div> <div class="special-subheading body-text" id="m-get-started-step3-content-step2-url"> You'll be assigned a URL that resembles: </div> <div class="minor-code-block"> https://0a5c1166.ngrok.io </div> </div> </div> <div class="row"> <div class="col-md-11 offset-md-1 col-lg-11 offset-lg-1 col-sm-12"> <div class="steps-title-container oversize-line-title"> <div class="m-get-started-steps-icon"> 3 </div> <div class="m-get-started-steps-title body-text" id="m-get-started-step3-content-step3"> Access your Meraki dashboard or the <a href="https://devnetsandbox.cisco.com/RM/Diagram/Index/a9487767-deef-4855-b3e3-880e7f39eadc?diagramType=Topology" target="_blank"> DevNet Meraki Sandbox. </a> <br> Add your ngrok URL from Step 2 to your Meraki dashboard. </div> </div> </div> </div> <div class="row"> <div class="col-md-9 offset-md-2 col-lg-9 offset-lg-2 col-sm-12"> <div class="minor-code-block"> Dashboard &gt; Network Wide &gt; General &gt; Location and scanning </div> </div> </div> <div class="row"> <div class="col-md-10 offset-md-1 col-lg-10 offset-lg-1 col-sm-12"> <div class="steps-title-container oversize-line-title"> <div class="m-get-started-steps-icon"> 4 </div> <div class="m-get-started-steps-title body-text"> <span id="m-get-started-step3-content-step4"> Finally, you should start receiving data from the Location Scanning API printed (or consoled) out in your terminal. </span> <br> <br> <span id="m-get-started-step3-content-step4-text"> You can also find the <a href="https://github.com/CiscoDevNet/dnav3-code/tree/master/intro-meraki/meraki-03-location-scanning-python" target="_blank"> full application example on Github. </a> </span> </div> </div> </div> </div> <div class="row"> <div class="col-md-3 offset-md-2 col-lg-3 offset-lg-2 col-sm-12"> <div class="m-get-started-button-container button body-text"> <a class="m-get-started-start-button" href="https://developer.cisco.com/learning/labs/dne-meraki-location-scanning-python/" id="m-get-started-step3-complete" target="_blank"> Complete the full tutorial </a> </div> </div> </div> <div class="row" style="background-color:#efefef"> <div class="col-md-11 offset-md-1 col-lg-11 offset-lg-1 col-sm-12"> <div class="m-get-started-additional-resources-container body-text" id="special-additional-resources"> <a class="additional-link subtitle" href="/docs/meraki/#location-scanning-sample-code" id="m-get-started-more" target="_blank"> More sample projects </a> <br> <span id="m-get-started-more-desc"> Take a look at Location Scanning samples developed for NodeJS, Node-RED, and AWS Lambda. </span> </div> </div> </div> </div> </div> <div class="tab-header" id="m-get-started-step4-tab-container"> <div class="tab-icon" id="m-get-started-step4-tab-icon"> </div> <div class="tab-title body-text" id="m-get-started-step4-tab-title"> Meraki as a Sensor </div> </div> <div class="hide-content tab-content" id="m-get-started-step4-content-container"> <div class="container"> <div class="row"> <div class="col-md-8 offset-md-1 offset-lg-1 col-lg-8 col-sm-12"> <div class="content-title title" id="m-get-started-step4-content-title"> Analyze with MV Sense and Camera APIs </div> <div class="content-description body-text" id="m-get-started-step4-content-description"> <span id="m-get-started-step4-content-des"> Meraki Smart Cameras run an ML/CV model at the edge (on the camera) for object detection, classification, and tracking right out of the box. MV Sense is a collection of APIs that make the edge-computed people detection data from your MVs accessible for integration with business applications. Three types of data can be accessed: </span> <br> <br> <span class="bold" id="m-get-started-step4-content-list-steps"> What is MV Sense? </span> </div> <ul class="body-text" id="m-get-started-step4-content-list"> <li id="m-get-started-step4-content-list1"> Historical Aggregate - How many people were here at time <i> t </i> ? </li> <li id="m-get-started-step4-content-list2"> Current Snapshot - How many people are here now? </li> <li id="m-get-started-step4-content-list3"> Real-time Feed - Sub-second data feed of people and their location via MQTT </li> </ul> <span id="m-get-started-step4-content-des2"> We also have two additional APIs that enable third-party applications to be even more insightful with evidence. </span> <ul class="body-text" id="m-get-started-step4-content-list"> <li id="m-get-started-step4-content-list12"> Live link API - Add a dashboard link to the exact timestamp of the video you are interested in. </li> <li id="m-get-started-step4-content-list22"> Snapshot API - Add a snapshot of the camera footage you want. </li> </ul> </div> <div class="col-md-2 col-lg-2 col-sm-12"> <div class="step-picture" id="m-get-started-step4-pic"> </div> </div> </div> <div class="row"> <div class="col-md-4 offset-md-1 col-lg-4 offset-lg-1 col-sm-6"> <div class="m-get-started-postman-container" id="first-postman"> <a class="m-get-started-postman-link body-text" href="https://developer.cisco.com/meraki/mv-sense/" id="m-get-started-documentation" target="_blank"> View the documentation </a> </div> </div> </div> </div> <br> <div class="row"> <div class="col-md-10 offset-md-1 col-lg-10 offset-lg-1 col-sm-12"> <div class="step-title title" id="m-get-started-step4-content-step-title"> Starter Python script </div> <div id="m-get-started-step4-content-step-des"> Here’s a starter Python script that runs on Repl.it, an online and accessible integrated development environment where you can quickly build and run an application. The application we will create sends a screenshot of the camera’s current field of view directly to your phone. </div> </div> </div> <div class="row"> <div class="col-md-10 offset-md-1 col-lg-10 offset-lg-1 col-sm-12"> <div class="steps-title-container"> <div class="m-get-started-steps-icon"> 1 </div> <div class="m-get-started-steps-title body-text" id="m-get-started-step4-content-step1"> <a href="https://repl.it/repls/CoordinatedAnchoredErrors" target="_blank"> Fork this repl.it project </a> </div> </div> </div> </div> <div class="row"> <div class="col-md-9 offset-md-2 col-lg-9 offset-lg-2 col-sm-12"> <div class="major-code-block" id="m-get-started-step4-code-block"> <pre><code class="python"> ## Live API print('MV Sense Live API') meraki_live_url = 'https://api.meraki.com/api/v0/devices/<camera-serial>/camera/analytics/live' meraki_headers = {'X-Cisco-Meraki-API-Key': '<api key="">'} meraki_live_response = requests.get(meraki_live_url, headers=meraki_headers) meraki_live_response_json=json.loads(meraki_live_response.text) num_of_person_detected=meraki_live_response_json['zones']['0']['person'] print(num_of_person_detected) print('Snapshot API') ## Snapshot API meraki_snapshot_url='https://api.meraki.com/api/v0/networks/<network_id>/cameras/<camera-serial>/snapshot' meraki_snapshot_response = requests.post(meraki_snapshot_url, headers=meraki_headers) time.sleep(10) meraki_snapshot_response_json=json.loads(meraki_snapshot_response.text) snapshot_url=meraki_snapshot_response_json['url'] </camera-serial></network_id></api></camera-serial></code></pre> </div> </div> </div> <div class="row"> <div class="col-md-10 offset-md-1 col-lg-10 offset-lg-1 col-sm-12"> <div class="steps-title-container"> <div class="m-get-started-steps-icon"> 2 </div> <div class="m-get-started-steps-title body-text" id="m-get-started-step4-content-step2"> Edit the Serial Number to that of your camera in line number 13 and 24. Serial Number is of the format Q2PV-4ZLD-97X9 </div> </div> </div> </div> <div class="row"> <div class="col-md-11 offset-md-1 col-lg-11 offset-lg-1 col-sm-12"> <div class="steps-title-container oversize-line-title"> <div class="m-get-started-steps-icon"> 3 </div> <div class="m-get-started-steps-title body-text"> <span id="m-get-started-step4-content-step3-des"> Edit your "To" phone number to your number on line 39. That's it! You've now set up an application that sends a snapshot directly to your phone. <br> </span> <br> <br> </div> </div> </div> </div> </div> </div> </div> </div> </section> <section id="create-meraki-capabilities-section"> <featuresection id="featuresection_1"> <header data-class="padding-bottom-md"> <title> Cisco Meraki Platform capabilities </title> <description> Easy to learn, simple to use, and constantly updated with powerful new capabilities </description> </header> <cards data-class="row-card font-weight-lighter" data-columns="2"> <card> <icon data-href="/meraki/explore/#usecase=Network%20Automation"> <img data-src="images/IconNetM.png" src="https://pubhub.devnetcloud.com/media/create-meraki-io-homepage/site/images/IconNetM.png"> </icon> <title data-class="font-weight-lighter" data-color="#333333"> Network Automation </title> <description data-color="#39393b"> Automate the configuration, deployment, and managment of physical and virtual devices in a network. </description> <action data-class="type-arrow" data-href="/meraki/explore/#usecase=Network%20Automation"> Learn more </action> </card> <card> <icon data-href="/meraki/explore/#usecase=Mapping%20and%20Wayfinding"> <img data-src="images/IconWayfinding.png" src="https://pubhub.devnetcloud.com/media/create-meraki-io-homepage/site/images/IconWayfinding.png"> </icon> <title data-class="font-weight-lighter" data-color="#333333"> Wayfinding &amp; Mapping </title> <description data-color="#39393b"> Map physical spaces to provide directions and context that helps users find their way through and navigate to key locations in your space. </description> <action data-class="type-arrow" data-href="/meraki/explore/#usecase=Mapping%20and%20Wayfinding"> Learn more </action> </card> <card> <icon data-href="/meraki/explore/#usecase=Guest%20Wi-Fi"> <img data-src="images/IconGuessWifi.png" src="https://pubhub.devnetcloud.com/media/create-meraki-io-homepage/site/images/IconGuessWifi.png"> </icon> <title data-class="font-weight-lighter" data-color="#333333"> Interactive Guest Wi-Fi </title> <description data-color="#39393b"> Easily and securely grant Wi-Fi access to visitors on a landing page customized with your brand and content. </description> <action data-class="type-arrow" data-href="/meraki/explore/#usecase=Guest%20Wi-Fi"> Learn more </action> </card> <card> <icon data-href="/meraki/explore/#usecase=Network%20Monitoring"> <img data-src="images/IconAssetTracking.png" src="https://pubhub.devnetcloud.com/media/create-meraki-io-homepage/site/images/IconAssetTracking.png"> </icon> <title data-class="font-weight-lighter" data-color="#333333"> Asset Tracking </title> <description data-color="#39393b"> Track physical assets, either by scanning barcode labels attached to the assets or by using GPS, BLE or RFID tags that broadcast their location. </description> <action data-class="type-arrow" data-href="/meraki/explore/#usecase=BLE%20and%20Wi-Fi%20Location"> Learn more </action> </card> <card> <icon data-href="/meraki/explore/#tech=MV%20Sense"> <img data-src="images/iconVideo.png" src="https://pubhub.devnetcloud.com/media/create-meraki-io-homepage/site/images/iconVideo.png"> </icon> <title data-class="font-weight-lighter" data-color="#333333"> Video Analytics </title> <description data-color="#39393b"> Analyze data sourced from Meraki Video Cameras to bring new insights into physical spaces. Instantly derive new business insights into people counting, queue length monitoring, entry &amp; exit behavior and deeper integration with physical security solutions. </description> <action data-class="type-arrow" data-href="/meraki/explore/#tech=MV%20Sense"> Learn more </action> </card> <card> <icon data-href="/meraki/explore/#usecase=IoT"> <img data-src="images/IconIot.png" src="https://pubhub.devnetcloud.com/media/create-meraki-io-homepage/site/images/IconIot.png"> </icon> <title data-class="font-weight-lighter" data-color="#333333"> IoT &amp; Security </title> <description data-color="#39393b"> Manage, Integrate and Safeguard IoT devices connected at the edge while protecting the entire network from emerging vulnerabilities. </description> <action data-class="type-arrow" data-href="/meraki/explore/#usecase=IoT"> Learn more </action> </card> </cards> </featuresection> </section> <section class="learnWay-section"> <div class="container-fluid learn-way block"> <p class="learn-way-head" id="learn-way"> Learn your way </p> <div class="row learn-way-row"> <div class="col-sm-12 col-md-12 col-lg-4 learn-cols"> <a href="https://developer.cisco.com/learning/search/tracks/products/Cisco%20Meraki/" target="_blank"> <div class="card learn-way-card"> <div class="card-body learning"> <div class="pubhub-widget-container" data-selector="img[data-src]"> <img class="learning-icon" src="https://pubhub.devnetcloud.com/media/dnacenter/site/images/LearningLabs.svg"> </div> <p class="card-title learn-way-p1" id="Learn-learning-lab-title"> Learning Labs </p> <p class="card-text learn-way-p2" id="Learn-learning-lab-desc"> Get guided, actionable lessons with the Cisco Meraki platform Learning Track. Our 15- to 20-minute labs show you where to begin and how to build custom apps. </p> </div> </div> </a> </div> <div class="col-sm-12 col-md-12 col-lg-4 learn-cols"> <a href="https://devnetsandbox.cisco.com/RM/Diagram/Index/a9487767-deef-4855-b3e3-880e7f39eadc?diagramType=Topology" target="_blank"> <div class="card learn-way-card"> <div class="card-body learning"> <div class="pubhub-widget-container" data-selector="img[data-src]"> <img class="learning-icon" src="https://pubhub.devnetcloud.com/media/dnacenter/site/images/Sandbox.svg"> </div> <p class="card-title learn-way-p1" id="Learn-sandbox-title"> Sandbox </p> <p class="card-text learn-way-p2" id="Learn-sandbox-desc"> Play with features in our Cisco Meraki platform Sandbox, a free 24/7 hosted development lab for integrating and working with code. </p> </div> </div> </a> </div> <div class="col-sm-12 col-md-12 col-lg-4 learn-cols"> <a href="https://developer.cisco.com/codeexchange/search/?products=Cisco+Meraki" target="_blank"> <div class="card learn-way-card"> <div class="card-body learning"> <div class="pubhub-widget-container" data-selector="img[data-src]"> <img class="learning-icon" src="https://pubhub.devnetcloud.com/media/dnacenter/site/images/Github.svg"> </div> <p class="card-title learn-way-p1" id="Learn-code-title"> Code Exchange </p> <p class="card-text learn-way-p2" id="Learn-code-desc"> Check out Cisco Meraki platform examples, sample code, and more on Github. Get inspired by what others have built. </p> </div> </div> </a> </div> </div> </div> </section> </div> </pubhub-content> </div> <dwc-footer thin theme="dark"></dwc-footer> </div> <script>PUBHUB_ENV="production"</script> <script>window.SITE_PROTECTED=!1,window.PREVIEW_PUBHUB_PROJECT=!1,window.ETTAPI="https://devnet-ett.cisco.com/",window.API_HOST="https://devnet.cisco.com/",window.REPORT_ISSUE_URL="https://devnet.cisco.com/v1/issues/",window.MAIL_URL="https://devnet.cisco.com/v1/mail/",window.newsletterURL="https://devnet.cisco.com/v1/subscribers/269cae8744",window.sparkURL="https://devnet.cisco.com/v1/sparkmessage/memberships/",window.EVENT_SERVICE_URL="https://devnet.cisco.com/v1/events/",window.PROTECT_SERVICE_URL="https://devnet.cisco.com/v1/presigned/",window.FILE_SERVICE_URL="https://devnet.cisco.com/v1/uploadfile",window.TERM_SERVICE_URL="https://devnet.cisco.com/v1/terms/",window.UPM_URL="https://devnet.cisco.com/api/v1.0.0/",window.AUTH_URL="https://auth-devnet.cisco.com/v1/auth/",window.LEARNING_LAB_URL="https://learninglabs.cisco.com",window.QUOTA_SEARCH_URL="https://devnet.cisco.com/v1/companies/search?domains=",window.NEW_MENU="https://pubhub.devnetcloud.com/media/new-announcement/site"</script><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" defer="defer"></script><script src="https://static.production.devnetcloud.com/platformsdk/sdk.js" defer="defer"></script><script src="https://static.production.devnetcloud.com/dui/index.js" defer="defer"></script><script src="https://static.production.devnetcloud.com/analyticSDK/sdk.js" defer="defer"></script><script src="https://static.production.devnetcloud.com/dwc-header-and-footer/index.js" defer="defer"></script><script src="https://static.production.devnetcloud.com/pubhubsdk/pubhubsite.js" defer="defer"></script> <script>document.addEventListener("DOMContentLoaded",(function(){!function(e){let t=window.document;if(!window.PubHub)return window._waitPubHubTimeout&&clearTimeout(window._waitPubHubTimeout),selfFn=arguments.callee,window._waitPubHubTimeout=setTimeout((()=>selfFn(e)),50),void console.log("pubhub not ready, wait for a while");Object.defineProperty(PubHub,"SDKURL",{get:function(){return"https://static.production.devnetcloud.com/pubhubsdk/"}});let o=t.getElementById("main"),i=window.site=window._siteInstance=window.PubHub.createSitePage({container:o});i.checkAccess=!0,i.on("configDataError",(function(e){switch(e.detail.error.message){case"forbidden":window.location="/403";break;case"cco_login_required":PlatformSDK.loginWith("ciscosso");break;case"login_required":PlatformSDK.openLogin();break;default:window.location="/404"}}));let n=e.webJson;i.content={index:e.html},i.config=n,i.on("rendered",(function(){["https://static.production.devnetcloud.com/dwc/dwc-countdown/latest/index.js","https://pubhub.devnetcloud.com/media/create-meraki-io-homepage/site/js/impt.js","https://pubhub.devnetcloud.com/media/create-meraki-io-homepage/site/js/index.js"].forEach((function(e,o){const i=t.createElement("script");i.src=e,i.defer=!0,t.body.appendChild(i)}))}))}({webJson:{config:{defaultLanguage:"en"},meta:{access_control:"public",access_control_profile_id_whitelist:"",access_control_role_based_allowlist:"",branch:"master",description:"",id:1892,indexed:!0,languages:[{code:"en",name:"English"}],location:"https://pubhub.devnetcloud.com/media/create-meraki-io-homepage/site/",name:"Meraki Developer Hub – Homepage",profile_id_whitelist:"",project_id:1892,project_type:"microsite",site_location:"/apps/pubhub/media/create-meraki-io-homepage/02e7c72b012ddedb4621696e94b30d2496495dae",state:"live",url:"/meraki/",url_path:"/meraki/",version_group:null}},html:document.querySelector("pubhub-content").innerHTML})}),!1)</script></body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10