Documentation Index
Fetch the complete documentation index at: https://docs.withleaf.io/llms.txt
Use this file to discover all available pages before exploring further.
Use these endpoints to retrieve irrigation equipment, applied irrigation records, and field irrigation data from Lindsay and Valley systems connected through a Leaf user.
For conceptual background, see Irrigation Overview.
Base URL
https://api.withleaf.io/services/irrigation/api
Endpoints
| Endpoint | Method | Path |
|---|
| Get all irrigation equipment | GET | /users/{leafUserId}/irrigation-equipment |
| Get an irrigation equipment | GET | /users/{leafUserId}/irrigation-equipment/{id} |
| Get as-applied irrigation | GET | /users/{leafUserId}/irrigation/applied-irrigation |
| Get an irrigation activity | GET | /users/{leafUserId}/irrigation/applied-irrigation/{id} |
| Get an irrigation activity standard GeoJSON | GET | /users/{leafUserId}/irrigation/applied-irrigation/{id}/standardGeojson |
| Get an irrigation activity units | GET | /users/{leafUserId}/irrigation/applied-irrigation/{id}/units |
| Get all irrigated fields | GET | /users/{leafUserId}/irrigation/fields |
| Get an irrigated field | GET | /users/{leafUserId}/irrigation/fields/{fieldId} |
| Get an irrigated field activity | GET | /users/{leafUserId}/irrigation/fields/{fieldId}/irrigated/{id} |
| Get an irrigated field activity standard GeoJSON | GET | /users/{leafUserId}/irrigation/fields/{fieldId}/irrigated/{id}/standardGeojson |
| Get an irrigated field activity units | GET | /users/{leafUserId}/irrigation/fields/{fieldId}/irrigated/{id}/units |
Equipment
Get all irrigation equipment
GET /users/{leafUserId}/irrigation-equipment
Lists all irrigation system equipment available for a given Leaf user.
Parameters
| Parameter | Type | Description |
|---|
leafUserId | path (UUID) | The Leaf user ID. |
providerEquipmentId | string | Filter by the equipment ID on the provider side. |
provider | string | Filter by provider (Lindsay or Valley). |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/irrigation/api/users/{leafUserId}/irrigation-equipment?provider=Lindsay'
Response
[
{
"id": "uuid",
"providerEquipmentId": "uuid",
"provider": "Lindsay",
"name": "HHD 700C",
"type": "pivot",
"pivotLength": {
"value": 0.0,
"unit": "m"
},
"endgunLength": {
"value": 0.0,
"unit": "m"
},
"pivotRuntime": {
"value": 0.0,
"unit": "hr"
},
"brand": "unknown",
"originalEquipmentData": {
"equipmentType": "",
"equipmentSubType": ""
}
}
]
Get an irrigation equipment
GET /users/{leafUserId}/irrigation-equipment/{id}
Returns a single irrigation equipment record by ID.
Parameters
| Parameter | Type | Description |
|---|
leafUserId | path (UUID) | The Leaf user ID. |
id | path (UUID) | The equipment ID. |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/irrigation/api/users/{leafUserId}/irrigation-equipment/{id}'
Response
Returns a single equipment object (same shape as the objects in the Get all irrigation equipment response).
Applied Irrigation
Get as-applied irrigation
GET /users/{leafUserId}/irrigation/applied-irrigation
Lists all irrigation activities from supported providers, summarized by day.
Parameters
| Parameter | Type | Description |
|---|
leafUserId | path (UUID) | The Leaf user ID. |
provider | string | Filter by provider (Lindsay or Valley). |
startTime | string (ISO 8601) | Return irrigation data from this timestamp onward. |
endTime | string (ISO 8601) | Return irrigation data up to this timestamp. |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/irrigation/api/users/{leafUserId}/irrigation/applied-irrigation?provider=Lindsay&startTime=2024-01-01T00:00:00Z&endTime=2024-01-31T23:59:59Z'
Response
[
{
"id": "uuid",
"provider": "Lindsay",
"standardGeojson": "url.json",
"downloadStandardGeojson": "url.json",
"leafUserId": "uuid",
"apiOwnerUsername": "apiowner@withleaf.io",
"summary": {
"type": "Feature",
"properties": {
"depth": {
"avg": 4.87,
"sum": 28.36,
"min": 2.53,
"max": 7.49,
"unit": "mm"
},
"totalArea": {
"value": 52.72,
"unit": "ha"
},
"totalVolume": {
"value": 1604.7,
"unit": "L"
},
"totalPowerOn": {
"value": 16.7,
"unit": "hr"
}
},
"geometry": {}
},
"equipment": [
{
"id": "uuid",
"name": "My Pivot",
"type": "pivot",
"providerEquipmentId": "d0245010-157d-4988-96a2-5f3637098475"
}
],
"createdTime": "2024-03-04T00:31:25.497Z",
"startTime": "2024-01-07T00:00:00Z",
"endTime": "2024-01-07T23:59:59Z"
}
]
Get an irrigation activity
GET /users/{leafUserId}/irrigation/applied-irrigation/{id}
Returns a single as-applied irrigation activity by ID.
Parameters
| Parameter | Type | Description |
|---|
leafUserId | path (UUID) | The Leaf user ID. |
id | path (UUID) | The irrigation activity ID. |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/irrigation/api/users/{leafUserId}/irrigation/applied-irrigation/{id}'
Response
Returns a single irrigation activity object (same shape as the objects in the Get as-applied irrigation response).
Get an irrigation activity standard GeoJSON
GET /users/{leafUserId}/irrigation/applied-irrigation/{id}/standardGeojson
Returns the standard GeoJSON links for a single irrigation activity.
Parameters
| Parameter | Type | Description |
|---|
leafUserId | path (UUID) | The Leaf user ID. |
id | path (UUID) | The irrigation activity ID. |
Response
{
"standardGeojson": "url.json",
"downloadStandardGeojson": "url.json"
}
Get an irrigation activity units
GET /users/{leafUserId}/irrigation/applied-irrigation/{id}/units
Returns the units used by a single irrigation activity.
Parameters
| Parameter | Type | Description |
|---|
leafUserId | path (UUID) | The Leaf user ID. |
id | path (UUID) | The irrigation activity ID. |
Response
{
"depth": "mm",
"area": "ha",
"volume": "L"
}
Irrigated Fields
Get all irrigated fields
GET /users/{leafUserId}/irrigation/fields
Lists all fields that have received irrigation.
Parameters
| Parameter | Type | Description |
|---|
leafUserId | path (UUID) | The Leaf user ID. |
equipmentId | string (UUID) | Filter by Leaf equipment ID. |
startTime | string (ISO 8601) | Return irrigation data from this timestamp onward. |
endTime | string (ISO 8601) | Return irrigation data up to this timestamp. |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/irrigation/api/users/{leafUserId}/irrigation/fields?equipmentId={equipmentId}&startTime=2024-01-01T00:00:00Z&endTime=2024-01-31T23:59:59Z'
Response
[
{
"fieldId": "95eb7d79-b93d-4fc2-877a-3f2b366f8beb",
"lastIrrigationTime": "2024-02-18T23:59:59.000000Z"
}
]
Get an irrigated field
GET /users/{leafUserId}/irrigation/fields/{fieldId}
Returns the irrigation records associated with a single field.
Parameters
| Parameter | Type | Description |
|---|
leafUserId | path (UUID) | The Leaf user ID. |
fieldId | path (UUID) | The field ID. |
irrigationId | string (UUID) | Filter by as-applied irrigation ID. |
provider | string | Filter by provider (Lindsay or Valley). |
startTime | string (ISO 8601) | Return irrigation data from this timestamp onward. |
endTime | string (ISO 8601) | Return irrigation data up to this timestamp. |
This endpoint relies on existing field boundaries for the Leaf user. Valley does not provide field boundaries, and Lindsay requires the FieldNET Advisor product to make them available.
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/irrigation/api/users/{leafUserId}/irrigation/fields/{fieldId}?provider=Lindsay&startTime=2024-01-01T00:00:00Z&endTime=2024-01-31T23:59:59Z'
Response
[
{
"id": "uuid",
"fieldId": "uuid",
"irrigationId": ["uuid"],
"provider": "Lindsay",
"standardGeojson": "url.json",
"downloadStandardGeojson": "url.json",
"leafUserId": "uuid",
"apiOwnerUsername": "apiowner@withleaf.io",
"summary": {
"type": "Feature",
"properties": {
"depth": {
"avg": 4.87,
"sum": 28.36,
"min": 2.53,
"max": 7.49,
"unit": "mm"
},
"totalArea": {
"value": 49.48,
"unit": "ha"
},
"totalVolume": {
"value": 1604.7,
"unit": "L"
},
"totalPowerOn": {
"value": 16.7,
"unit": "hr"
},
"coverage": {
"value": 81.51,
"unit": "percentage"
}
},
"geometry": {}
},
"equipment": [
{
"id": "uuid",
"name": "My Pivot",
"type": "pivot",
"providerEquipmentId": "d0245010-157d-4988-96a2-5f3637098475"
}
],
"createdTime": "2024-03-04T00:31:25.497Z",
"startTime": "2024-01-07T00:00:00Z",
"endTime": "2024-01-07T23:59:59Z"
}
]
Get an irrigated field activity standard GeoJSON
GET /users/{leafUserId}/irrigation/fields/{fieldId}/irrigated/{id}/standardGeojson
Returns the standard GeoJSON links for a single irrigated field activity.
Parameters
| Parameter | Type | Description |
|---|
leafUserId | path (UUID) | The Leaf user ID. |
fieldId | path (UUID) | The field ID. |
id | path (UUID) | The irrigation activity ID. |
Response
{
"standardGeojson": "url.json",
"downloadStandardGeojson": "url.json"
}
Get an irrigated field activity units
GET /users/{leafUserId}/irrigation/fields/{fieldId}/irrigated/{id}/units
Returns the units used by a single irrigated field activity.
Parameters
| Parameter | Type | Description |
|---|
leafUserId | path (UUID) | The Leaf user ID. |
fieldId | path (UUID) | The field ID. |
id | path (UUID) | The irrigation activity ID. |
Response
{
"depth": "mm",
"area": "ha",
"volume": "L"
}
Get an irrigated field activity
GET /users/{leafUserId}/irrigation/fields/{fieldId}/irrigated/{id}
Returns a single irrigation activity record associated with the specified field.
Parameters
| Parameter | Type | Description |
|---|
leafUserId | path (UUID) | The Leaf user ID. |
fieldId | path (UUID) | The field ID. |
id | path (UUID) | The irrigation activity ID. |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/irrigation/api/users/{leafUserId}/irrigation/fields/{fieldId}/irrigated/{id}'
Response
{
"id": "uuid",
"fieldId": "uuid",
"irrigationId": ["uuid"],
"provider": "Lindsay",
"standardGeojson": "url.json",
"downloadStandardGeojson": "url.json",
"leafUserId": "uuid",
"apiOwnerUsername": "apiowner@withleaf.io",
"summary": {
"type": "Feature",
"properties": {
"depth": {
"avg": 4.87,
"sum": 28.36,
"min": 2.53,
"max": 7.49,
"unit": "mm"
},
"totalArea": {
"value": 49.48,
"unit": "ha"
},
"totalVolume": {
"value": 1604.7,
"unit": "L"
},
"totalPowerOn": {
"value": 16.7,
"unit": "hr"
},
"coverage": {
"value": 81.51,
"unit": "percentage"
}
},
"geometry": {}
},
"equipment": [
{
"id": "uuid",
"name": "My Pivot",
"type": "pivot",
"providerEquipmentId": "d0245010-157d-4988-96a2-5f3637098475"
}
],
"createdTime": "2024-03-04T00:31:25.497Z",
"startTime": "2024-01-07T00:00:00Z",
"endTime": "2024-01-07T23:59:59Z"
}