Field Operations Endpoints
About
All HTTP methods should be prepended by this service's endpoint:
This service has the following endpoints available:
Description | Endpoints |
---|---|
Get all operations | GET /operations |
Get an operation | GET /operations/{id} |
Get an operation summary | GET /operations/{id}/summary |
Get an operation's images | GET /operations/{id}/images |
Get an operation's images V2 | GET /operations/{id}/imagesV2 |
Get an operation's units | GET /operations/{id}/units |
Reprocess an operation | POST /operations/{id}/reprocess |
For easily testing these endpoints, we recommend using our Postman collection.
Get all operations
 GET /operations
Gets a paged list of operations that belong to the current logged in user. It is possible to filter the results by passing some query parameters. They are listed below.
Parameter (to filter by) | Values |
---|---|
leafUserId | uuid of one of your users |
provider | CNHI , JohnDeere , Trimble , ClimateFieldView , AgLeader or Leaf |
startTime | ISO 8601 date. Returns operations from the startTime onward |
updatedTime | ISO 8601 date. Returns operations from the updatedTime onward |
endTime | ISO 8601 date. Returns operations until the endTime |
operationType | applied , planted , harvested or tillage |
fieldId | the field where the operation happened |
You can also pass some parameters used exclusively for paging through results. They are:
page
, an integer specifying the page being fetched (default is 0)size
, an integer specifying the size of the page (max is 100)
the default value for page size is 20
If the parameters page and size are not set, the endpoint will return 20 results.
- cURL
- Python
- JavaScript
Response
Get an operation
 GET /operations/{id}
Gets a single operation by its id.
- cURL
- Python
- JavaScript
Response
Get an operation summary
 GET /operations/{id}/summary
Gets the summary, if available, for the operation id.
- cURL
- Python
- JavaScript
Response
Here's a link with sample responses for "planted", "applied" and "harvested" operations.
Get an operation's images
 GET /operations/{id}/images
Gets a list of PNG images generated from the operation's properties.
- cURL
- Python
- JavaScript
- JSON Response
Get an operation's images V2
 GET /operations/{id}/imagesV2
Gets a list of PNG images generated from the operation's properties with improvements in the generation process. These images are based on the filteredGeojson.
- cURL
- Python
- JavaScript
- JSON Response
Get an operation's units
 GET /operations/{id}/units
Gets the operations's properties and their units.
- cURL
- Python
- JavaScript
- JSON Response
Crop operation by field
 POST /operations/cropOperationByField
This endpoint can be used to remove points from the operation standardGeojson that are outside of the field geometry.
- cURL
- Python
- JavaScript
Response
Returns a single JSON object:
You could monitor the processing status using the leafFileId
by our Alerts Service.
Reprocess an operation
 POST /operations/{id}/reprocess
Allows reprocessing an operation already created, starting from the merge step. The standardGeoJSON, filteredGeoJSON, summary and images will be updated.
- cURL
- Python
- JavaScript
You could monitor the processing status by our Alerts Service.
Alerts
With Alerts you can be notified when something happens or changes instead of needing to repeatedly query for changes. Leaf Alerts support events that happen within Leaf and events that happen within supported 3rd party software.
List of Operations Events
Leaf Operations Service can Alert you on these events: list of Operations Events