0% found this document useful (0 votes)
134 views41 pages

Icc Pro Rest API Web Service - 5.2

Uploaded by

niko69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
134 views41 pages

Icc Pro Rest API Web Service - 5.2

Uploaded by

niko69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

ICC PRO 5.2.

20 – REST API Web Service


General .......................................................................................................................3
Acquire the token .........................................................................................................3
Valves API ....................................................................................................................6
Get valves general info ..............................................................................................6
Get valves GIS info ....................................................................................................7
Optional query parameters .....................................................................................7
Get GIS Status ...........................................................................................................9
Optional query parameters .....................................................................................9
Create valves snapshot ............................................................................................ 11
Update valves snapshot ........................................................................................... 11
Meters API ................................................................................................................. 12
Get meters general info ........................................................................................... 12
Virtual Meters API ...................................................................................................... 13
Get virtual meters general info ................................................................................. 13
Programs API ............................................................................................................. 14
Get programs general info........................................................................................ 14
Get programs detailed info....................................................................................... 15
Set programs status................................................................................................. 20
Set programs preset data ......................................................................................... 22
Irrigate now a program's group ................................................................................. 25
Reset a program's alarm .......................................................................................... 25
Post programs depth ............................................................................................... 26
Analog Inputs API ....................................................................................................... 28
Get analog inputs general info .................................................................................. 28
Get analog inputs current data ................................................................................. 31
Get analog inputs historical data ............................................................................... 32
Sensors API ................................................................................................................ 33
Get sensors general info .......................................................................................... 33
Get sensors current data .......................................................................................... 36
Get sensors historical data ....................................................................................... 37
Accumulations API ...................................................................................................... 38
Get valves historical accumulations ........................................................................... 38
Get meters historical accumulations.......................................................................... 40

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.

Acquire the token


To get the token, use the following POST request:

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.

Body: use Content-Type: application/x-www-form-urlencoded


and the following data:

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

POST a request to http://localhost/iccpro/token with the following data:

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"

The result is a JSON object with the token:

{
"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"

Use the access_token to get the data.

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.

Authorization: Bearer CRnST4dHW7jxAgpuwenzjO7Vp_1u3MvdwdyFN7qqXkyjFbMVPFlBDP-


I4U049pWDgpgAjjJ6Oml0d0TEDdnuXTjjHEosDduqIphNT0-WzGQ7dcedJ7cuylPfGLG-
edxXAvEYg9LZs1TgbJuyg9IxRsKKbOhgcrGolo_iW0_OPRQPpBekbgF1fZjHu-
ofwv_VlW1hQPHTg2HU_oUKzeWB2Q

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

Get valves general info

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

The result is a JSON object with the following structure:

Field name Content Remarks


Id Valve unique id in ICC PRO
Name Valve name
Description Valve description

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

Header: add an Authorization data.

Optional query parameters


You can optionally add the following parameters to the query:

page and pagesize: use those parameters to paginate the result.


set the pagesize to the required number of valves in each result and set the page to specify
the required page.

For example: http://localhost/iccpro/api/valves/getgisdata?page=2&pagesize=100


This will return 100 valves objects starting from the 101's valve.

clientid: use this parameter to get only the changes since the last request.

The clientid is acquired using the CreateGISDataSnapshot query.

The result is a json object with the following data:

[
{
"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

Header: add an Authorization data.

Optional query parameters


You can optionally add the following parameters to the query:

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:

yyyy – year, MM – month, dd – day in month, HH – 24 hour, mm – minutes, ss –


seconds.

The result is a json object with the following data:

"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:

manualopen: true if the valve is manually opened or false if not.

programopen: true if the valve is opened by a program or false if not.

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.

hwfail: true if the valve is in hardware 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

Header: add an Authorization data as described on the Valves service.

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.

The result is a json object.

{
"clientid":"940aa0e9-3041-4997-8155-cd5dbab9b94a",
"valvesdata": […]

clientid – this is a unique id that you should use on subsequent queries.

valvesdata – if you add the includedata parameter, this is the current valves
data.

Update valves snapshot


To indicate that the client has processed the updates and the snapshot can be update, you
should call the UpdateGISDataSnapshot method (POST method).

url: http://localhost/iccpro/api/valves/updategisdatasnapshot

Header: add an Authorization data

Body: you should pass the clientid as received from the create snapshot method.

"clientid":"940aa0e9-3041-4997-8155-cd5dbab9b94a"

The result is just 200 code result.

11
Meters API

Get meters general info

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

The result is a JSON object with the following structure:

Field name Content Remarks


Id Meter unique id in ICC PRO
Name Meter name
Description Meter description

12
Virtual Meters API

Get virtual meters general info

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

The result is a JSON object with the following structure:

Field name Content Remarks


Id Virtual Meter unique id in ICC PRO
Name Virtual Meter name
Description Virtual Meter description

13
Programs API

Get programs general info

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

The result is a JSON object with the following data:

[
{
"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.

The groupId parameter is optional. By default all programs are return.


You can specify to return only programs of a specific group id by setting this parameter.

The result is a JSON object with the following data:


[
{
"Id":79,
"GroupId":11,
"Name":"Program_1",
"Description":"This is program 1",
"IsActive": false,
"ActualFlow": 0.0,
"ActualWaterQuantity": 3600.0,
"ExpectedEndOfIrrigation": "",
"ExpectedFlow": 0.0,
"IndexInGroup": 1,
"IrrigationBasis": "Time",
"IsSuspend": false,
"GroupStatus": "Finished",
"IntervalBetweenCycles": 0,
"IntervalBetweenCyclesType": "StartToStart",
"IrrigationDow": 0,
"IrrigationDaysInterval": 1,
"IrrigationDaysType": "DaysInterval",
"GroupName": "",
"NumberOfCycles": 1,
"RemainingCycles": 0,
"RemainingDays": 1,
"StartTime": 25200,
"GroupStopTime": 0,

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:

Field name Content Remarks


Id Program unique id in ICC PRO
GroupId Group id in ICC PRO
Name Program name
Description Program description
IsActive Program's active flag true when program is active or false if program is not
active.
An inactive program will not irrigate
ActualFlow Last known program's water flow In Liters/Hour
ActualWaterQuantity Watering quantity Depends of irrigation basis.
For time – quantity is in seconds.
For volume – quantity is in liters.
ExpectedEndOfIrrigation Estimate irrigation finish time Date and time in yyyyMMddhhmmss format
ExpectedFlow Expected program's flow In Liters/Hour
IndexInGroup Index of the program in the
irrigation group
IrrigationBasis Irrigation basis Volume or Time
IsSuspend Specify whether the irrigation group True – group is suspended
is suspended No irrigation until resumed.
False = group can watering

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

AlarmHighFlow – program in alarm status because of


high flow
AlarmLowFlow – program in alarm status because of low
flow
AlarmNoFlow – program in alarm status because of no
flow

WaitMeterCommFail – program in wait status because of


a comm. failure with water meter
WaitFertOutputCommFail- program in wait status
because of comm. failure with fertilize valve
WaitFertMeterCommFail – program in wait status
because of comm. failure with fertilize meter
WaitMainValveCommFail – program in wait status
because of comm. failure with main valve
WaitWaterValveCommFail – program in wait status
because of a comm. failure with watering valve
WaitACOverCurrent – program in wait status because of
AC over current failure
WaitACFail – program in wait status because of AC
failure

ProgramRemainingCycles Remaining cycles of program 0 … 99


0 – Program finished
RemainingWater Remaining water in liters or
seconds depend on irrigation basis
UserFactor User factor of program 0 … 999%
WaterDebt Watering Debt in liters or seconds
depend on irrigation basis
WaterQuantity Watering quantity in manual control
mode. This quantity multiplies by
user factor to get the actual water
quantity.
In liters or seconds depend on
irrigation basis
Ferts List of fertilizations info in irrigation
program. See structure data in next
table
HasCommFailureWithFieldUnit When true indicates that there is a
communication failure with the field
unit. All current data is probably not
up to date.
HasCommFailureWithMeter When true indicates that there is a
communication failure with the
water meter. Remaining water and
current flow is probably not up to
date.
LastSample Program last update time

18
Fertilization info structure (from the Ferts field of the program's status):

Field name Content Remarks


FertPumpId Fert pump id
FertPumpName Fert pump name
FertQuantity Fert quantity in liters or seconds
depend on fertilize basis
FertDebt Fert debt in liters or seconds
depend on fertilize basis
WaterBeforeFertQuantity Water before starting fertilizer in 0 – fertilize starts immediately when program starts
seconds or liters depend on
program's irrigation basis
RemainingFertQuantity Remaining fert quantity in liters or
seconds depend on fert basis
RemainingWaterBeforeFertQuantity Remaining water before starting
fertilizer in seconds or liters depend
on program's irrigation basis
FertBasis Fertilize basis Volume or Time
FertType Indicates if fert is open once for all Absolute or Proportional
quantity or proportional to water
quantity
HasCommFailureWithMeter When true indicates that there is a
communication failure with the fert
meter. Remaining fert is probably
not up to date.
FertPumpDescription Fert pump description

Flat result
If required, the result can be flatted.

i.e. the Fertilization data will be send in a separate list.

To request a flat result:

url: http://localhost/iccpro/api/programs/getprograms?utc=1&groupId=11&flatresult=1

The result will be an object with two lists:

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:

Field name Content Remarks


utc true if date and time in UTC or false Default is false – uses local time
if in local time
ProgramsCommand Array of program's command See structure in next table
FertsCommand Optionally an array of fert command This is optionally if the program command not hold the
fert commands

Set the ProgramId to the id of the irrigation program

Program's Command structure:

Field name Content Remarks


ProgramId Irrigation program's unique id As received in getprograms (field Id)
RemainingWater Remaining water in liters or
seconds depends on the program's
irrigation basis
RemainingCycles Remaining cycles of the group 0 … 99
When set to 0, group will finish watering
RemainingProgramCycles Remaining cycles of the program 0 … 99
When set to 0, program will finish watering
RemainingDays Remaining days of the group 0 … 60
Only possible when irrigation days type is by days
interval.
If set to 0 – No more irrigation will be schedule until
setting to a positive value or performing irrigate now
on the program
NextIrrigationTime Next irrigation time for the group. Seconds from midnight
This is only effective while the
group in "In Program" status.
FertCommands List of Fert Commands 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.

Program's Fert Command structure:

Field name Content Remarks


FertPumpId Fert Pump's unique id As received in getprograms (field Id)
RemainingFert Remaining fert in liters or seconds Fert pump irrigation basis as received in getprograms for
depends on the fert pump's that fert pump id in that irrigation program
irrigation basis
RemainingWaterBeforeFert Remaining water before fertilizing
this pump in this program.
In liters or seconds depend on
irrigation basis of the program

20
ProgramId Irrigation program Id This field is required only if using the FertsCommand list

If the fert is part of the program command, this field is not


require

Specify only the fields you want to change in the object or pass a null value for fields you do not want to
change.

Result is an array of errors for each invalid command.

Each error entry has the following structure:

Field name Content Remarks


id Irrigation program's id
Code Error code One of the following:
NotAuthorized = 1,
IrrigationProgramNotFound = 2,
InvalidFertPumpId = 3,
FertPumpNotInProgram = 4,
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,
InvalidIntervalBetweenCycles = 29,
InvalidNextIrrigationTime = 30,
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.

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:

Field name Content Remarks


utc true if date and time in UTC or false Default is false – uses local time
if in local time
ProgramsPreset Array of program's preset See structure in next table
FertsPreset Array of fert's preset This is optional if not using the fert list in the
ProgramPreset object.

Program's Preset structure:

Field name Content Remarks


ProgramId Irrigation program's unique id As received in getprograms (field Id)
WaterQuantityByTime Water quantity in seconds. This parameter only affect irrigation program that
Only valid when irrigation basis is time or uses the manual irrigation control method.
there is an expected flow greater than zero The specified value is multiply by the program's
in the program user factor and set the actual water quantity

You should avoid using this field unless there is a


special use case
WaterQuantityByVolume Water quantity in liters. This parameter only affect irrigation program that
Only valid when irrigation basis is volume or uses the manual irrigation control method.
there is an expected flow greater than zero The specified value is multiply by the program's
in the program user factor and set the actual water quantity

You should avoid using this field unless there is a


special use case
WaterQuantityByDepth Water quantity in mm. This parameter only affect irrigation program that
Only valid when there is a non-zero ground uses the manual irrigation control method.
area for program's valves and irrigation basis The specified value is multiply by the program's
is volume or irrigation basis is time and there user factor and set the actual water quantity
is an expected flow greater than zero in the
program You should avoid using this field unless there is a
special use case
ActualWaterQuantityByTime Actual water quantity in seconds. This parameter set the actual water directly
Only valid when irrigation basis is time or overrides any control method.
there is an expected flow greater than zero
in the program You should use this field and not
WaterQuantityByTime unless there is a special
use case
ActualWaterQuantityByVolume Actual water quantity in liters. This parameter set the actual water directly
Only valid when irrigation basis is volume or overrides any control method.
there is an expected flow greater than zero
in the program You should use this field and not
WaterQuantityByVolume unless there is a special
use case
ActualWaterQuantityByDepth Actual water quantity in mm. This parameter set the actual water directly
Only valid when there is a non-zero ground overrides any control method.
area for program's valves and irrigation basis
is volume or irrigation basis is time and there You should use this field and not
is an expected flow greater than zero in the WaterQuantityByTime unless there is a special
program use case

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.

Program's Fert Preset structure:

Field name Content Remarks


FertPumpId Fert Pump's unique id As received in getprograms (field Id)
FertQuantityByTime Fert quantity in seconds. Only valid when fert irrigation basis is time
FertQuantityByVolume Fert quantity in liters. Only valid when irrigation basis is volume
WaterBeforeFertQuantityByTime Water before fertilizing this pump in Only valid when program's irrigation basis is time
this program in seconds.
WaterBeforeFertQuantityByVolume Water before fertilizing this pump in Only valid when program's irrigation basis is volume
this program in liters.
ProgramId Irrigation program Id This is only required when 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.

Result is an array of errors for each invalid command.

Each error entry has the following structure:

Field name Content Remarks


id Irrigation program's id
Code Error code One of the following:
NotAuthorized = 1,
IrrigationProgramNotFound = 2,
InvalidFertPumpId = 3,
FertPumpNotInProgram = 4,

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

Reset a program's alarm

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

To change the programs irrigation quantity by depth, use the updateProgramsByDepth


method of the programs service.

url: http://localhost/iccpro/api/programs/updateProgramsByDepth

Header: add an Authorization data.

Body: send a JSON object with list of irrigation data for each valve:

For example: [{id:25, depth:4.78, startTime: 60, cycles: 2, interval: 360},….]

Or, (since version 4.4.25): [{programId:79, depth:4.78, startTime: 60, cycles: 2, interval:
360},….]

id – this is the valve id as retrieved with the Valves service


programId – this is the program id as retrieved with the Programs service

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.

startTime – the program start time in minutes from midnight.


If it is 0, do not change the current start time as defined in ICC PRO.

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.

The result is a json object.

If there are no problems, the result will be an empty json object: []

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:

{ "Message": "Invalid Data" }

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

Get analog inputs general info

To get the user's analog inputs run a GET request with an authorization data in the header.

url: http://localhost/iccpro/api/analoginputs

The result is a JSON array of objects with the following format:

Field name Content Remarks


Id Analog input unique id in ICC PRO
Name Analog input name
Description Analog input description
Unit Measurement unit abbreviation
UnitCode Measurement unit unique code // Volume
Liter = 41,
CubicMeter = 42,
Gallon = 43,
KiloGallon = 44,
mmdunam = 45,
AcreFoot = 46,
mmaccumulated = 47,
inchaccumulated = 48,

// Volume Pulse size


Liter0_1 = 4,
Liter0_25 = 5,
Liter0_5 = 1,
Liter1 = 6,
Liter10 = 7,
Liter100 = 8,
CubicMeter1 = 14,
CubicMeter10 = 15,
Gallon0_1 = 2,
Gallon0_25 = 3,
Gallon0_5 = 16,
Gallon1 = 9,
Gallon10 = 10,
Gallon100 = 11,
KiloGallon1 = 12,
KiloGallon10 = 13,
mm02 = 17,
inch001 = 18,
mm01 = 19,
mm025 = 20,
CubicMeter100 = 21,

// 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,

// Nephelometric turbidity unit


NephelometricTurbidityU = 450,

// Volt unit
Volt = 500,
MilliVolt = 501,

// Current unit
Amper = 550,
MilliAmper = 551,

// Electricity Power unit


Watt = 600,
KiloWatt = 601,

// Electricity Energy unit


WattPerHour = 650,
KiloWattPerHour = 651,

// 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

all parameters are optional.

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.

The result is a JSON array of objects with the following format:

Field name Content Remarks


Id Analog input unique id in ICC PRO
Value Analog input value in
measurements units
LastSampleTime Last sample time of the analog In yyyyMMddhhmmss format.
input Empty string if not sampled yet.
HasCommFailureWithFieldUnit When true indicates that there is a
communication failure with the field
unit. All current data is probably not
up to date.
HasCommFailureWithAnalogInput When true indicates that there is a
communication failure with the
analog input.

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.

The fromdatetime, todatetime and resolution parameters are required.

Fromdatetime and todatetime are in the following format: yyyyMMddhhmmss

Resolution should have one of the following values:

All period = 0,
Hourly = 1,
Daily = 2,
Weekly = 3,
Monthly = 4,
Quarterly = 5,
Yearly = 6,
Custom = 9

When specifying a custom resolution, you must include another parameter


CustomResolutionDuration for the resolution period (in seconds)

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.

The result is a JSON array of objects with the following format:

Field name Content Remarks


Time Time stamp for the historical data In yyyyMMddhhmmss format.
Data Array of analog input's data for the As describe in the next table
specified time

Analog input information for the history period:

Field name Content Remarks


Id Analog input unique id in ICC PRO
Average Analog input average value in
measurements units
Maximum Analog input maximum value in
measurements units
Minimum Analog input minimum value in
measurements units

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

The result is a JSON array of objects with the following format:

Field name Content Remarks


Id Sensor unique id in ICC PRO
Name Sensor name
Description Sensor description
Unit Measurement unit abbreviation
UnitCode Measurement unit unique code // Volume
Liter = 41,
CubicMeter = 42,
Gallon = 43,
KiloGallon = 44,
mmdunam = 45,
AcreFoot = 46,
mmaccumulated = 47,
inchaccumulated = 48,

// Volume Pulse size


Liter0_1 = 4,
Liter0_25 = 5,
Liter0_5 = 1,
Liter1 = 6,
Liter10 = 7,
Liter100 = 8,
CubicMeter1 = 14,
CubicMeter10 = 15,
Gallon0_1 = 2,
Gallon0_25 = 3,
Gallon0_5 = 16,
Gallon1 = 9,
Gallon10 = 10,
Gallon100 = 11,
KiloGallon1 = 12,
KiloGallon10 = 13,
mm02 = 17,
inch001 = 18,
mm01 = 19,
mm025 = 20,
CubicMeter100 = 21,

// 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,

// Nephelometric turbidity unit


NephelometricTurbidityU = 450,

// Volt unit
Volt = 500,
MilliVolt = 501,

// Current unit
Amper = 550,
MilliAmper = 551,

// Electricity Power unit


Watt = 600,
KiloWatt = 601,

// Electricity Energy unit


WattPerHour = 650,
KiloWattPerHour = 651,

// 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

all parameters are optional.

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.

The result is a JSON array of objects with the following format:

Field name Content Remarks


Id Sensor unique id in ICC PRO
Value Sensor value in measurements
units
LastSampleTime Last sample time of the sensor In yyyyMMddhhmmss format.
Empty string if not sampled yet.
HasCommFailureWithFieldUnit When true indicates that there is a
communication failure with the field
unit. All current data is probably not
up to date.
HasCommFailureWithSensor When true indicates that there is a
communication failure with the
sensor.

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.

The fromdatetime, todatetime and resolution parameters are required.

Fromdatetime and todatetime are in the following format: yyyyMMddhhmmss

Resolution should have one of the following values:

All period = 0,
Hourly = 1,
Daily = 2,
Weekly = 3,
Monthly = 4,
Quarterly = 5,
Yearly = 6,
Custom = 9

When specifying a custom resolution, you must include another parameter


CustomResolutionDuration for the resolution period (in seconds)

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.

The result is a JSON array of objects with the following format:

Field name Content Remarks


Time Time stamp for the historical data In yyyyMMddhhmmss format.
Data Array of sensor's data for the As describe in the next table
specified time

Sensor information for the history period:

Field name Content Remarks


Id Sensor unique id in ICC PRO
Average Sensor average value in
measurements units
Maximum Sensor maximum value in
measurements units
Minimum Sensor minimum value in
measurements units

37
Accumulations API

Get valves historical accumulations

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.

The fromdatetime, todatetime and resolution parameters are required.

Fromdatetime and todatetime are in the following format: yyyyMMddhhmmss

Resolution should have one of the following values:

All period = 0,
Hourly = 1,
Daily = 2,
Weekly = 3,
Monthly = 4,
Quarterly = 5,
Yearly = 6,
Custom = 9

When specifying a custom resolution, you must include another parameter


CustomResolutionDuration for the resolution period (in seconds)

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.

The result is a JSON array of objects with the following format:

Field name Content Remarks


Time Time stamp for the historical data In yyyyMMddhhmmss format.
Data Array of valve's accumulationdata As describe in the next table
for the specified time

Valve information for the history period:

Field name Content Remarks


Id Valve unique id in ICC PRO
WaterVolume Water volume in period. Liters
AccWaterVolume Accumulated water volume in Liters
period.
WaterTime Watering time in period Seconds
AccWaterTime Accumulated watering time in Seconds

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.

The fromdatetime, todatetime and resolution parameters are required.

Fromdatetime and todatetime are in the following format: yyyyMMddhhmmss

Resolution should have one of the following values:

All period = 0,
Hourly = 1,
Daily = 2,
Weekly = 3,
Monthly = 4,
Quarterly = 5,
Yearly = 6,
Custom = 9

When specifying a custom resolution, you must include another parameter


CustomResolutionDuration for the resolution period (in seconds)

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.

To specify a meters, use mid parameter, like this: mid=3

To specify a virtual meters, use vid parameter, like this: vid=2

The result is a JSON array of objects with the following format:

Field name Content Remarks


Time Time stamp for the historical data In yyyyMMddhhmmss format.
MetersData Array of meter's accumulation data As describe in the next table
for the specified time
VirtualMetersData Array of virtual meter's As describe in the next table
accumulation data for the specified
time

40
Meter information for the history period:

Field name Content Remarks


Id Meter or Virtual meter unique id in
ICC PRO
Volume Volume in period. Liters
AccVolume Accumulated volume in period. Liters

41

You might also like