LogicMonitor API Datasource shows No Instances but Returns Data
I seem to be having a weird issue with the LogicMonitor API and I'm not quite sure why this would be happening. My goal is to go through all servers and get the CPU Usage for each one, and I'm at the stage where I have all of the deviceIDs, and all I have to do is choose the right datasourceID for the metric matching CPU Usage.
What's strange is that in my request to get datasource information, I noticed that some of the datasources have the instanceNumber field being 0. I figured I wouldn't be able to get any data from these datasources so I partitioned the datasources for each server into two groups: datasources with an instanceNumber > 0, and datasources with the instanceNumber being 0.
The problem with this is the metric (CPU Usage) appears to have zero instances for one of the servers I need to grab data from despite that exact same datasource showing in the browser view of LogicMonitor. I tried requesting data from it with "/device/devices/{deviceID}/devicedatasources/{datasourceID}/data" and it returned the data I was expecting, but this isn't consistent behavior, and sometimes the API won't give any data for the same API request.
Am I supposed to be able to get data from datasources that have no instances? Is there a way to get CPU Usage reliably through the API? Is there something that would need to be configured within the LogicMonitor instance to help me with my issue (I have no admin permissions and only have read access through the API and browser so I have no clue about admin settings)?
Thanks