Athena IR-Tech Transp-IR
API Specification Doc
Revision | Date | Author | Description |
1.0 | 2023 May 30 | Buddhika Biyagama | Initial draft |
1.1 | 2023 Aug 17 | Revision | |
1.2 | 2023 Sep 5 | Jay Holata | Final Revision |
1.3 | 2023 Oct 26 | Buddhika | Add new endpoints |
Content
To access any of our API resources, you must provide the following header parameters. 4
Athena Organisational and Data Structure 5
https://api.staging.athenairtech.com/v1/site?uid=SI-APM 6
8. Create Block User inputs 14
11. Get Device Calculated Values 24
To access the API as a developer you’ll need to retrieve your customer’s unique Client ID from the Transp-IR dashboard of your customer. Only customers who have purchased the Precision level subscription will have a Client ID assigned to them.
To start, contact us and we’ll send you 2 things.
From this point, once the User Agreement has been signed and returned, you can begin to build an API integration with data coming through the Athena Staging environment. Beyond this, you’ll need to have the Athena Admin at your client confirm in writing (email is best) directly to admin@athenairtech.com that they approve the sharing of their data with you. They should include:
Once this written confirmation is received by Athena, you’ll be issued an additional API Key for the system/s that they own, which will enable you to extract their data for further use in line with the practices outlined in the User Agreement.
The URL for the production site is https://api.athenairtech.com
For testing, the URL for the staging environment where testing occurs is https://api.staging.athenairtech.com/v1
To access any of the API resources, you must first be authorized. This can be achieved using your client identifier and API Key to request a token.
Name | Required | Description |
x-client-id | required | Your unique client identifier |
x-api-key | required | Your API Key |
To paginate, you could provide the following header parameters.
Name | Required | Description |
x-limit | optional | Each request can contain up to 500 records |
x-next-page-key | optional | Response header x-next-page-key is used to fetch the next page of results. |
Athena has a defined structure for customers, their sites, blocks and related devices and seasonal data. Each customer is structured as follows:
Organisation - Customer company
Site A - A geographical location
Site B - 2nd location
Site C - xxx additional locations
Note: For organisations that are consultants that have multiple clients, the consultant is considered the organisation and each client is then considered a site.
Block 1 - Any area within a site that is usually a specific crop or cultivar or defined by a zoned irrigation valve.
Block 2 - 2nd block
Block 3 - n - additional blocks
Device 1 - Athena field units that record the data
Device 2 - 2nd device
Device 3 - n - additional devices in the block
This returns general information about a site. An organisation can have multiple geographical locations that are considered sites within Athena.
GET https://api.athenairtech.com/v1/site
Name | Required | Description |
uid string | required | Athena Site UID. Site UID is copied from the Transp-IR dashboard. To get the UID from the dashboard click on Sites . Click on the copy button next to the Site-UID for the site you are accessing. This same concept of UID and copying also exists in the dashboard for blocks and devices. |
If successful, the response body contains the information for the Site including the list of blocks in the site.
{
"address" : {
"state" : "South Australia",
"postal_code" : "5064",
"geolocation" : {
"lng" : "138.6338539",
"lat" : "-34.9687753"
},
"administrative_area_level_2" : "Mitcham",
"country_long_name" : "Australia",
"url" : "https://maps.google.com/?cid=1081768075369040080",
"address" : "Urrbrae SA 5064, Australia",
"administrative_area_level_2_long_name" : "City of Mitcham",
"administrative_area_level_1" : "SA",
"administrative_area_level_1_long_name" : "South Australia",
"postal_code_long_name" : "5064",
"country" : "AU",
"locality" : "Urrbrae",
"locality_long_name" : "Urrbrae"
},
"block" : [
{
"crop_variety" : "almond_sdad",
"block_season_year" : 2023,
"block_name" : "Almond Test Block",
"crop_species" : "almond",
"uid" : "BL-ASK"
},
{
"crop_variety" : "wine_grape_cabernet_sauvignon",
"block_season_year" : 2023,
"block_name" : "Grape Test Block",
"crop_species" : "wine_grape",
"uid" : "BL-ASJ"
},
{
"crop_variety" : "wine_grape_cabernet_sauvignon",
"block_season_year" : 2023,
"block_name" : "Citrus Test Block",
"crop_species" : "wine_grape",
"uid" : "BL-ASL"
}
],
"uid" : "SI-APM",
"time_zone" : "Australia/Adelaide",
"site_name" : "Demo Site"
}
Returns site user entered information for:
Only rainfall and notes are recorded at the site level as irrigation is specific to a block and grape sugar content is specific to those blocks that have a grape variety.
GET https://api.athenairtech.com/v1/site/readings
Name | Required | Description |
uid string | required | Athena site UID |
type date | required |
|
from date | required | Date format is “YYYY-MM-DD” |
to date | optional | Date format is “YYYY-MM-DD” |
GET /readings?uid=B_AVM&type=RFL&from=2023-07-15
If successful, the response body contains an array of data.
{
"data": [
{
"created_at": "2023-07-15T08:00:06.000+09:30",
"amount": 200, }]}
POST https://api.athenairtech.com/v1/site/readings
Name | Required | Description | |||||||||||||||
uid string | required | Athena site UID | |||||||||||||||
type date | required |
| |||||||||||||||
data array | required | RFL
NTE
| |||||||||||||||
POST site/readings
{
"uid": “SI-ASK”,
"type": “RFL”,
"data": [{
"created_at": “2023-10-26 14:30:00”
"amount": {
"value": 10,
"unit": ”mm”,
}
},
{
"created_at": “2023-10-27 14:30:00”
"amount": {
"value": 20,
"unit": ”mm”,
}
}
]
}
If successful, the response body contains a success response.
{status: “ok”}
Returns Block information.
GET https://api.athenairtech.com/v1/block
Name | Required | Description |
uid string | required | Athena block UID |
GET /block?uid=BL_AFG
If successful, the response body contains an instance of block.
{
"uid": "BL_AFG",
"site_name": "My Test Site",
"block_name": "Backyard",
"time_zone": "Australia/Adelaide",
"crop_variety": "wine_grape_shiraz",
"block_season_year": 2023,
},
Returns block user input for:
A separate request must be made for each type of information for the block.
GET https://api.athenairtech.com/v1/block/readings
Name | Required | Description |
uid string | required | Athena block UID |
type date | required | IRT - Irrigation GSC - Grape sugar content (only applies if crop is winegrape) NTE - Notes |
from date | required | Date format is “YYYY-MM-DD”. |
to date | optional | Date format is “YYYY-MM-DD” |
GET /readings?uid=BL_AVM&type=irrigation&from=2023-07-15
If successful, the response body contains an array of data.
{
"data": [
{
"created_at": "2023-07-15T08:00:06.000+09:30",
"amount": 200,
},
]}
POST https://api.athenairtech.com/v1/block/readings
Name | Required | Description | |||||||||||||||||||||||||||
uid string | required | Athena block UID | |||||||||||||||||||||||||||
type date | required |
| |||||||||||||||||||||||||||
data array | required | GSC
NTE
IRT (As depth)
IRT (As flow rate)
|
POST /block/readings
{
"uid": "BL-APU",
"type": "IRT",
"data": [
{
"created_at": "2023-10-27 14:30:00",
"amount": {
"value": 10,
"unit": "inc"
}
},
{
"created_at": "2023-10-28 14:30:00",
"duration": {
"value": 2,
"unit": "hr"
}
},
{
"created_at": "2023-10-29 14:30:00",
"duration": {
"start_time": "15:45:00",
"end_time": "17:45:00"
}
}
]
}
Response body
If successful, the response body contains a success response.
{status: “ok”}
Returns the following information about a device within a block
For each device the settings are also returned that govern how the data is displayed on the Crop Water Index graph. This information is found in the dashboard at Settings / CWI Thresholds.
Crop Water Index (CWI) - This is generated once a day and represents the blue line on the graph.
Chart Thresholds and Phenological Stages - Each crop has defined phenological stages with start and end dates as defined by the user. The green optimal plant water status zone on the CWI graph is represented by the thresholds in this section. Three “chart thresholds” are defined for each set of phenological stages. They are:
Below each set of chart thresholds are the names of the starting and ending phenological stages for the chart thresholds.
The next section of information is about the units of measure that are defined in the dashboard in Settings / Units for each attribute that is displayed on the graph. The following attributes have their units of measure definable by the user:
GET https://api.athenairtech.com/v1/device/
Name | Required | Description |
uid string | required | Athena block device UID |
GET device/?uid=BD_AVM
If successful, the response body contains the device metadata including settings that guide the display of the device information on the CWI graph and dashboard.
{
"geolocation" : {
"lng" : "138.45255",
"lat" : "-35.28148"
},
"uid" : "BD-AVR",
"variety_name" : "Cabernet Sauvignon",
"device_version" : "v1.0.0",
"site_name" : "Demo Site",
"block_name" : "Grape Test Block",
"season_start_date" : "2023-08-02T06:52:31.467+09:30",
"current_phenological_stage" : "budburst - flowering",
"species_uid" : "wine_grape",
"species_name" : "Wine Grape",
"variety_uid" : "wine_grape_cabernet_sauvignon",
"phenological_stages" : [
"budburst",
"flowering",
"veraison",
"harvest"
],
"installed_at" : "2023-08-02T09:30:00.000+09:30",
"properties" : {
"calculated" : [
{
"frequency" : "Once per day",
"thresholds" : [
{
"chart_thresholds" : [
"0.3",
"0.7",
"2.0"
],
"phenological_stages" : [
"budburst",
"flowering"
]
},
{
"chart_thresholds" : [
"0.3",
"0.45",
"0.65"
],
"phenological_stages" : [
"flowering",
"veraison"
]
},
{
"chart_thresholds" : [
"0.3",
"0.45",
"0.65"
],
"phenological_stages" : [
"veraison",
"harvest"
]
}
],
"attribute" : "cwi",
"description" : "Crop Water Index",
"unit" : ""
},
{
"frequency" : "Once per day",
"attribute" : "vpd",
"description" : "Vapor Pressure Deficit",
"unit" : "kPa"
}
],
"readings" : [
{
"frequency" : "Every 10 minutes from 8:00 AM to 8:00 PM",
"attribute" : "IR1AT",
"description" : "IR Sensor 1 Canopy Temperature",
"unit" : "°C"
},
{
"frequency" : "Every 10 minutes from 8:00 AM to 8:00 PM",
"attribute" : "IR2AT",
"description" : "IR Sensor 2 Canopy Temperature",
"unit" : "°C"
},
{
"frequency" : "Every 10 minutes from 8:00 AM to 8:00 PM",
"attribute" : "T_AMB",
"description" : "Ambient Temp",
"unit" : "°C"
},
{
"frequency" : "Every 10 minutes from 8:00 AM to 8:00 PM",
"attribute" : "RH",
"description" : "Ambient RH",
"unit" : "%"
},
{
"frequency" : "Every 10 minutes from 8:00 AM to 8:00 PM",
"attribute" : "vpd",
"description" : "Vapor Pressure Deficit",
"unit" : "kPa"
},
{
"frequency" : "Every 10 minutes from 8:00 AM to 8:00 PM",
"attribute" : "SOLAR_RAD",
"description" : "Solar Radiation",
"unit" : "lux"
}
]
},
"device_uid" : "352656103192616",
"season_year" : 2023,
"time_zone" : "Australia/Adelaide",
"name" : "Grape Test Unit"
}
Returns device readings (T_AMP, T_IR1….)
GET https://api.athenairtech.com/v1/device/readings
Name | Required | Description |
uid string | required | Athena block device UID |
from datetime | required | The beginning date/time for which you want the device readings. |
to datetime | optional | The ending date/time for which you want the device readings. If no ending date is provided, the default is to provide 24 hours of data. |
attributes string | optional | A comma-separated list of attribute names. If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result. The Device info API can be used to retrieve a list of available attribute names. |
GET /readings?uid=BD_AVM&from=2023-07-15
If successful, the response body contains an array of measurements
{
"data": [
{
"created_at": "2023-07-15T08:00:06.000+09:30",
"IR2AT": "11.5",
"IR1AT": "11.5",
"IR2OT": "11.0",
"IR1OT": "11.1",
"T_AMB": "11.2",
"RH": "81.5"
},
…
]}
Returns calculated values of a device (CWI, VPD)
GET https://api.athenairtech.com/v1/device/calculated
Name | Required | Description |
uid string | required | Athena block device UID |
from datetime | required | The beginning date/time for which you want the device readings. |
to datetime | optional | The ending date/time for which you want the device readings. If no ending date is provided, the default is to provide 24 hours of data. |
attributes string | optional | A comma-separated list of attribute names. If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result. The Device info API can be used to retrieve a list of available attribute names. |
GET /calculated?uid=BD_AVM&from=2023-07-15
If successful, the response body contains an array of data.
{
"data": [
{
"cwi": "1.67",
"vpd": "0.67"
},
...
]
}