Skip to main content
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

MethodPathDescription
GET/operationsGet all field operations
GET/operations/{id}Get a field operation
GET/operations/{id}/summaryGet operation summary
GET/operations/{id}/standardGeojsonGet operation standardGeojson
GET/operations/{id}/standardGeoparquetGet operation standardGeoParquet
GET/operations/{id}/filteredGeojsonGet operation filteredGeojson
GET/operations/{id}/filteredGeoparquetGet operation filteredGeoParquet
GET/operations/{id}/imagesV2Get operation images
GET/operations/{id}/geotiffImagesGet operation geotiff images
GET/operations/{id}/unitsGet operation units
GET/operations/{id}/machinesGet operation machines
GET/operations/{id}/implementsGet operation implements
GET/operations/{id}/operatorsGet operation operators
GET/operations/{id}/sessionsGet operation sessions
POST/operations/cropOperationByFieldCrop operation by field
POST/operations/reprocessReprocess field operations by field
POST/operations/{id}/reprocessReprocess an operation
GET/operations/{id}/filesGet files from an operation

Get all field operations

GET /operations Returns a paginated list of field operations for the authenticated API owner.

Parameters

ParameterTypeDescription
leafUserIdstringUUID of a Leaf user
providerstringCNHI, JohnDeere, Trimble, ClimateFieldView, AgLeader, Stara, Panorama, or Leaf
startTimestringISO 8601 timestamp. Returns operations starting on or after this time
updatedTimestringISO 8601 timestamp. Returns operations updated on or after this time
endTimestringISO 8601 timestamp. Returns operations ending on or before this time
operationTypestringapplied, planted, harvested, or tillage
fieldIdstringUUID of the field where the operation occurred
fileIdstringUUID of a machine file associated with the operation
zoneIdstringUUID of a zone associated with the operation
standardbooleanFilter by whether the operation has a standardGeojson
pageintegerPage number (default 0)
sizeintegerPage size (max 100)
sortstringSort 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

ParameterTypeDescription
idpathUUID 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

ParameterTypeDescription
idpathUUID 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

ParameterTypeDescription
idpathUUID 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

ParameterTypeDescription
idpathUUID 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

ParameterTypeDescription
idpathUUID 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

ParameterTypeDescription
idpathUUID 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

ParameterTypeDescription
idpathUUID 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

ParameterTypeDescription
idpathUUID 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

ParameterTypeDescription
idpathUUID 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

ParameterTypeDescription
idpathUUID 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

ParameterTypeDescription
idpathUUID 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

ParameterTypeDescription
idpathUUID 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

ParameterTypeDescription
idpathUUID 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

{
  "id": "operationId"
}

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

ParameterTypeDescription
idpathUUID 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

ParameterTypeDescription
idpathUUID of the operation
pageintegerPage number (default 0)
sizeintegerPage size (max 100)
sortstringSort order (e.g., id,desc)

Request

curl -X GET \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  'https://api.withleaf.io/services/operations/api/operations/{id}/files'
Last modified on March 19, 2026