A user asked about EdgeDX API, looking for a best Index to use and if an API request should be sent for each device. It was suggested to use the (hidden) _devices index and take inspiration from the Edge UI, which can be accessed by pressing F12. Lastly, using the Get-EdgeDXIndexData with a maxrecord of 10000 was suggested which would retrieve all the records.
Read the entire ‘Getting the Most from EdgeDX API’ thread below:
Question about the EdgeDX API:
I’m busy with creating a device cross reference script between AD (Source) MECM EdgeDX to see which devices we are missing in each tool.
What Index would be the best to use to know if a device is present in EdgeDX AND what the ‘Last Communication’ value is.
You probably want the device_status index.
Fabian! Thats been a while!
And agree with Landon. The Last Communication value is not actually there, but you can see when the records were created, which will achieve the same.
The index is updated once per minute so the last communication should be the latest event in the index.
I guess you just said that, just a little different. lol@member Really a loooong time ago 🙂
Just looked it up, 15 years… And now @member is going to come in and say Please stay on topic and keep chat in #chitchat 😁
I have like 6000 devices to check, should i send an API request for each device? If the device exists i get like 1500 records back from device_status for 1 device
don’t use device_status. Use the (hidden) _devices index.
“`$tenant = "https://acmeorg.sip.controlup.com"
$URL = $tenant + "/api/data/_devices"
$devices = Invoke-RestMethod -Method Get -Uri $URL -WebSession $session“`
Doh, forgot about the hidden indexes. @member you The Man!
Well that makes it much simpler!
Looks like it! Going to try! let you guys know!
Thanks for the advise so far!
When in doubt, steal what the Edge UI does.
I mean.. take inspiration from
F12 is your friend…
THAT was exactly what i was looking for! Thank you @member
I will fetch all EdgeDX devices and compare them locally, perfect!
Remember it is still limited to 5000 resutls (per page?) so you may need to do some paging depending on how many devices you have
With the Get-EdgeDXIndexData -maxrecord 10000 i get them all
don’t use the ps module to extract data, the pagination is broken you will just get the same data twice
more exact: don’t use it at all
Continue reading and comment on the thread ‘How to Determine Device Presence and Last Communication Value in ControlUp Edge DX’. Not a member? Join Here!
Categories: All Archives, ControlUp Edge DX, ControlUp Scripts & Triggers