Smart Farm Queries
The Following are the list of queries available on the Smart Farm project for both cloud and Gateway.
Cloud:
InstallCloud query: This query must run on cloud for the first time and starts up the subscriptions and initializes meta data and other required information on the cloud, this query will delete all previous data present on cloud and must be used cautiously.
Method POST Query <InstallCloud/> Response <ExecuteStatus eid="SetTimeInterval" Status="Success"/>
CloudSubscription query:Â This query must run every time the cloud is restarted and starts up the required subscriptions on the cloud.
Method POST Query <Query>
<CreateSystemConfigCloud/>
<SubscribeToZoneAggInfoForRegionCreate/>
<SubscribeToSensorForRegionAggInfo/>
<SubscribeToZoneAggInfoOnCreate/>
<SubscribeToZoneAggInfoOnUpdate/>
<RemoveStaleDataCloud>
<Timeout>
60
</Timeout>
</RemoveStaleDataCloud>
<RemoveStaleRegionDataCloud/>
</Query>Response <ExecuteStatus eid="RemoveStaleRegionDataCloud" Status="Success"/>
FindRegions query : This query will give all the regions present on the cloud.
Method POST Query <Query>
  <Find format="Version,Known">
    <Region>
      <RegionID ne="" />
     </Region>
  </Find>
</Query>Response <Find Status="Success" Format="version,known"> <Result> <Region> <RegionID>LUZ2KPRPAAAH6AAAAHTQEJAW</RegionID> <RegionEnvData> <Pressure> <MaxValue Value="1000.0" Known="1000.0" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <Units Value="hPa" Known="hPa" Version="1"/> <CurrentValue Value="" Known="" Version="2170"/> </Pressure> <Humidity> <MaxValue Value="90.0" Known="90.0" Version="1"/> <CurrentValue Value="" Known="" Version="2170"/> <Units Value="%" Known="%" Version="1"/> <MinValue Value="65.0" Known="65.0" Version="1"/> </Humidity> <rainfall> <MaxValue Value="2000.0" Known="2000.0" Version="1"/> <Units Value="mm/h" Known="mm/h" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <CurrentValue Value="" Known="" Version="2170"/> </rainfall> <wind_speed> <CurrentValue Value="" Known="" Version="2170"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <MaxValue Value="10.0" Known="10.0" Version="1"/> <Units Value="m/s" Known="m/s" Version="1"/> </wind_speed> <Light> <MaxValue Value="0.0" Known="0.0" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <CurrentValue Value="" Known="" Version="2170"/> <Units Value="" Known="" Version="2170"/> </Light> <Temperature> <MinValue Value="10.0" Known="10.0" Version="1"/> <MaxValue Value="40.0" Known="40.0" Version="1"/> <CurrentValue Value="" Known="" Version="2170"/> <Units Value="°C" Known="°C" Version="1"/> </Temperature> <sealevel_pressure> <CurrentValue Value="" Known="" Version="2170"/> <MaxValue Value="1000.0" Known="1000.0" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <Units Value="hPa" Known="hPa" Version="1"/> </sealevel_pressure> <uv> <MaxValue Value="4.0" Known="4.0" Version="1"/> <Units Value="" Known="" Version="2170"/> <CurrentValue Value="" Known="" Version="2170"/> <MinValue Value="0.0" Known="0.0" Version="1"/> </uv> <wind_angle> <MaxValue Value="360.0" Known="360.0" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <CurrentValue Value="" Known="" Version="2170"/> <Units Value="°" Known="°" Version="1"/> </wind_angle> <local_time Value="" Known="" Version="2170"/> <wind_direction Value="" Known="" Version="2169"/> </RegionEnvData> <Area> <LowerRight> <latitude Value="37.80191751" Known="37.80191751" Version="4276"/> <longitude Value="-122.45738983" Known="-122.45738983" Version="4276"/> </LowerRight> <UpperLeft> <longitude Value="-122.46642351" Known="-122.46642351" Version="4276"/> <latitude Value="37.80470646" Known="37.80470646" Version="4276"/> </UpperLeft> </Area> <Manager> <Name Value="Tom" Known="Tom" Version="1"/> </Manager> <MidPoint> <latitude Value="37.80331207" Known="37.80331207" Version="4276"/> <longitude Value="-122.46190658" Known="-122.46190658" Version="4276"/> </MidPoint> <Owner> <Name Value="Jerry" Known="Jerry" Version="1"/> </Owner> <Description Value="Region of North India" Known="Region of North India" Version="1"/> <Name Value="Region-T1" Known="Region-T1" Version="1"/> </Region> </Result> <Result> <Region> <RegionID>LVL2ZF6PAAAH6AAAAH2PSTTM</RegionID> <RegionEnvData> <Pressure> <MaxValue Value="1000.0" Known="1000.0" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <Units Value="hPa" Known="hPa" Version="1"/> <CurrentValue Value="" Known="" Version="17"/> </Pressure> <Humidity> <MaxValue Value="90.0" Known="90.0" Version="1"/> <CurrentValue Value="" Known="" Version="17"/> <Units Value="%" Known="%" Version="1"/> <MinValue Value="65.0" Known="65.0" Version="1"/> </Humidity> <rainfall> <MaxValue Value="2000.0" Known="2000.0" Version="1"/> <Units Value="mm/h" Known="mm/h" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <CurrentValue Value="" Known="" Version="17"/> </rainfall> <wind_speed> <CurrentValue Value="" Known="" Version="17"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <MaxValue Value="10.0" Known="10.0" Version="1"/> <Units Value="m/s" Known="m/s" Version="1"/> </wind_speed> <Light> <MaxValue Value="0.0" Known="0.0" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <CurrentValue Value="" Known="" Version="17"/> <Units Value="" Known="" Version="17"/> </Light> <Temperature> <MinValue Value="10.0" Known="10.0" Version="1"/> <MaxValue Value="40.0" Known="40.0" Version="1"/> <CurrentValue Value="" Known="" Version="17"/> <Units Value="°C" Known="°C" Version="1"/> </Temperature> <sealevel_pressure> <CurrentValue Value="" Known="" Version="17"/> <MaxValue Value="1000.0" Known="1000.0" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <Units Value="hPa" Known="hPa" Version="1"/> </sealevel_pressure> <uv> <MaxValue Value="4.0" Known="4.0" Version="1"/> <Units Value="" Known="" Version="17"/> <CurrentValue Value="" Known="" Version="17"/> <MinValue Value="0.0" Known="0.0" Version="1"/> </uv> <wind_angle> <MaxValue Value="360.0" Known="360.0" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <CurrentValue Value="" Known="" Version="17"/> <Units Value="°" Known="°" Version="1"/> </wind_angle> <local_time Value="" Known="" Version="17"/> <wind_direction Value="" Known="" Version="17"/> </RegionEnvData> <Area> <LowerRight> <latitude Value="37.62510898" Known="37.62510898" Version="34"/> <longitude Value="-105.73516846" Known="-105.73516846" Version="34"/> </LowerRight> <UpperLeft> <longitude Value="-122.45704651" Known="-122.45704651" Version="34"/> <latitude Value="38.01780398" Known="38.01780398" Version="34"/> </UpperLeft> </Area> <Manager> <Name Value="Nam" Known="Nam" Version="1"/> </Manager> <MidPoint> <latitude Value="38.11839037" Known="38.11839037" Version="32"/> <longitude Value="-114.07370606" Known="-114.07370606" Version="34"/> </MidPoint> <Owner> <Name Value="Nam" Known="Nam" Version="1"/> </Owner> <Description Value="sample Description" Known="sample Description" Version="1"/> <Name Value="Region-T2" Known="Region-T2" Version="1"/> </Region> </Result> </Find>
FindZones query : This query will give all the zones present on the cloud.
Method POST Query <Query>
  <Find format="Version,Known">
    <Zone>
      <ZoneID ne="" />
    </Zone>
  </Find>
</Query>Response <Find Status="Success" Format="version,known"> <Result> <Zone> <ZoneID>LQ35K4C3AAAIWOYNETENPEJH</ZoneID> <Name Value="SampleZone2" Known="SampleZone2" Version="1"/> <Size Value="31327.7988281250" Known="31327.7988281250" Version="2"/> <Width Value="6.0000000000" Known="6.0000000000" Version="2"/> <RegionID Value="Region-T1" Known="Region-T1" Version="1"/> <Label Value="SampleZone2" Known="SampleZone2" Version="1"/> <CropID Value="LR66SBGYAAAIWOYNETK35S44" Known="LR66SBGYAAAIWOYNETK35S44" Version="2"/> <Height Value="5.0000000000" Known="5.0000000000" Version="2"/> </Zone> </Result> <Result> <Zone> <ZoneID>LQ35KYRFAAAIWOYNES3I5L7Q</ZoneID> <Name Value="SampleZone" Known="SampleZone" Version="1"/> <Size Value="44690.3515625000" Known="44690.3515625000" Version="7496"/> <Width Value="6.0000000000" Known="6.0000000000" Version="7496"/> <RegionID Value="Region-T1" Known="Region-T1" Version="1"/> <Label Value="SampleZone" Known="SampleZone" Version="1"/> <CropID Value="Crop-1" Known="Crop-1" Version="1"/> <Height Value="5.0000000000" Known="5.0000000000" Version="7497"/> </Zone> </Result> </Find>
FindSensorHubs query : This query will give all the sensor hubs present on the cloud.
Method POST Query <Query>
  <Find format="Version,Known">
    <MCUModel>
      <ID ne="" />
    </MCUModel>
  </Find>
</Query>Response <Find Status="Success" Format="version,known"> <Result> <MCUModel> <ID>LQ3545VMAAAIWOYNET3WAAFU</ID> <Label Value="SampleHub" Known="SampleHub" Version="10"/> <LastUpdated Value="" Known="" Version="1762"/> <Status Value="" Known="" Version="1762"/> <HasMetadata Value="true" Known="true" Version="1"/> <Location> <longitude Value="-122.46199799" Known="-122.46224976" Version="23"/> <latitude Value="37.80384827" Known="37.80360794" Version="22"/> </Location> <ZoneName Value="" Known="SampleZone" Version="2"/> <Name Value="fc:db:b3:a4:1e:99" Known="fc:db:b3:a4:1e:99" Version="1"/> <NextUpdate Value="" Known="" Version="1762"/> </MCUModel> </Result> <Result> <MCUModel> <ID>LQ35K5QRAAAIWOYNEQVHCWEC</ID> <Label Value="00:80:00:00:00:00:ae:b0" Known="00:80:00:00:00:00:ae:b0" Version="1"/> <LastUpdated Value="" Known="" Version="31"/> <Status Value="" Known="" Version="31"/> <HasMetadata Value="true" Known="true" Version="1"/> <Location> <longitude Value="-111.84817505" Known="-111.84817505" Version="1"/> <latitude Value="34.56308365" Known="34.56308365" Version="1"/> </Location> <ZoneName Value="" Known="UnassignedZone" Version="2"/> <Name Value="00:80:00:00:00:00:ae:b0" Known="00:80:00:00:00:00:ae:b0" Version="1"/> <NextUpdate Value="" Known="" Version="31"/> </MCUModel> </Result> <Result> <MCUModel> <ID>LQ35LATRAAAIWOYNERIGEN4O</ID> <Label Value="00:80:00:00:00:00:ae:aa" Known="00:80:00:00:00:00:ae:aa" Version="1"/> <LastUpdated Value="" Known="" Version="7"/> <Status Value="" Known="" Version="7"/> <HasMetadata Value="true" Known="true" Version="1"/> <Location> <longitude Value="" Known="" Version="1"/> <latitude Value="" Known="" Version="1"/> </Location> <ZoneName Value="" Known="UnassignedZone" Version="2"/> <Name Value="00:80:00:00:00:00:ae:aa" Known="00:80:00:00:00:00:ae:aa" Version="1"/> <NextUpdate Value="" Known="" Version="7"/> </MCUModel> </Result> </Find>
FindZonesAggregateInfo query : This query will give all the calibrated and aggregated sensor values of different zones present on the cloud.
Method POST Query <Query>
  <Find>
    <ZoneAggregateInfo>
      <ID ne="" />
    </ZoneAggregateInfo>
  </Find>
</Query>Response <Find Status="Success"> <Result> <ZoneAggregateInfo> <ID>LQ3575ZSAAAIWOYNESCZVFVZ</ID> <Time>2017-07-18T23:46:01Z</Time> <ZoneName>SampleZone</ZoneName> <Unit>kPa</Unit> <IsActive>true</IsActive> <MaxValue>300.0000000000</MaxValue> <NAvgValue>264.8313813977</NAvgValue> <MinValue>0E-10</MinValue> <CurrentValue>2537.0000000000</CurrentValue> <SensorName>SoilMoisture1</SensorName> <AvgValue>2541.8847656250</AvgValue> <Count>8665</Count> </ZoneAggregateInfo> </Result> <Result> <ZoneAggregateInfo> <ID>LQ36BZLVAAAIWOYNESE4DBA4</ID> <Time>2017-07-18T23:46:06Z</Time> <ZoneName>SampleZone</ZoneName> <Unit>kPa</Unit> <IsActive>true</IsActive> <MaxValue>300.0000000000</MaxValue> <NAvgValue>69.7872703604</NAvgValue> <MinValue>0E-10</MinValue> <CurrentValue>670.0000000000</CurrentValue> <SensorName>SoilMoisture2</SensorName> <AvgValue>669.8269653320</AvgValue> <Count>8665</Count> </ZoneAggregateInfo> </Result> <Result> <ZoneAggregateInfo> <ID>LUPR36FYAAAIWOYNESCHQKT2</ID> <Time>2017-07-11T17:59:04Z</Time> <ZoneName>SampleZone</ZoneName> <Unit>C</Unit> <IsActive>false</IsActive> <MaxValue>300.0000000000</MaxValue> <NAvgValue>387.5713806152</NAvgValue> <MinValue>0E-10</MinValue> <CurrentValue>215.0000000000</CurrentValue> <SensorName>AirTemperature3</SensorName> <AvgValue>387.5713806152</AvgValue> <Count>2859</Count> </ZoneAggregateInfo> </Result> </Find>
FindZonesAggregateInfoHistory query : This query will give all the calibrated and aggregated sensor values history of different zones present on the cloud. You can use a date filter to get data between the required dates.
Method POST Query <Query>
  <Find>
    <ZoneAggInfoHistoryModel>
      <ID ne=""/>
      <RecordDate gt="2017-07-17T00:00:00Z" />
      <RecordDate lt="2017-07-17T00:02:00Z" />
      </ZoneAggInfoHistoryModel>
   </Find>
</Query>Response <Find Status="Success"> <Result> <ZoneAggInfoHistoryModel> <ID>LVG5QTB2AAAIWOYNERTLUKCV</ID> <IsActive>true</IsActive> <ZoneName>SampleZone</ZoneName> <Unit>kPa</Unit> <RecordDate>2017-07-17T00:00:07Z</RecordDate> <MaxValue>300.0000000000</MaxValue> <NAvgValue>264.8295288086</NAvgValue> <SensorName>SoilMoisture1</SensorName> <AvgValue>2541.8669433594</AvgValue> <MinValue>0E-10</MinValue> </ZoneAggInfoHistoryModel> </Result> <Result> <ZoneAggInfoHistoryModel> <ID>LVG5QWWEAAAIWOYNERFRPQVA</ID> <IsActive>true</IsActive> <ZoneName>SampleZone</ZoneName> <Unit>kPa</Unit> <RecordDate>2017-07-17T00:00:10Z</RecordDate> <MaxValue>300.0000000000</MaxValue> <NAvgValue>69.9280319214</NAvgValue> <SensorName>SoilMoisture2</SensorName> <AvgValue>671.1779785156</AvgValue> <MinValue>0E-10</MinValue> </ZoneAggInfoHistoryModel> </Result> <Result> <ZoneAggInfoHistoryModel> <ID>LVG5SKGEAAAIWOYNEQ2WXW4D</ID> <IsActive>true</IsActive> <ZoneName>SampleZone</ZoneName> <Unit>kPa</Unit> <RecordDate>2017-07-17T00:01:03Z</RecordDate> <MaxValue>300.0000000000</MaxValue> <NAvgValue>264.8295593262</NAvgValue> <SensorName>SoilMoisture1</SensorName> <AvgValue>2541.8674316406</AvgValue> <MinValue>0E-10</MinValue> </ZoneAggInfoHistoryModel> </Result> <Result> <ZoneAggInfoHistoryModel> <ID>LVG5SMRPAAAIWOYNERRVFBN4</ID> <IsActive>true</IsActive> <ZoneName>SampleZone</ZoneName> <Unit>kPa</Unit> <RecordDate>2017-07-17T00:01:06Z</RecordDate> <MaxValue>300.0000000000</MaxValue> <NAvgValue>69.9274444580</NAvgValue> <SensorName>SoilMoisture2</SensorName> <AvgValue>671.1724243164</AvgValue> <MinValue>0E-10</MinValue> </ZoneAggInfoHistoryModel> </Result> </Find>
Gateway:
InstallGateway query: This query must run on gateway for the first time and starts up the subscriptions and initializes meta data and other required information on the gateway, this query will delete all previous data present on gateway and must be used cautiously, you need to provide the right Cloud details in this query
Method POST Query <InstallZone>
<CLOUD_URL>
    http://localhost:8080
</CLOUD_URL>
</InstallZone>Response <ExecuteStatus eid="PurgeSensorHistory" Status="Success"/>
GatewaySubscription query:Â This query must run every time the cloud is restarted and starts up the required subscriptions on the gateway.
Method POST Query <Query>
<subscribeMcuGridChange />
<SubscribeToSensor />
<subscribeMcuZoneChange/>
<!-- <SubscribeToSensorOnCreate /> -->
<SubscribeToSensorForZoneAggInfo />
<SubscribeForAirTemperature/>
<SubscribeUpdatePolygon/>
<PurgeSensorHistory/>
<SubscribeToZoneAggOnCreate/>
<SubscribeToZoneAggOnUpdate/>
</Query>Response <SubscribeStatus sid="SmartFarm-TQLGenericTopicZoneAggUpdate" Topic="TQL.Update.gateway.agriculture.ZoneAggregate.*" Status="Updated"/>
ReplicateToCloud query:Â This query must run every time thegateway is restarted, it starts scheduled jobs to periodically send data to cloud.
Method POST Query <ReplicateToCloud>
<Frequency>
1min
</Frequency>
</ReplicateToCloud>Response <ExecuteStatus eid="CheckCloudStatus" Status="Success"/>
FindRegions query : This query will give all the regions present on the Gateway.
Method POST Query <Query>
  <Find format="Version,Known">
    <Region>
      <RegionID ne="" />
     </Region>
  </Find>
</Query>Response <Find Status="Success" Format="version,known"> <Result> <Region> <RegionID>LUZ2KPRPAAAH6AAAAHTQEJAW</RegionID> <RegionEnvData> <Pressure> <MaxValue Value="1000.0" Known="1000.0" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <Units Value="hPa" Known="hPa" Version="1"/> <CurrentValue Value="" Known="" Version="2170"/> </Pressure> <Humidity> <MaxValue Value="90.0" Known="90.0" Version="1"/> <CurrentValue Value="" Known="" Version="2170"/> <Units Value="%" Known="%" Version="1"/> <MinValue Value="65.0" Known="65.0" Version="1"/> </Humidity> <rainfall> <MaxValue Value="2000.0" Known="2000.0" Version="1"/> <Units Value="mm/h" Known="mm/h" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <CurrentValue Value="" Known="" Version="2170"/> </rainfall> <wind_speed> <CurrentValue Value="" Known="" Version="2170"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <MaxValue Value="10.0" Known="10.0" Version="1"/> <Units Value="m/s" Known="m/s" Version="1"/> </wind_speed> <Light> <MaxValue Value="0.0" Known="0.0" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <CurrentValue Value="" Known="" Version="2170"/> <Units Value="" Known="" Version="2170"/> </Light> <Temperature> <MinValue Value="10.0" Known="10.0" Version="1"/> <MaxValue Value="40.0" Known="40.0" Version="1"/> <CurrentValue Value="" Known="" Version="2170"/> <Units Value="°C" Known="°C" Version="1"/> </Temperature> <sealevel_pressure> <CurrentValue Value="" Known="" Version="2170"/> <MaxValue Value="1000.0" Known="1000.0" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <Units Value="hPa" Known="hPa" Version="1"/> </sealevel_pressure> <uv> <MaxValue Value="4.0" Known="4.0" Version="1"/> <Units Value="" Known="" Version="2170"/> <CurrentValue Value="" Known="" Version="2170"/> <MinValue Value="0.0" Known="0.0" Version="1"/> </uv> <wind_angle> <MaxValue Value="360.0" Known="360.0" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <CurrentValue Value="" Known="" Version="2170"/> <Units Value="°" Known="°" Version="1"/> </wind_angle> <local_time Value="" Known="" Version="2170"/> <wind_direction Value="" Known="" Version="2169"/> </RegionEnvData> <Area> <LowerRight> <latitude Value="37.80191751" Known="37.80191751" Version="4276"/> <longitude Value="-122.45738983" Known="-122.45738983" Version="4276"/> </LowerRight> <UpperLeft> <longitude Value="-122.46642351" Known="-122.46642351" Version="4276"/> <latitude Value="37.80470646" Known="37.80470646" Version="4276"/> </UpperLeft> </Area> <Manager> <Name Value="Tom" Known="Tom" Version="1"/> </Manager> <MidPoint> <latitude Value="37.80331207" Known="37.80331207" Version="4276"/> <longitude Value="-122.46190658" Known="-122.46190658" Version="4276"/> </MidPoint> <Owner> <Name Value="Jerry" Known="Jerry" Version="1"/> </Owner> <Description Value="Region of North India" Known="Region of North India" Version="1"/> <Name Value="Region-T1" Known="Region-T1" Version="1"/> </Region> </Result> <Result> <Region> <RegionID>LVL2ZF6PAAAH6AAAAH2PSTTM</RegionID> <RegionEnvData> <Pressure> <MaxValue Value="1000.0" Known="1000.0" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <Units Value="hPa" Known="hPa" Version="1"/> <CurrentValue Value="" Known="" Version="17"/> </Pressure> <Humidity> <MaxValue Value="90.0" Known="90.0" Version="1"/> <CurrentValue Value="" Known="" Version="17"/> <Units Value="%" Known="%" Version="1"/> <MinValue Value="65.0" Known="65.0" Version="1"/> </Humidity> <rainfall> <MaxValue Value="2000.0" Known="2000.0" Version="1"/> <Units Value="mm/h" Known="mm/h" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <CurrentValue Value="" Known="" Version="17"/> </rainfall> <wind_speed> <CurrentValue Value="" Known="" Version="17"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <MaxValue Value="10.0" Known="10.0" Version="1"/> <Units Value="m/s" Known="m/s" Version="1"/> </wind_speed> <Light> <MaxValue Value="0.0" Known="0.0" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <CurrentValue Value="" Known="" Version="17"/> <Units Value="" Known="" Version="17"/> </Light> <Temperature> <MinValue Value="10.0" Known="10.0" Version="1"/> <MaxValue Value="40.0" Known="40.0" Version="1"/> <CurrentValue Value="" Known="" Version="17"/> <Units Value="°C" Known="°C" Version="1"/> </Temperature> <sealevel_pressure> <CurrentValue Value="" Known="" Version="17"/> <MaxValue Value="1000.0" Known="1000.0" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <Units Value="hPa" Known="hPa" Version="1"/> </sealevel_pressure> <uv> <MaxValue Value="4.0" Known="4.0" Version="1"/> <Units Value="" Known="" Version="17"/> <CurrentValue Value="" Known="" Version="17"/> <MinValue Value="0.0" Known="0.0" Version="1"/> </uv> <wind_angle> <MaxValue Value="360.0" Known="360.0" Version="1"/> <MinValue Value="0.0" Known="0.0" Version="1"/> <CurrentValue Value="" Known="" Version="17"/> <Units Value="°" Known="°" Version="1"/> </wind_angle> <local_time Value="" Known="" Version="17"/> <wind_direction Value="" Known="" Version="17"/> </RegionEnvData> <Area> <LowerRight> <latitude Value="37.62510898" Known="37.62510898" Version="34"/> <longitude Value="-105.73516846" Known="-105.73516846" Version="34"/> </LowerRight> <UpperLeft> <longitude Value="-122.45704651" Known="-122.45704651" Version="34"/> <latitude Value="38.01780398" Known="38.01780398" Version="34"/> </UpperLeft> </Area> <Manager> <Name Value="Nam" Known="Nam" Version="1"/> </Manager> <MidPoint> <latitude Value="38.11839037" Known="38.11839037" Version="32"/> <longitude Value="-114.07370606" Known="-114.07370606" Version="34"/> </MidPoint> <Owner> <Name Value="Nam" Known="Nam" Version="1"/> </Owner> <Description Value="sample Description" Known="sample Description" Version="1"/> <Name Value="Region-T2" Known="Region-T2" Version="1"/> </Region> </Result> </Find>
FindZones query : This query will give all the zones present on the Gateway.
Method POST Query <Query>
  <Find format="Version,Known">
    <Zone>
      <ZoneID ne="" />
    </Zone>
  </Find>
</Query>Response <Find Status="Success" Format="version,known"> <Result> <Zone> <ZoneID>LQ35K4C3AAAIWOYNETENPEJH</ZoneID> <Name Value="SampleZone2" Known="SampleZone2" Version="1"/> <Size Value="31327.7988281250" Known="31327.7988281250" Version="2"/> <Width Value="6.0000000000" Known="6.0000000000" Version="2"/> <RegionID Value="Region-T1" Known="Region-T1" Version="1"/> <Label Value="SampleZone2" Known="SampleZone2" Version="1"/> <CropID Value="LR66SBGYAAAIWOYNETK35S44" Known="LR66SBGYAAAIWOYNETK35S44" Version="2"/> <Height Value="5.0000000000" Known="5.0000000000" Version="2"/> </Zone> </Result> <Result> <Zone> <ZoneID>LQ35KYRFAAAIWOYNES3I5L7Q</ZoneID> <Name Value="SampleZone" Known="SampleZone" Version="1"/> <Size Value="44690.3515625000" Known="44690.3515625000" Version="7496"/> <Width Value="6.0000000000" Known="6.0000000000" Version="7496"/> <RegionID Value="Region-T1" Known="Region-T1" Version="1"/> <Label Value="SampleZone" Known="SampleZone" Version="1"/> <CropID Value="Crop-1" Known="Crop-1" Version="1"/> <Height Value="5.0000000000" Known="5.0000000000" Version="7497"/> </Zone> </Result> </Find>
FindSensorHubs query : This query will give all the sensor hubs present on the Gateway.
Method POST Query <Query>
  <Find format="Version,Known">
    <MCUModel>
      <ID ne="" />
    </MCUModel>
  </Find>
</Query>Response <Find Status="Success" Format="version,known"> <Result> <MCUModel> <ID>LQ3545VMAAAIWOYNET3WAAFU</ID> <Label Value="SampleHub" Known="SampleHub" Version="10"/> <LastUpdated Value="" Known="" Version="1762"/> <Status Value="" Known="" Version="1762"/> <HasMetadata Value="true" Known="true" Version="1"/> <Location> <longitude Value="-122.46199799" Known="-122.46224976" Version="23"/> <latitude Value="37.80384827" Known="37.80360794" Version="22"/> </Location> <ZoneName Value="" Known="SampleZone" Version="2"/> <Name Value="fc:db:b3:a4:1e:99" Known="fc:db:b3:a4:1e:99" Version="1"/> <NextUpdate Value="" Known="" Version="1762"/> </MCUModel> </Result> <Result> <MCUModel> <ID>LQ35K5QRAAAIWOYNEQVHCWEC</ID> <Label Value="00:80:00:00:00:00:ae:b0" Known="00:80:00:00:00:00:ae:b0" Version="1"/> <LastUpdated Value="" Known="" Version="31"/> <Status Value="" Known="" Version="31"/> <HasMetadata Value="true" Known="true" Version="1"/> <Location> <longitude Value="-111.84817505" Known="-111.84817505" Version="1"/> <latitude Value="34.56308365" Known="34.56308365" Version="1"/> </Location> <ZoneName Value="" Known="UnassignedZone" Version="2"/> <Name Value="00:80:00:00:00:00:ae:b0" Known="00:80:00:00:00:00:ae:b0" Version="1"/> <NextUpdate Value="" Known="" Version="31"/> </MCUModel> </Result> <Result> <MCUModel> <ID>LQ35LATRAAAIWOYNERIGEN4O</ID> <Label Value="00:80:00:00:00:00:ae:aa" Known="00:80:00:00:00:00:ae:aa" Version="1"/> <LastUpdated Value="" Known="" Version="7"/> <Status Value="" Known="" Version="7"/> <HasMetadata Value="true" Known="true" Version="1"/> <Location> <longitude Value="" Known="" Version="1"/> <latitude Value="" Known="" Version="1"/> </Location> <ZoneName Value="" Known="UnassignedZone" Version="2"/> <Name Value="00:80:00:00:00:00:ae:aa" Known="00:80:00:00:00:00:ae:aa" Version="1"/> <NextUpdate Value="" Known="" Version="7"/> </MCUModel> </Result> </Find>
FindZonesAggregateInfo query : This query will give all the calibrated and aggregated sensor values of different zones present on the gateway.
Method POST Query <Query>
  <Find>
    <ZoneAggregateInfo>
      <ID ne="" />
    </ZoneAggregateInfo>
  </Find>
</Query>Response <Find Status="Success"> <Result> <ZoneAggregateInfo> <ID>L3C5MKFRAAAKYEIAALGXY43H</ID> <Time>2017-09-28T00:20:00Z</Time> <ZoneName>SampleZone</ZoneName> <Unit>kPa</Unit> <IsActive>true</IsActive> <SensorType>SOIL</SensorType> <MaxValue>300.0000000000</MaxValue> <MinValue>1.0000000000</MinValue> <CurrentValue>1113.0000000000</CurrentValue> <SensorName>SoilMoisture1</SensorName> <AvgValue>1433.0000000000</AvgValue> <Count>7</Count> </ZoneAggregateInfo> </Result> <Result> <ZoneAggregateInfo> <ID>L3C5MKGEAAAKYEIAAJ3BI5JZ</ID> <Time>2017-09-28T00:20:00Z</Time> <ZoneName>SampleZone</ZoneName> <Unit>kPa</Unit> <IsActive>true</IsActive> <SensorType>SOIL</SensorType> <MaxValue>300.0000000000</MaxValue> <MinValue>1.0000000000</MinValue> <CurrentValue>1583.0000000000</CurrentValue> <SensorName>SoilMoisture2</SensorName> <AvgValue>1559.3333333333</AvgValue> <Count>7</Count> </ZoneAggregateInfo> </Result> </Find>
FindSensorHistoryModel query : This query will give all the historical sensor values  of different sensors present on the Gateway.
Method POST Query <Find>
<SensorHistoryModel>
<ID ne="" />
</SensorHistoryModel>
</Find>Response <Find Status="Success"> <Result> <SensorHistoryModel> <ID>L25D2GSEAAAKYEIAAJBIPCCZ</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>1927.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-25T18:12:00Z</RecordDate> <Name>SoilMoisture1</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L25D2GTHAAAKYEIAAJVMWHB3</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>565.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-25T18:12:00Z</RecordDate> <Name>SoilMoisture2</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L25D3EBHAAAKYEIAAL7VTBPE</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>446.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-25T18:12:30Z</RecordDate> <Name>SoilMoisture1</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L25D3EC3AAAKYEIAAJUFICZ3</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>1321.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-25T18:12:30Z</RecordDate> <Name>SoilMoisture2</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L25DXOTRAAAKYEIAALHXFE6H</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>1264.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-25T18:10:30Z</RecordDate> <Name>SoilMoisture1</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L25DXOU2AAAKYEIAAK4Y3ZXI</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>321.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-25T18:10:30Z</RecordDate> <Name>SoilMoisture2</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L25DYL6TAAAKYEIAAJRS6WQY</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>1877.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-25T18:11:00Z</RecordDate> <Name>SoilMoisture1</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L25DYL7MAAAKYEIAALQAKHQO</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>1929.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-25T18:11:00Z</RecordDate> <Name>SoilMoisture2</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L25DZJGHAAAKYEIAAKQ75NOP</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>743.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-25T18:11:30Z</RecordDate> <Name>SoilMoisture1</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L25DZJHBAAAKYEIAAJ3RJ663</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>341.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-25T18:11:30Z</RecordDate> <Name>SoilMoisture2</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L3C324B3AAAKYEIAALLJNS74</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>2394.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-27T23:48:00Z</RecordDate> <Name>SoilMoisture1</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L3C324DJAAAKYEIAAJHSRAQI</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>1317.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-27T23:48:00Z</RecordDate> <Name>SoilMoisture2</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L3C33ZKTAAAKYEIAAL5KPWOH</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>2150.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-27T23:48:30Z</RecordDate> <Name>SoilMoisture1</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L3C33ZLNAAAKYEIAAJBSGRMW</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>1808.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-27T23:48:30Z</RecordDate> <Name>SoilMoisture2</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L3C34WVSAAAKYEIAAIVWVZKY</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>2287.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-27T23:49:00Z</RecordDate> <Name>SoilMoisture1</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L3C34WYPAAAKYEIAAK3BEM6R</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>1258.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-27T23:49:00Z</RecordDate> <Name>SoilMoisture2</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L3C35T5AAAAKYEIAALMJ34AD</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>2315.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-27T23:49:30Z</RecordDate> <Name>SoilMoisture1</Name> </SensorHistoryModel> </Result> <Result> <SensorHistoryModel> <ID>L3C35T6DAAAKYEIAAIELMZCI</ID> <SensorType>SOIL</SensorType> <MinValue>1.0000000000</MinValue> <SensorValue>1614.0</SensorValue> <MCUName>12345</MCUName> <MaxValue>300.0000000000</MaxValue> <RecordDate>2017-09-27T23:49:30Z</RecordDate> <Name>SoilMoisture2</Name> </SensorHistoryModel>
</Result>
</Find>