《Meraki 201 - 程序化访问:利用智能加速.pdf》由会员分享,可在线阅读,更多相关《Meraki 201 - 程序化访问:利用智能加速.pdf(59页珍藏版)》请在三个皮匠报告上搜索。
1、#CiscoLive#CiscoLiveJon Hartman,Meraki TSA,CCIE 34941techdojoDEVNET-2174Accelerate with IntelligenceMeraki 201:Programmatic Access 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveEnter your personal notes hereCisco Webex App 3Questions?Use Cisco Webex App to chat with the
2、speaker after the sessionFind this session in the Cisco Live Mobile AppClick“Join the Discussion”Install the Webex App or go directly to the Webex spaceEnter messages/questions in the Webex spaceHowWebex spaces will be moderated by the speaker until June 9,2023.12343https:/ 2023 Cisco and/or its aff
3、iliates.All rights reserved.Cisco PublicDEVNET-2174#CiscoLive 2023 Cisco and/or its affiliates.All rights reserved.Cisco PublicAgendaIntroductionAPI/WebhooksNetwork as a SensorMVConclusionDEVNET-21744 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveIn the beginning5DEVNET-
4、2174 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveIn the beginning6DEVNET-2174 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveIn the beginning7DEVNET-2174 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveIn the begin
5、ning8DEVNET-2174 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveIn the beginning9DEVNET-2174MXMSMR 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveIn the beginning10DEVNET-2174MXMSMRMVMTMG 2023 Cisco and/or its affiliates.All rights reserved.Cis
6、co Public#CiscoLiveIn the beginning11DEVNET-2174MXMSMRMVMTMGCatchCatchMFetchFetchM 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveIn the beginning13DEVNET-2174MXMSMRMVMTMGCatchCatchFetchFetch$BSS/BSS/OSSOSSAPI&Webhooks 2023 Cisco and/or its affiliates.All rights reserved.
7、Cisco Public#CiscoLiveAPI&Webhooks15DEVNET-2174CreateCreateReadReadUpdateUpdateDeleteDeleteM 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveAPI&Webhooks16DEVNET-2174POSTPOSTGETGETPUTPUTDELETEDELETEM 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLi
8、veAPI&Webhooks17DEVNET-2174MPOSTPOST 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveAPI:Key18DEVNET-2174Privileged as userTreat as a credential(sensitivity,rotation)System ID(no SAML access)2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveAPI:Rat
9、e-limit19DEVNET-2174Megaproxy100 requests per second per IP addressviolation=429Shard10 requests per second per organizationviolation=429,retry-afterOptimize with“action batches”SPEEDLIMIT100 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveAPI:Pagination20DEVNET-2174x1,000
10、 x1,000 x3x3“serial”:“Q2CL-OUDM-ANAG”,”model”:“mr57”,“serial”:“Q2EM-ENTI-STHE”,”model”:“mr57”,“serial”:“Q2FU-TURE-OFAL”,”model”:“mr57”,“serial”:“Q2NE-NETW-ORKS”,”model”:“mr57”Request 1Request 1“serial”:“Q2GE-TONB-OARD”,”model”:“mr57”,“serial”:“Q2SO-YOUA-RENT”,”model”:“mr57”,“serial”:“Q2LE-FTBE-HIND”
11、,”model”:“mr57”Request 2Request 2 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveAPI:Pagination21DEVNET-2174x1,000 x1,000 x3x3/inventoryRequest 1Request 1/inventory?startingAfter=Q2NE-NETW-ORKSRequest 2Request 2 2023 Cisco and/or its affiliates.All rights reserved.Cisco P
12、ublic#CiscoLiveAPI:SDK22DEVNET-2174response=dashboard.organizations.getOrganizations()With SDKurl=https:/ SDK 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveAPI:Developer Portal23DEVNET-2174meraki.io 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoL
13、iveWebhooks24DEVNET-2174MPOSTPOST 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveWebhooks25DEVNET-2174MPOSTPOSTUnsolicitedEvent-driven/real-timeEncrypted(should be)Authenticated(should be)Reliably-transported(TCP)Lightweight protocolVerboseMachine-friendly formatting 2023
14、 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveWebhooks26DEVNET-2174sharedSecret:secret,sentAt:2021-10-07T08:42:00.923716Z,organizationId:2930418,networkId:N_24329156,deviceSerial:Q234-ABCD-5678,alertType:Unreachable devices detected,alertTypeId:firewall_test_failed,occurredA
15、t:2018-02-11T00:00:00.123450Z,alertData:failingNodes:”3rd Floor,AP#14 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveWebhooks27DEVNET-2174Meraki Dashboard 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveWebhooks:Best practices28DEVNET-2174Use HT
16、TPSTrack SSL/TLS certificate expirationTroubleshoot via triangulationSeparate storing from processingCorrelate webhooks event with API endpointsNetwork as a Sensor 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveMQTTMQTTNetwork as a Sensor:MQTT30DEVNET-2174MInternet 2023 C
17、isco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveNetwork as a Sensor:MQTT31DEVNET-2174SubscribersSubscribersBrokerBrokerPublishersPublishers/merakimr/#/mv/cam23/light 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveNetwork as a Sensor:MQTT32DEVNET-2174/
18、merakimr mrMac:”5C:AL:EA:Bl:E0:00,clientType:associated,clientMac:”BA:5E:BA:11:00:00,timestamp:2021-10-19 20:06:35.696,networkId:N_6282524,rssi:-51,radio:wifi/merakimr bleType:unknown,mrMac:”0D:DB:A1:10:00:00,clientMac:”DE:AD:BE:EF:CA:FE,timestamp:2021-10-19 20:06:36.244,networkId:N_62825
19、24,rawPayload:1bff750042040180666407f652410000,rssi:-90,radio:ble 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveNetwork as a Sensor:MQTT33DEVNET-2174 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveNetwork as a Sensor:MQTT34DEVNET-21
20、74 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveNetwork as a Sensor:Loss&Latency35DEVNET-2174RTR:Response Time ReporterSAA:Service Assurance AgentIP SLA:IP Service Level Agreements 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveNetwork as a S
21、ensor:Loss&Latency36DEVNET-2174 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveNetwork as a Sensor:Loss&Latency37DEVNET-2174 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveDEVNET-217438Network as a Sensor:Loss&LatencynetworkId:L_628252148018187
22、961,serial:Q2MY-GNZL-6CXM,uplink:wan1,ip:1.1.1.1,timeSeries:ts:2023-01-07T16:54:37Z,lossPercent:0,latencyMs:8.4,.ts:2023-01-07T16:58:36Z,lossPercent:0,latencyMs:8.4Get Organization DevicesUplinks Loss And LatencyMeraki Vision 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiv
23、eMeraki Vision40DEVNET-2174 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveMeraki Vision41DEVNET-2174 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveMeraki Vision:API42DEVNET-2174generateDeviceCameraSnapshot/devices/serial/camera/generateSnapsh
24、ottimestamp:2021-04-30T15:18:08Z,fullframe:falseBodyurl:https:/ to the image will expire at 2023-02-11T03:12:39Z.Response 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveMeraki Vision:Webhooks43DEVNET-2174sentAt:2023-01-11T02:18:16.316788Z,organizationId:410499,networkId:L
25、_6282521,deviceSerial:Q2NV-4CTA-CHQX,deviceName:MV-Stairs,deviceModel:MV2,alertId:6282525,alertType:Motion detected,alertTypeId:motion_alert,occurredAt:2023-01-11T02:15:42.428999Z,alertData:timestamp:1673403342.429,imageUrl:”https:/2023 Cisco and/or its affiliates.All rights re
26、served.Cisco Public#CiscoLiveMeraki Vision:RTSP44DEVNET-2174 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveMeraki Vision:MV Sense45DEVNET-2174 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveMeraki Vision:MV Sense46DEVNET-2174 2023 Cisco and/or
27、 its affiliates.All rights reserved.Cisco Public#CiscoLiveMeraki Vision:MV Sense47DEVNET-2174/merakimv/Q2EV-R6FG-BCSV/raw_detections objects:confidence:97,frame:276907,oid:186,type:person,x0:0.938,x1:0.856,y0:0.642,y1:0.256,ts:73/merakimv/Q2EV-R6FG-BCSV/0 ts:20,counts:person:0R
28、aw Detections 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveMeraki Vision:MQTT48DEVNET-2174 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveMeraki Vision:MV Sense49DEVNET-2174/merakimv/Q2HV-24HB-TMZ9/audio_detections confidence:0.99293702840805
29、054,id:9,name:siren,ts:65Audio Detections 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveMeraki Vision:MV Sense50DEVNET-2174/merakimv/Q2HV-24HB-TMZ9/audio_analytics audioLevel:-47,ts:01Audio Analytics/merakimv/Q2HV-24HB-TMZ9/light lux:30.8Light 2023
30、Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveMeraki Vision51DEVNET-2174Fetch screen capture via APIReceive motion alert via webhooksVideo stream for 3rdparty processingAcquire sensor data via MQTTReal-time or historical object countsMV SenseMV Sense 2023 Cisco and/or its aff
31、iliates.All rights reserved.Cisco Public#CiscoLiveMT:Meraki Things(IoT sensors)52DEVNET-2174MT10 Temp(Ambient)&HumidityMT11 Temp(Probe)MT12 Water LeakMT14 Air QualityMT20 Door Open/CloseMT30 Smart ButtonMT40 Power ControllerMQTTMQTTWebhooksWebhooksAPIAPIFinal Thoughts 2023 Cisco and/or its affiliate
32、s.All rights reserved.Cisco Public#CiscoLiveFinal thoughtsGet a proper IDE and learn how to use it(PyCharm,VS Code,etc)Maintain proper API key hygiene(rotation,sensitivity,exclusion from code)Choose the optimal way to acquire data(frequency,contention,source)Consider execution method(cron job,sleep
33、timer,listener)DEVNET-217454 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveRelated Sessions55DEVNET-2174DEVNET-2174 Meraki 201-Programmatic AccessDEVNET-2177Meraki 202-Programmatic ActionBRKIOT-1223Integrating Meraki IoT Devices Through Open ProtocolsLABDEV-1100Deploymen
34、t of Cisco Meraki Networks Using APILABMER-2405Meraki API and Python 2023 Cisco and/or its affiliates.All rights reserved.Cisco Public#CiscoLiveFill out your session surveys!Attendees who fill out a minimum of four session surveys and the overall event survey will get Cisco Live-branded socks(while
35、supplies last)!56DEVNET-2174These points help you get on the leaderboard and increase your chances of winning daily and grand prizesAttendees will also earn 100 points in theCisco Live Challenge for every survey completed.2023 Cisco and/or its affiliates.All rights reserved.Cisco PublicContinue your
36、 educationVisit the Cisco Showcase for related demosBook your one-on-oneMeet the Engineer meetingAttend the interactive education with DevNet,Capture the Flag,and Walk-in LabsVisit the On-Demand Library for more sessions at www.CiscoL you#CiscoLive 2023 Cisco and/or its affiliates.All rights reserve
37、d.Cisco Public#CiscoLive59Gamify your Cisco Live experience!Get points Get points for attending this session!for attending this session!Open the Cisco Events App.Click on Cisco Live Challenge in the side menu.Click on View Your Badges at the top.Click the+at the bottom of the screen and scan the QR code:How:123459 2023 Cisco and/or its affiliates.All rights reserved.Cisco PublicDEVNET-2174#CiscoLive