Use the operations endpoints to list and inspect Leaf’s merged field operations after machine files have been converted and allocated to field boundaries. This page covers operation retrieval, summaries, GeoJSON and GeoParquet outputs, images, units, and reprocessing.
For conceptual background, see Field Operations.
Base URL
https://api.withleaf.io/services/operations/api
Endpoints
| Method | Path | Description |
|---|
| GET | /operations | Get all field operations |
| GET | /operations/{id} | Get a field operation |
| GET | /operations/{id}/summary | Get operation summary |
| GET | /operations/{id}/standardGeojson | Get operation standardGeojson |
| GET | /operations/{id}/standardGeoparquet | Get operation standardGeoParquet |
| GET | /operations/{id}/filteredGeojson | Get operation filteredGeojson |
| GET | /operations/{id}/filteredGeoparquet | Get operation filteredGeoParquet |
| GET | /operations/{id}/imagesV2 | Get operation images |
| GET | /operations/{id}/geotiffImages | Get operation geotiff images |
| GET | /operations/{id}/units | Get operation units |
| GET | /operations/{id}/machines | Get operation machines |
| GET | /operations/{id}/implements | Get operation implements |
| GET | /operations/{id}/operators | Get operation operators |
| GET | /operations/{id}/sessions | Get operation sessions |
| POST | /operations/cropOperationByField | Crop operation by field |
| POST | /operations/reprocess | Reprocess field operations by field |
| POST | /operations/{id}/reprocess | Reprocess an operation |
| GET | /operations/{id}/files | Get files from an operation |
Get all field operations
GET /operations
Returns a paginated list of field operations for the authenticated API owner.
Parameters
| Parameter | Type | Description |
|---|
leafUserId | string | UUID of a Leaf user |
provider | string | CNHI, JohnDeere, Trimble, ClimateFieldView, AgLeader, Stara, Panorama, or Leaf |
startTime | string | ISO 8601 timestamp. Returns operations starting on or after this time |
updatedTime | string | ISO 8601 timestamp. Returns operations updated on or after this time |
endTime | string | ISO 8601 timestamp. Returns operations ending on or before this time |
operationType | string | applied, planted, harvested, or tillage |
fieldId | string | UUID of the field where the operation occurred |
fileId | string | UUID of a machine file associated with the operation |
zoneId | string | UUID of a zone associated with the operation |
standard | boolean | Filter by whether the operation has a standardGeojson |
page | integer | Page number (default 0) |
size | integer | Page size (max 100) |
sort | string | Sort order. Valid fields: id, leafUserId, startTime, endTime, type, updatedTime. Append ,asc or ,desc |
The default page size is 20 when page and size are not set.
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/operations/api/operations?leafUserId=UUID'
Response
[
{
"id": "5c8fdb34-4dc4-4b96-bfd5-53e6206ce971",
"apiOwnerUsername": "test",
"leafUserId": "7494c90e-28b8-4bb2-9ede-95c1cc894349",
"startTime": "2015-04-18T19:31:27Z",
"endTime": "2015-04-18T19:58:50Z",
"updatedTime": "2021-08-24T16:00:15.062Z",
"type": "planted",
"files": ["a10b85c2-ac2e-4b0f-8e65-74edbd2ca53e"],
"fields": [{ "id": "0071484f-4a75-4190-9fd0-f5995d241c2c" }],
"providers": ["providerName"]
}
]
Get a field operation
GET /operations/{id}
Returns a single field operation by its UUID.
Parameters
| Parameter | Type | Description |
|---|
id | path | UUID of the operation |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/operations/api/operations/{id}'
Response
{
"id": "5c8fdb34-4dc4-4b96-bfd5-53e6206ce971",
"apiOwnerUsername": "test",
"leafUserId": "7494c90e-28b8-4bb2-9ede-95c1cc894349",
"startTime": "2015-04-18T19:31:27Z",
"endTime": "2015-04-18T19:58:50Z",
"updatedTime": "2021-08-24T16:00:15.062Z",
"type": "planted",
"files": ["a10b85c2-ac2e-4b0f-8e65-74edbd2ca53e"],
"fields": [{ "id": "0071484f-4a75-4190-9fd0-f5995d241c2c" }],
"providers": ["providerName"]
}
Get operation summary
GET /operations/{id}/summary
Returns the GeoJSON summary for a field operation. The summary contains aggregated statistics such as area, elevation, speed, and operation-specific properties (e.g., seed rate, applied rate, yield).
Parameters
| Parameter | Type | Description |
|---|
id | path | UUID of the operation |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/operations/api/operations/{id}/summary'
Get operation standardGeojson
GET /operations/{id}/standardGeojson
Returns a URL to the standardGeojson file for the operation. This file contains all data points in Leaf’s standardized schema.
Parameters
| Parameter | Type | Description |
|---|
id | path | UUID of the operation |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/operations/api/operations/{id}/standardGeojson'
Response
{
"downloadStandardGeojson": "URL"
}
Get operation standardGeoParquet
GET /operations/{id}/standardGeoparquet
Returns a URL to the standard GeoParquet file for the operation.
You must enable the enableGeoparquetOutput configuration to use this endpoint.
Parameters
| Parameter | Type | Description |
|---|
id | path | UUID of the operation |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/operations/api/operations/{id}/standardGeoparquet'
Response
{
"downloadStandardGeoparquet": "URL"
}
Get operation filteredGeojson
GET /operations/{id}/filteredGeojson
Returns a URL to the filteredGeojson file for the operation. This file contains data points after Leaf applies statistical outlier removal.
You must enable the operationsFilteredGeojson configuration to use this endpoint.
Parameters
| Parameter | Type | Description |
|---|
id | path | UUID of the operation |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/operations/api/operations/{id}/filteredGeojson'
Response
{
"filteredGeojson": "URL",
"downloadFilteredGeoJson": "URL"
}
Get operation filteredGeoParquet
GET /operations/{id}/filteredGeoparquet
Returns a URL to the filtered GeoParquet file for the operation.
You must enable both operationsFilteredGeojson and enableGeoparquetOutput configurations to use this endpoint.
Parameters
| Parameter | Type | Description |
|---|
id | path | UUID of the operation |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/operations/api/operations/{id}/filteredGeoparquet'
Response
{
"downloadFilteredGeoparquet": "URL"
}
Get operation images
GET /operations/{id}/imagesV2
Returns improved PNG images based on the filteredGeojson. Each image includes a quantile-classified legend with 7 color-coded ranges and an extent for map plotting.
Parameters
| Parameter | Type | Description |
|---|
id | path | UUID of the operation |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/operations/api/operations/{id}/imagesV2'
Response
[
{
"property": "elevation",
"legend": {
"ranges": [
{ "colorCode": "#C80000", "min": 0, "max": 20 },
{ "colorCode": "#FF2800", "min": 20, "max": 50 },
{ "colorCode": "#FF9600", "min": 50, "max": 100 },
{ "colorCode": "#FFF000", "min": 100, "max": 250 },
{ "colorCode": "#00E600", "min": 250, "max": 340 },
{ "colorCode": "#00BE00", "min": 340, "max": 480 },
{ "colorCode": "#008200", "min": 480, "max": 570 }
]
},
"extent": { "xmin": 0, "xmax": 0, "ymin": 0, "ymax": 0 },
"url": "URL",
"downloadUrl": "URL"
}
]
Get operation geotiff images
GET /operations/{id}/geotiffImages
Returns a list of GeoTIFF images generated from the operation’s properties based on the filteredGeojson.
Parameters
| Parameter | Type | Description |
|---|
id | path | UUID of the operation |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/operations/api/operations/{id}/geotiffImages'
Response
[
{
"property": "dryMassPerArea",
"url": "URL",
"downloadUrl": "URL"
}
]
Get operation units
GET /operations/{id}/units
Returns the property-to-unit mapping for the operation. Properties vary by operation type but use standardized keys across providers.
Parameters
| Parameter | Type | Description |
|---|
id | path | UUID of the operation |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/operations/api/operations/{id}/units'
Get operation machines
GET /operations/{id}/machines
Returns the UUIDs of machines used in the operation. Use the Assets endpoints to fetch full machine details.
Parameters
| Parameter | Type | Description |
|---|
id | path | UUID of the operation |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/operations/api/operations/{id}/machines'
Response
{
"machines": [
"77385069-7666-4867-8d72-72c2584e2b4e",
"baad537c-69e3-4d86-a99b-92d5b716b574"
]
}
Get operation implements
GET /operations/{id}/implements
Returns the UUIDs of implements used in the operation. Use the Assets endpoints to fetch full implement details.
Parameters
| Parameter | Type | Description |
|---|
id | path | UUID of the operation |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/operations/api/operations/{id}/implements'
Response
{
"implements": [
"1190bc0d-e94c-407a-8aba-ac4c6a1cd29b"
]
}
Get operation operators
GET /operations/{id}/operators
Returns the UUIDs of operators who performed the operation. Use the Assets endpoints to fetch full operator details.
Parameters
| Parameter | Type | Description |
|---|
id | path | UUID of the operation |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/operations/api/operations/{id}/operators'
Response
{
"operators": [
"f2f4723a-2bfe-472b-b6f7-7874c8500208"
]
}
Get operation sessions
GET /operations/{id}/sessions
Returns compiled session data grouped by machine, with session time ranges, operator data, and covered area for each session in the operation.
Requires the enableOperationsSession configuration. Currently available for John Deere operations only.
Parameters
| Parameter | Type | Description |
|---|
id | path | UUID of the operation |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/operations/api/operations/{id}/sessions'
Response
[
{
"machineId": "uuid",
"serialNumber": "SERIALNUMBER001",
"sessions": [
{
"id": "sessionId",
"startTime": "2023-11-29T11:03:42",
"endTime": "2023-11-29T20:58:36",
"operator": { "id": "operatorId", "name": "Operator A" },
"area": { "value": 18.215, "unit": "ha" }
}
]
}
]
Crop operation by field
POST /operations/cropOperationByField
Removes data points from the operation standardGeojson that fall outside the associated field boundary. Processing is asynchronous.
Request body
Request
curl -X POST \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"id": "operationId"}' \
'https://api.withleaf.io/services/operations/api/operations/cropOperationByField'
Response
{
"id": "1162a1c6-9872-4d7f-9833-5d48add8eed4",
"message": "Sent operation to be processed.",
"leafFileId": "33020f03-5889-4c0f-b465-7a7e2c03a91d"
}
Use the leafFileId with the Alerts service to monitor processing status.
Reprocess field operations by field
POST /operations/reprocess
Reprocesses field operations for one field and Leaf user. When overwrite is true, Leaf removes the existing operations for that field before regenerating them.
Request body
{
"leafUserId": "uuid",
"fieldId": "uuid",
"overwrite": true
}
Request
curl -X POST \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"leafUserId":"uuid","fieldId":"uuid","overwrite":true}' \
'https://api.withleaf.io/services/operations/api/operations/reprocess'
Response
{
"totalFiles": 42,
"message": "Sending files to create automerge and operations based on field"
}
Reprocess an operation
POST /operations/{id}/reprocess
Reprocesses an existing field operation starting from the merge step. The standardGeoJSON, filteredGeoJSON, summary, and images are regenerated.
Parameters
| Parameter | Type | Description |
|---|
id | path | UUID of the operation |
Request
curl -X POST \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/operations/api/operations/{id}/reprocess'
Use the Alerts service to monitor the reprocessing status.
Get files from an operation
GET /operations/{id}/files
Returns the machine files that were aggregated to produce the field operation.
Parameters
| Parameter | Type | Description |
|---|
id | path | UUID of the operation |
page | integer | Page number (default 0) |
size | integer | Page size (max 100) |
sort | string | Sort order (e.g., id,desc) |
Request
curl -X GET \
-H 'Authorization: Bearer YOUR_TOKEN' \
'https://api.withleaf.io/services/operations/api/operations/{id}/files'