We have several api endpoints (scalardata , rawdata, and archivefile) that support both byLocation and byDevice. The required format of the params are different.
byLocation: locationCode + deviceCategoryCode
byDevice: deviceCode
Whether byLocation or byDevice is intended can be inferred from the the given params. Just like how the getSensorCategoryCodes is implemented.
def getSensorCategoryCodes(self, filters: dict):
filters["returnOptions"] = "excludeScalarData"
if "deviceCode" in filters:
return self.getDirectByDevice(filters, False)["sensorData"]
else:
return self.getDirectByLocation(filters, False)["sensorData"]
We have several api endpoints (scalardata , rawdata, and archivefile) that support both byLocation and byDevice. The required format of the params are different.
Whether byLocation or byDevice is intended can be inferred from the the given params. Just like how the getSensorCategoryCodes is implemented.