6 years ago
Access Raw Data via API
Hey
I'm wanting to access the ping data of a device. I've not found an example in the v1 API document that shows how to do this. I've tried the below but haven't found what I expect, i.e. a long list of ping + time + result.
$resourcePath = '/device/devices/465103/devicedatasources/376/data'
$epochseconds = Get-Date (Get-Date).ToUniversalTime() -UFormat %s
$fields = '?start=' + $epochseconds
$url = 'https://' + $company + '.logicmonitor.com/santaba/rest' + $resourcePath + $fields
Thanks
@gwengrafana the resource path should be: $resourcePath = '/device/devices/465103/devicedatasources/8252658/data to get data for all instances of the Ping DataSource. The Ping deviceDataSourceId in this case is the 8252658.