### Running the CMX API server with secret and validator Source: https://github.com/meraki/cmx-api-app/blob/master/README.md This command starts the sample location server, passing the secret and validator obtained from the Meraki dashboard as command-line arguments. These are required for the server to authenticate and process CMX data. ```bash sample_location_server.rb ``` -------------------------------- ### Sample GET request log message Source: https://github.com/meraki/cmx-api-app/blob/master/README.md This is a sample log message showing a GET request to the /events endpoint. This is the validation request that Meraki sends to verify the server is working. ```text [26/Mar/2014 11:52:09] "GET /events HTTP/1.1" 200 6 0.0024 ``` -------------------------------- ### Running the CMX API server with custom interface and port Source: https://github.com/meraki/cmx-api-app/blob/master/README.md This command starts the sample location server, specifying a custom bind interface and port using Sinatra's -o and -p option flags. This allows the server to listen on a specific network interface and port, which is useful for configuring firewalls or reverse proxies. ```bash sample_location_server.rb -o -p ``` -------------------------------- ### Meraki CMX API Client Details Source: https://github.com/meraki/cmx-api-app/blob/master/README.md This JSON snippet shows the format of data returned when querying for a specific client device's details using the Meraki CMX API. It includes the client's ID, MAC address, last seen time, latitude, and longitude. The endpoint `http://pushapi.myserver.com:4567/clients/34:23:ba:a6:75:70` is used as an example. ```JSON { "id":65, "mac":"34:23:ba:a6:75:70", "seenAt":"Fri Apr 18 00:01:41.479 UTC 2014", "lat":37.77059042088197,"lng":-122.38703445525945 } ``` -------------------------------- ### Sample log message from CMX API Source: https://github.com/meraki/cmx-api-app/blob/master/README.md This is a sample log message showing the format of the data received from the Meraki CMX API when a client probes an access point. It includes information such as the access point MAC address, location, client MAC address, and signal strength. ```text [2014-03-26T11:51:57.920806 #25266] INFO -- : AP 11:22:33:44:55:66 on ["5th Floor"]: {"ipv4"=>"123.45.67.89", "location"=>{"lat"=>37.77050089978862, "lng"=>-122.38686903158863,"unc"=>11.39537928078731}, "seenTime"=>"2014-05-15T15:48:14Z", "ssid"=>"Cisco WiFi","os"=>"Linux", "clientMac"=>"aa:bb:cc:dd:ee:ff","seenEpoch"=>1400168894, "rssi"=>16, "ipv6"=>nil, "manufacturer"=>"Meraki"} ``` -------------------------------- ### Testing server connectivity with telnet Source: https://github.com/meraki/cmx-api-app/blob/master/README.md This command uses telnet to test the connectivity to the server on port 4567. This is useful for verifying that the server is listening on the expected port and that there are no firewall rules blocking connections. ```bash telnet pushapi.myserver.com 4567 ``` -------------------------------- ### Meraki CMX API Observation Data Source: https://github.com/meraki/cmx-api-app/blob/master/README.md This JSON snippet represents the format of data sent by Meraki servers, including access point MAC address, observed client details (MAC, probe time, RSSI, SSID, manufacturer, OS), and location information (latitude, longitude, uncertainty). It shows the structure of the data received when a client device is observed by the Meraki network. ```JSON { "apMac":"00:18:0a:79:08:60", "apFloors":["500 TF 4th"], "observations":[{ "clientMac":"00:11:22:33:44:55:66", "probeEpoch":1388577600, "probeTime":"2014-01-01T12:00:00Z", "rssi":23, "ssid":"SSID 1", "manufacturer":"Meraki", "os":"Linux", "location":{ "lat":37.77057805947924, "lng":-122.38765965945927, "unc":15.13174349529074 } }] } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.