Icc Pro Rest API Web Service - 5.2
Icc Pro Rest API Web Service - 5.2
1
2
General
You should install ICC 5.0.1 or later with the Web Site option (available in custom installation
options).
To use the REST API a license with Web Server option is required.
The access to the web service is control by an OAUTH 2.0 access token and optionally with a
refresh token.
To get the access token, you need a client id and client secret.
The client information is granted by Mottech for each client that wants to consume data
from ICC PRO system using the REST API.
You also need to have a user name and password of an ICC PRO user that granted remote
control authorization in ICC PRO and assigned to the required domain(s) with the relevant
elements.
The access token is valid for 2 hours.
Using the acquired access token, you can receive and change the data.
url: http://localhost/iccpro/token
If you are connecting from a remote machine, enter the correct host / IP Address to
access the ICC PRO web site.
grant_type: password
username: [USER LOGIN]
password: [USER PASSWORD]
client_id: [CLIENT ID]
client_secret: [CLIENT SECRET]
replace [USER NAME] and [USER PASSWORD] with the actual login/password for the
user in ICC PRO
replace [CLIENT ID] and [CLIENT SECRET] with the actual client id/client secret obtained from
Mottech
Request Headers:
content-type:"application/x-www-form-urlencoded"
Request Body:
grant_type:"password"
3
username:"user_api"
password:"123456"
client_id:"Client1"
client_secret:"1234"
Replace the username, password, client_id and client_secret with the values as defined in
ICC PRO.
The server will reply with the access_token and a refresh token:
Response Body:
access_token:"E2OpaoP8dxQhm1YhQG6oAmzOzGGEWgxWNw-GtxQFeS0y7fEIAnYaBMg5r2z5O-
232Y60FHU8prtXLcWG3YkWSLpFEkNAWfcaE_A4CsbWAm7poMwCJVtuvndWwp1qgZfRFeWg2QN9Honq5z9BCwc0
yQeHDiNdkPKtG4q9BX2gJVMJeDKTy8lLtJwRV7n_9SCTErCK9lCpnzun5X3_NrYNCl9tH68DhTA2kAzrJ_hVXX
llLMCVKnlQ6Q0TCmuDOlTl"
token_type:"bearer"
expires_in:7199
refresh_token:"62461b079d28443faaea43b9384f8f45"
as:client_id:"Client1"
userName:"user_api"
.issued:"Fri, 09 Nov 2018 08:46:28 GMT"
.expires:"Fri, 09 Nov 2018 10:46:28 GMT"
{
"access_token":"CRnST4dHW7jxAgpuwenzjO7Vp_1u3MvdwdyFN7qqXkyjFbMVPFlBDP-
I4U049pWDgpgAjjJ6Oml0d0TEDdnuXTjjHEosDduqIphNT0-WzGQ7dcedJ7cuylPfGLG-
edxXAvEYg9LZs1TgbJuyg9IxRsKKbOhgcrGolo_iW0_OPRQPpBekbgF1fZjHu-ofwv_VlW1hQPHTg2HU_oUKzeWB2Q",
"token_type":"bearer",
"expires_in":7199,".issued":"Thu, 23 Jan 2018 10:11:21 GMT",
".expires":"Tue, 23 Jan 2018 12:11:21 GMT"
In any farther requests to the ICC PRO RESTful API, use the access_token to authenticate the
request:
Header: add an Authorization data. The data should starts with the word Bearer and then a space and
the token you acquired in the previous step.
If the access token is expired, you can use the refresh_token to get an updated
access_token.
Request Body:
client_id:Client1
client_secret:1234
grant_type:refresh_token
refresh_token:62461b079d28443faaea43b9384f8f45
4
This will return a new access_token and new refresh_token:
"access_token": "6HAT9N66RG-
E5CquEJxrY97KhsxEnLO8I3ZnTdJ4aNfUJjlzUqJkgt2cRfu4Va9n_0UhwLe9w6eeGCoHL3TvoAwJbzIcka0Cb
3U5djiJ3u61ThQ8JEHOd0uvpxQtPdAwfMJI6mnSg6ii6kvaSnr66Bv8v3oYZKqHLbRcBpivYsXR_HqNM_WZBzp
mRnuiAGQz18TTlS-yZo04wJtDsMYC2ICxaVsBh4zO75fQ5jT9iBPV9mlh0RDPJKURFn_LQIEl",
"token_type": "bearer",
"expires_in": 7199,
"refresh_token": "d7990173383c4c0893284a51a720e0e1",
"as:client_id": "Client1",
"userName": "user_api",
".issued": "Fri, 09 Nov 2018 09:22:11 GMT",
".expires": "Fri, 09 Nov 2018 11:22:11 GMT"
5
Valves API
To get the user's valves run a GET request with query parameters and an authorization data in the
header.
url: http://localhost/iccpro/api/valves
6
Get valves GIS info
To get the user's valves info with GIS data run a GET request with query parameters and an
authorization data in the header.
url: http://localhost/iccpro/api/valves/getgisdata
clientid: use this parameter to get only the changes since the last request.
[
{
"Id": 899,
"Name": "Valve_1",
"Description": "This is valve 1",
"Latitude":34.5,
"Longitude":33.7,
"IrrigationDaysType":1,
"IrrigationDays":3
},
{
"Id": 900,
"Name": "Valve_2",
"Description": "This is valve 2",
"Latitude":34.4555,
"Longitude":33.237,
"IrrigationDaysType":0,
"IrrigationDays":2045
},
…..
]
For each valve of the user the result contains the valve id (Id), valve name (Name) and the
valve description (Description)
It also return the latitude and the longitude of the valve.
7
The IrrigationDaysType indicate the type of irrigation days of the valve's program.
0 – Irrigate by week days. IrrigationDays return the specific week days of irrigation.
1 – Irrigate by days interval. IrrigationDays return the interval between irrigation days.
For week days, IrrigationDays return the two week days as bits presentation.
For example, if the program irrigate on: Sunday and Wednesday on both weeks, the
IrrigationDays value will be: 1161 (0x489 or 0b0000010010001001)
8
Get GIS Status
To get the user's valves status run a GET request with query parameters and an
authorization data in the header.
url: http://localhost/iccpro/api/valves/getgisstatus
updatesince: use this parameter to narrow the results object to only valves that changed
since the specified date and time. The value should be specified in the following format:
yyyy-MM-dd HH:mm:ss
where:
"status":
[
{
"Id": 899,
"manualopen": true,
"programopen": false,
"IrrigationAlarms":0,
"commfail":false,
"hwfail":true
},
…,
…..
],
"lastupdate":"2018-03-25 06:20:20"
For each valve of the user the result contains the valve id (Id), and the current status of the
valve:
IrrigationAlarms: 0 if no alarm. 131 High flow alarm, 132 Low flow alarm, 133 Valve not
opened alarm.
9
commfail: true if the valve is in comm failure or false if not.
10
Create valves snapshot
To lower the amount of data, you can create a snapshot of current valves definition and
then get only the changes from the snapshot.
To create a snapshot, use the CreateGISDataSnapshot method of the valves service (POST
method).
url: http://localhost/iccpro/api/valves/creategisdatasnapshot
Body: you can add a parameter to specify if the snapshot will return or not
if the parameter includedata is specify, the query will return the snapshot data.
{
"clientid":"940aa0e9-3041-4997-8155-cd5dbab9b94a",
"valvesdata": […]
valvesdata – if you add the includedata parameter, this is the current valves
data.
url: http://localhost/iccpro/api/valves/updategisdatasnapshot
Body: you should pass the clientid as received from the create snapshot method.
"clientid":"940aa0e9-3041-4997-8155-cd5dbab9b94a"
11
Meters API
To get the user's meters run a GET request with query parameters and an authorization data in the
header.
url: http://localhost/iccpro/api/meters
12
Virtual Meters API
To get the user's virtual meters run a GET request with query parameters and an authorization data in
the header.
url: http://localhost/iccpro/api/virtualmeters
13
Programs API
To get the user's programs run a GET request with query parameters and an authorization
data in the header.
url: http://localhost/iccpro/api/programs
[
{
"Id": 79,
"GroupId": 11,
"Name": "Program_1",
"Description": "This is program 1"
},
{
"Id": 93,
"GroupId": 11,
"Name": "Program_2",
"Description": "This is program 2"
},
…..
For each program of the user the result contains the program id (Id), group id (GroupId),
program name (Name) and the program description (Description)
14
Get programs detailed info
To get the user's programs with detailed information run a GET request with query
parameters and an authorization data in the header.
url: http://localhost/iccpro/api/programs/getprograms?utc=1&groupId=11
The utc parameter is optional. By default all dates and time information are in local time of
the server.
You can specify UTC (Coordinated Universal Time) by setting the parameter to 1 or to true.
15
"LastFinishTime": "",
"LastStartTime": "",
"MinimumWaterQuantity": 0.0,
"MaximumWaterQuantity": 0.0,
"PostFertQuantity": 0.0,
"ProgramStopTime": 0,
"ProgramStatus": "Ready",
"ProgramRemainingCycles": 0,
"RemainingWater": 3600.0,
"UserFactor": 100.0,
"WaterDebt": 0.0,
"WaterQuantity": 3600.0,
"HasCommFailureWithFieldUnit": true,
"HasCommFailureWithMeter": false,
"LastSample": "20180218123616"
},
{
"Id":93,
"GroupId":11,
"Name":"Program_2",
"Description":"This is program 2",
……
}
]
For each program of the user the result contains the following data:
16
GroupStatus Irrigation group status Watering- group is current irrigating
In Program – group wait for next cycle to start
Finish – group finished irrigation
Waiting – group is waiting
Stopped – group stopped
Wait for Release – group waiting for other group to finish
or main line is stopped or a valve is open manually
IntervalBetweenCycles Number of seconds between two
cycles of the group
IntervalBetweenCyclesType Specify how the interval between StartToStart – From start of cycle to the start on next
cycles is handled cycle
EndToStart – From end of cycle to the start on next cycle
IrrigationDow Irrigation days (in two weeks) Only relevant when IrrigationDaysType is by day of week.
For example, a program that irrigate on:
Sunday and Thursday of week 1 and Monday and Friday
on week 2, the value will be: 4369,
01000100010001
IrrigationDaysInterval Irrigation days interval Number of days between irrigation days. Only relevant
when IrrigationDaysType is days interval.
When the value is 0 – there is no automatic irrigation, 1 –
irrigate every day, 4 – irrigate every 4 days.
IrrigationDaysType Irrigation days type DaysOfWeeks – Specific days of week
DaysInterval – days interval
GroupName Group name Can be empty
NumberOfCycles Number of group's cycles 1 … 99
99 – irrigate forever
RemainingCycles Remaining group's cycles 0 … 99
0 – Group finished
RemainingDays Remaining group's days until next 0 … 60
irrigation day When remaining days is 0 and IrrigationDaysType is
days interval the group will not irrigate automatically
StartTime Group's start time Seconds from midnight.
Can be 60 … 86,340
GroupStopTime Group's stop time Seconds from midnight.
Can be 0 … 86,340
When stop time is 0 – there is no stop time
LastFinishTime Last recorded finish time Date and time in the yyyyMMddhhmmss format
Can be empty string if no data recorded
LastStartTime Last recorded start time Date and time in the yyyyMMddhhmmss format
Can be empty string if no data recorded
LastWaterQuantity Last recorded watering quantity Liters or seconds depend on irrigation basis.
Can be null if no data recorded.
MinimumWaterQuantity Minimum allowed watering quantity 0 – no limit
in liters or seconds depends on
irrigation basis
MaximumWaterQuantity Maximum allowed watering quantity 0 – no limit
in liters or seconds depends on
irrigation basis
PostFertQuantity Water quantity to irrigate after finish Seconds or liters depends on irrigation basis
fertilizing
ProgramStopTime Program's stop time 0 … 86,340 seconds from midnight.
0 if stop time is not set.
ProgramStatus Program's current status Ready – program ready to irrigate
Watering – program is watering now
StopStopTime – program stopped because of stop time
StopFertNoFlow – program stopped because of a no flow
alarm in a fert pump
StopFertUncontrol – program stopped because of an
uncontrol alarm in a fert pump
StopMeterCommFail – program stopped because of a
comm. failure with water meter
17
StopFertOutputCommFail- program stopped because of
comm. failure with fertilize valve
StopFertMeterCommFail – program stopped because of
comm. failure with fertilize meter
StopMainValveCommFail – program stopped because of
comm. failure with main valve
StopStopCondition – program stopped because of a top
condition
StopWaterValveCommFail – program stopped because
of a comm. failure with watering valve
StopACOverCurrent – program stopped because of AC
over current failure
StopACFail – program stopped because of AC failure
18
Fertilization info structure (from the Ferts field of the program's status):
Flat result
If required, the result can be flatted.
url: http://localhost/iccpro/api/programs/getprograms?utc=1&groupId=11&flatresult=1
Programs
Ferts
The fert list will have a column named ProgramId that holds the Id of the program that owned this fert
data.
19
Set programs status
To update program's status run a POST request with an authorization data in the header and
a JSON object of the following structure in the request body.
url: http://localhost/iccpro/api/programs/updateprogramsstatus
The JSON object in the request body should have the following structure:
Specify only the fields you want to change in the object or pass a null value for fields you do not want to
change.
20
ProgramId Irrigation program Id This field is required only if using the FertsCommand list
Specify only the fields you want to change in the object or pass a null value for fields you do not want to
change.
If no error found and all commands executed correctly, the result is an empty array.
21
Set programs preset data
To update program's preset data run a POST request with an authorization data in the
header and a JSON object of the following structure in the request body.
url: http://localhost/iccpro/api/programs/updateprogramspresetdata
The JSON object in the request body should have the following structure:
22
WaterQuantityPostFertByTime Water post fert. in seconds.
Only valid when irrigation basis is time or
there is an expected flow greater than zero
in the program
WaterQuantityPostFertByVolume Water post fert. quantity in liters.
Only valid when irrigation basis is volume or
there is an expected flow greater than zero
in the program
DaysIntervalType Days interval type DaysInterval or DaysOfWeeks
DaysInterval Interval between irrigation days. 0 … 60
Only valid when days interval type is Days
Interval.
Setting to 0 – no more automatic irrigation
IrrigationDaysOfWeek Specify the irrigation days in two weeks Only valid when days interval type is Days
Interval.
Low byte: Setting to 0 – no more automatic irrigation
7 6 5 4 3 2 1 0
Su Sa Fr Th We Tu Mo Su For example: 0x0431 will irrigate on Sunday,
W2 W1 W1 W1 W1 W1 W1 W1
Thursday and Friday on week 1 and Wednesday
on week 2
High byte:
7 6 5 4 3 2 1 0
NU NU Sa Fr Th We Tu Mo
0 0 W2 W2 W2 W2 W2 W2
StartTime Irrigation group start time in seconds from 60 … 86340
midnight. This field affected by the utc parameter!
Cycles Number of group's cycles 1 … 99
IntervalBetweenCycles Interval between cycles in seconds 0 … 86400
Ferts Array of fertilizer pumps preset data See structure on next table
Specify only the fields you want to change in the object or pass a null value for fields you do not want to
change.
Specify only the fields you want to change in the object or pass a null value for fields you do not want to
change.
23
InvalidWaterMeter = 5,
InvalidWaterMeterPulseUnits = 6,
InvalidFertMeter = 7,
InvalidFertMeterPulseUnit = 8,
InvalidRemainingWater = 11,
CannotSetWaterByTime = 12,
CannotSetWaterByVolume = 13,
CannotSetPostFertWaterByTime = 14,
CannotSetPostFertWaterByVolume = 15,
CannotSetFertByTime = 16,
CannotSetFertByVolume = 17,
InvalidProgramCycles = 21,
InvalidDaysIntervalType = 22,
InvalidDaysInterval = 23,
ProgramUsesDaysInterval = 24,
InvalidIrrigationDays = 25,
ProgramUsesDaysOfWeek = 26,
InvalidIntervalTypeBetweenCycles = 27,
InvalidStartTime = 28,
InvalidRemainingWaterBeforeFert = 31,
InvalidPreFertQuantity = 32,
CannotSetWaterBeforeFertByTime = 33,
CannotSetWaterBeforeFertByVolume = 34,
InvalidActualWaterQuantity = 35,
InvalidPostFertWaterQuantity = 36,
InvalidRemainingFertQuantity = 37,
GroundAreaZero = 41,
ExpectedFlowZero = 42
Error Detailed information about the error Plain text
If no error found and all commands executed correctly, the result is an empty array.
24
Irrigate now a program's group
To irrigate now an irrigation group, run a POST request with an authorization data in the
header and a program's id as a parameter.
url: http://localhost/iccpro/api/programs/irrigatenow?programid=3022
The above request will irrigate now the group of the irrigation program with id = 3022
To reset an irrigation program alarm, run a POST request with an authorization data in the
header and a program's id as a parameter.
url: http://localhost/iccpro/api/programs/irrigatenow?programid=3022&irrigatedebts=false
The above request will reset alarm from program with id 3022 and will not trigger the
irrigate debts for the program. You can omit the irrigatedebts parameter in this case (this is
the default).
25
Post programs depth
url: http://localhost/iccpro/api/programs/updateProgramsByDepth
Body: send a JSON object with list of irrigation data for each valve:
Or, (since version 4.4.25): [{programId:79, depth:4.78, startTime: 60, cycles: 2, interval:
360},….]
you should use one of the above. Set the not used parameter to zero or do not include in the
json.
depth – irrigation depth for the valve on the next day in millimeters
This is the depth for the entire day.
If there are multiple cycles, the depth for each cycle will be divide by the number of
cycles.
Cycles – the number of cycles to irrigate. If set to 0, do not change the current settings in ICC
PRO.
interval – minutes between cycles. If cycles is set to 0, ICC PRO will ignore the interval data.
If there are errors or issues, a json object with descriptive information will be return.
If the body json object is not valid the service will return:
If no valve id and no programId listed it will return { "Message": "No valve or program
requested" }
If no program found that match the specified valve's ids, the result will be: { "Message": "No
program requested" }
If there are issues with specific programs, the result will detail for each valve, the problem.
26
For example, if the defined ground area of the valve is zero, the following result will return:
{
"id":899, "code": 1, "error": "Program's ground area is zero"
}
If the program is set to irrigate by time and the expected flow is zero the return result will
be:
{
"id":899, "code": 2, "error": "Program's expected flow is zero."
}
27
Analog Inputs API
To get the user's analog inputs run a GET request with an authorization data in the header.
url: http://localhost/iccpro/api/analoginputs
// Flow
LiterPerHour = 50,
CubicMeterPerHour = 51,
LiterPerMinute = 52,
CubicMeterPerMinute = 53,
GallonPerMinute = 54,
KiloGallonPerMinute = 55,
GallonPerHour = 56,
KiloGallonPerHour = 57,
LiterPerSecond = 58,
CubicMeterPerSecond = 59,
28
// Speed
MeterPerSecond = 100,
MeterPerMinute = 101,
KilometerPerHour = 102,
MilePerHour = 103,
FeetPerMin = 104,
FeetPerSec = 105,
YardPerSec = 106,
YardPerMinute = 107,
YardPerHour = 108,
// Area
SquareMeter = 150,
Acre = 151,
Dunham = 152,
SquareKilometer = 153,
Hectare = 154,
SquareFeet = 155,
SquareYard = 156,
// Length
Meter = 200,
Inch = 201,
Milimeter = 202,
Centimeter = 203,
Kilometer = 204,
Feet = 205,
Yard = 206,
LiterPerDunam = 207,
CubePerDunam = 208,
// Pressure
Atmosphere = 250,
Bars = 251,
InchWater = 252,
InchMercury = 253,
KiloPascals = 254,
Millibars = 255,
MillimeterMercury = 256,
MillimeterWater = 257,
PoundForcePerSquereInch = 258,
Pascal = 259,
Torr = 260,
Centibars = 261,
// Temperature
Celsius = 300,
Fahrenheit = 301,
Kelvin = 302,
// pH
pH = 350,
// Electrical Conductivity
MillisiemensPerCentimeter = 400,
SiemensPerCentimeter = 401,
MicroSiemensPerCentimeter = 402,
EC = 403,
CF = 404,
MilliOhmPerCentimeter = 405,
29
MilliOhmPerMeter = 406,
ppmTDS = 407,
// Volt unit
Volt = 500,
MilliVolt = 501,
// Current unit
Amper = 550,
MilliAmper = 551,
// Percent
Percent = 700,
Permil = 701
SensorType The sensor type One of the following:
General = 0,
Temperature = 1,
AirTemperature = 2,
LeafTemperature = 3,
SoilTemperature = 4,
Humidity = 11,
AirHumidity = 12,
Speed = 21,
WindSpeed = 22,
Direction = 31,
WindDirection = 32,
Radiation = 41,
PAR_PhotosyntheticallyActiveRadiation = 42,
Rain = 51,
ET_evapotranspiration = 52,
Tensiometer = 61,
SoilMoisture = 62,
DialectricPermittivity = 63,
ElectricConductivity = 64,
Dendrometer = 71,
StemDiameter = 72,
FruitDiameter = 73
30
Get analog inputs current data
To get the user's analog inputs current data run a GET request with query parameters and an
authorization data in the header.
url: http://localhost/iccpro/api/analoginputs/current?utc=true&id=3&id=2
utc indicates weather the result return date and time information in UTC or in local time. If utc is not
specified, the result will return date and time in local time.
You can specify specific analog inputs ids or not specify any. If not id is specify, all user's analog inputs
will return.
31
Get analog inputs historical data
To get the user's analog inputs historical data run a GET request with query parameters and an
authorization data in the header.
url:
http://localhost/iccpro/api/analoginputs/history?utc=true&fromdatetime=20181001000000&todateti
me=20181031235900&resolution=3&id=3&id=2
utc indicates weather the result return date and time information in UTC or in local time. If utc is not
specified, the result will return date and time in local time.
All period = 0,
Hourly = 1,
Daily = 2,
Weekly = 3,
Monthly = 4,
Quarterly = 5,
Yearly = 6,
Custom = 9
http://localhost/iccpro/api/analoginputs/history?utc=true&fromdatetime=20181001000000&todateti
me=20181031235900&resolution=9&CustomResolutionDuration=1800&id=3&id=2
The above query will return the result with a resolution of 30 minutes.
You can specify specific analog inputs ids or not specify any. If not id is specify, all user's analog inputs
will return.
32
Sensors API
Get sensors general info
To get the user's sensors run a GET request with an authorization data in the header.
url: http://localhost/iccpro/api/sensors
// Flow
LiterPerHour = 50,
CubicMeterPerHour = 51,
LiterPerMinute = 52,
CubicMeterPerMinute = 53,
GallonPerMinute = 54,
KiloGallonPerMinute = 55,
GallonPerHour = 56,
KiloGallonPerHour = 57,
LiterPerSecond = 58,
CubicMeterPerSecond = 59,
33
// Speed
MeterPerSecond = 100,
MeterPerMinute = 101,
KilometerPerHour = 102,
MilePerHour = 103,
FeetPerMin = 104,
FeetPerSec = 105,
YardPerSec = 106,
YardPerMinute = 107,
YardPerHour = 108,
// Area
SquareMeter = 150,
Acre = 151,
Dunham = 152,
SquareKilometer = 153,
Hectare = 154,
SquareFeet = 155,
SquareYard = 156,
// Length
Meter = 200,
Inch = 201,
Milimeter = 202,
Centimeter = 203,
Kilometer = 204,
Feet = 205,
Yard = 206,
LiterPerDunam = 207,
CubePerDunam = 208,
// Pressure
Atmosphere = 250,
Bars = 251,
InchWater = 252,
InchMercury = 253,
KiloPascals = 254,
Millibars = 255,
MillimeterMercury = 256,
MillimeterWater = 257,
PoundForcePerSquereInch = 258,
Pascal = 259,
Torr = 260,
Centibars = 261,
// Temperature
Celsius = 300,
Fahrenheit = 301,
Kelvin = 302,
// pH
pH = 350,
// Electrical Conductivity
MillisiemensPerCentimeter = 400,
SiemensPerCentimeter = 401,
MicroSiemensPerCentimeter = 402,
EC = 403,
CF = 404,
MilliOhmPerCentimeter = 405,
34
MilliOhmPerMeter = 406,
ppmTDS = 407,
// Volt unit
Volt = 500,
MilliVolt = 501,
// Current unit
Amper = 550,
MilliAmper = 551,
// Percent
Percent = 700,
Permil = 701
SensorType The sensor type One of the following:
General = 0,
Temperature = 1,
AirTemperature = 2,
LeafTemperature = 3,
SoilTemperature = 4,
Humidity = 11,
AirHumidity = 12,
Speed = 21,
WindSpeed = 22,
Direction = 31,
WindDirection = 32,
Radiation = 41,
PAR_PhotosyntheticallyActiveRadiation = 42,
Rain = 51,
ET_evapotranspiration = 52,
Tensiometer = 61,
SoilMoisture = 62,
DialectricPermittivity = 63,
ElectricConductivity = 64,
Dendrometer = 71,
StemDiameter = 72,
FruitDiameter = 73
35
Get sensors current data
To get the user's sensors current data run a GET request with query parameters and an authorization
data in the header.
url: http://localhost/iccpro/api/sensors/current?utc=true&id=3&id=2
utc indicates weather the result return date and time information in UTC or in local time. If utc is not
specified, the result will return date and time in local time.
You can specify specific sensors ids or not specify any. If not id is specify, all user's sensors will return.
36
Get sensors historical data
To get the user's sensors historical data run a GET request with query parameters and an authorization
data in the header.
url:
http://localhost/iccpro/api/sensors/history?utc=true&fromdatetime=20181001000000&todatetime=20
1810312359&resolution=3&id=3&id=2
utc indicates weather the result return date and time information in UTC or in local time. If utc is not
specified, the result will return date and time in local time.
All period = 0,
Hourly = 1,
Daily = 2,
Weekly = 3,
Monthly = 4,
Quarterly = 5,
Yearly = 6,
Custom = 9
http://localhost/iccpro/api/sensors/history?utc=true&fromdatetime=20181001000000&todatetime=20
181031235900&resolution=9&CustomResolutionDuration=1800&id=3&id=2
The above query will return the result with a resolution of 30 minutes.
You can specify specific sensors ids or not specify any. If not id is specify, all user's sensors will return.
37
Accumulations API
To get the user's valves historical data run a GET request with query parameters and an authorization
data in the header.
url:
http://localhost/iccpro/api/accumulation/valves?utc=true&fromdatetime=20181001000000&todateti
me=20181031235900&resolution=3&id=3&id=2
utc indicates weather the result return date and time information in UTC or in local time. If utc is not
specified, the result will return date and time in local time.
All period = 0,
Hourly = 1,
Daily = 2,
Weekly = 3,
Monthly = 4,
Quarterly = 5,
Yearly = 6,
Custom = 9
http://localhost/iccpro/api/accumulation/valves?utc=true&fromdatetime=20181001000000&todateti
me=20181031235900&resolution=9&CustomResolutionDuration=1800&id=3&id=2
The above query will return the result with a resolution of 30 minutes.
You can specify specific valves ids or not specify any. If not id is specify, all user's valves will return.
38
period
Fert1Volume Fert 1 volume in period Liters
AccFert1Volume Accumulated fert. 1 volume in Liters
period
Fert1Time Fert 1 time in period Seconds
AccFert1Time Accumulated fert.1 time in period Seconds
Fert2Volume Fert 2 volume in period Liters
AccFert2Volume Accumulated fert. 2 volume in Liters
period
Fert2Time Fert 2 time in period Seconds
AccFert2Time Accumulated fert.2 time in period Seconds
Fert3Volume Fert 3 volume in period Liters
AccFert3Volume Accumulated fert. 3 volume in Liters
period
Fert3Time Fert 3 time in period Seconds
AccFert3Time Accumulated fert.3 time in period Seconds
Fert4Volume Fert 4 volume in period Liters
AccFert4Volume Accumulated fert. 4 volume in Liters
period
Fert4Time Fert 4 time in period Seconds
AccFert4Time Accumulated fert.4 time in period Seconds
39
Get meters historical accumulations
To get the user's meters and virtual meters historical data run a GET request with query parameters
and an authorization data in the header.
url:
http://localhost/iccpro/api/accumulation/meters?utc=true&fromdatetime=20181001000000&todateti
me=2018103123595900&resolution=3&mid=3&vid=2
utc indicates weather the result return date and time information in UTC or in local time. If utc is not
specified, the result will return date and time in local time.
All period = 0,
Hourly = 1,
Daily = 2,
Weekly = 3,
Monthly = 4,
Quarterly = 5,
Yearly = 6,
Custom = 9
http://localhost/iccpro/api/accumulation/meters?utc=true&fromdatetime=20181001000000&todateti
me=2018103123595900&resolution=99&CustomResolutionDuration=1800&mid=3&vid=2
The above query will return the result with a resolution of 30 minutes.
You can specify specific meters ids and/or virtual meters ids or not specify any. If not id is specify, all
user's meters and virtual meters will return.
40
Meter information for the history period:
41