Getting my feet wet with the Meraki API (first time calling APIs and REST methods, actually). Using Powershell interactively at the moment to experiment, nothing programmatic. S/N and ids obfuscated.
I executed the below. it returned an object with the pingId.
Invoke-RestMethod -Method Post -Uri "$BaseURI/devices/ABCD-0123-EFGH/liveTools/ping" -Headers @{ $AuthHeader = $APIKey } -Body @{ target = "1.1.1.1"; count = 5 }
Then I waited a bit, and ran the below.
Invoke-RestMethod -Uri "$BaseURI/devices/ABCD-0123-EFGH/liveTools/ping/0123456789" -Headers @{ $AuthHeader = $APIKey }
The above returned my ping and all the statistics, great! I re-ran the command to store the result in a variable and that worked right away. That got me wondering....how long are these objects stored?
I checked the device in the dashboard and nothing graphical shows up in the tools tab so it's not like I can purge it there. The documentation doesn't say how long they last for or indicates any way to remove them. Not really a big deal for a ping, but might be for say, a reboot or firmware upgrade command (not that I've gotten that far in my journey yet).