Sample responses

Overview

This page shows and describes sample responses from Leaf API, along with a list of what properties you can expect for each type of data.

Field Operations

A Field Operation processed by Leaf's API returns a list of content that contains most of the basic info related to the authenticated user, and also the Field Boundaries and File Operations attached to each other by the background processing.

Here's an example of a Field Operation

{
"id": "uuid",
"apiOwnerUsername": "leaf@withleaf.io",
"leafUserId": "uuid",
"startTime": "yyyy-MM-ddTHH:mm:ss.SZ",
"endTime": "yyyy-MM-ddTHH:mm:ss.SZ",
"updatedTime": "yyyy-MM-ddTHH:mm:ss.SZ",
"type": "string",
"files": [
"uuid"
],
"fields": [
{
"id": "uuid",
"coverage": "float"
}
],
"providers": [
"string"
]
}

Field operations have many features that can be accessed via /featureName added to the base url, ranging from the standardized data to the operation units. Here's a sample response of each of these features.

Field Operations Standard Geojson

Here's an example of a standard geojson from a Field Operation

{
"standardGeojson": "URL"
}

Field Operations Summary

Here's an example of a summary from a Field Operation. It's important to mention that the output displayed in the Field Operation Summary is heavily impacted by the opeartionType property.

You can move through the four tabs below to see a sample of how Leaf returns each of the operation types.

{
"type": "Feature",
"properties": {
"totalDistance": {
"value": 33277.419952513315,
"unit": "ft"
},
"speed": {
"avg": 4.297550131597641,
"min": 0.0,
"max": 7.842694282531738,
"unit": "mi/hr"
},
"startTime": "2015-10-06T23:51:23.040+00:00",
"endTime": "2015-10-07T17:09:26.040+00:00",
"totalArea": {
"value": 58926.234671233884,
"unit": "m2"
},
"elevation": {
"avg": 165.5691147167663,
"min": 58.6,
"max": 195.3,
"unit": "ft"
},
"crop": [
"corn"
],
"operationType": "harvested",
"wetMass": {
"avg": 11.810479659859125,
"min": 0.031766114277891125,
"max": 58.95,
"unit": "lb"
},
"totalWetMass": {
"value": 165960.86018034007,
"unit": "lb"
},
"wetMassPerArea": {
"avg": 11397.635987349213,
"min": 189.17227229135673,
"max": 646492.91259439,
"unit": "lb/ac"
},
"wetVolume": {
"avg": 0.21090142249748436,
"min": 5.672520406766272E-4,
"max": 1.0526785714285716,
"unit": "bu"
},
"totalWetVolume": {
"value": 2963.5867889346546,
"unit": "bu"
},
"wetVolumePerArea": {
"avg": 203.5292140598074,
"min": 3.3780762909170847,
"max": 11544.516296328393,
"unit": "bu/ac"
},
"harvestMoisture": {
"avg": 15.38852974665528,
"min": 6.05,
"max": 18.16,
"unit": "percentage"
},
"varieties": [
{
"harvestMoisture": {
"avg": 15.38852974665528,
"min": 6.05,
"max": 18.16,
"unit": "percentage"
},
"wetMass": {
"value": 165960.86018034007,
"unit": "lb"
},
"wetMassPerArea": {
"value": 2.816417188477808,
"unit": "lb/ac"
},
"wetVolume": {
"value": 2963.5867889346546,
"unit": "bu"
},
"area": {
"value": 58926.234671233884,
"unit": "m2"
},
"name": "Corn"
}
],
"machinery": [
{
"name": "Case IH Corn Head 20.000010800000002ft 8row",
"type": "implement",
"brand": "Case IH"
},
{
"name": "Case IH 8120",
"type": "machine",
"serialNumber": "8000001",
"brand": "Case IH"
},
{
"name": "Case IH Corn Head 20ft 12row",
"type": "implement",
"brand": "Case IH"
},
{
"name": "Case IH X120 Series 8120",
"type": "machine",
"serialNumber": "8220490",
"brand": "Case IH"
}
]
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [[[
[-89.80434894561768,40.47791686563837],
[-89.80756759643555,40.4757623387113],
[-89.80746030807495,40.47302011353734],
[-89.80475664138794,40.47070219301965],
[-89.80080842971802,40.47068586935202],
[-89.79797601699828,40.472709973879255],
[-89.7978687286377,40.47569704893722],
[-89.80117321014404,40.47808008455794],
[-89.80434894561768,40.47791686563837]
]]]
}
}

Field Operations Images

Here is an example of Images from Field Operations.

[
{
"property": "string",
"ramp" : {
"0%" : [ 200, 0, 0 ],
"35%" : [ 255, 40, 0 ],
"45%" : [ 255, 150, 0 ],
"55%" : [ 255, 240, 0 ],
"65%" : [ 0, 230, 0 ],
"75%" : [ 0, 190, 0 ],
"100%" : [ 0, 130, 0 ],
"nv" : [ 0, 0, 0, 0 ]
}
"url": "URL"
}
]

Field Operations Units

Here is an example of Units from the numerical properties of the Field Operations.

{
"elevation": "ft",
"area": "m2",
"harvestMoisture": "percentage",
"equipmentWidth": "ft",
"distance": "ft",
"heading": "arcdeg",
"wetVolume": "bu",
"wetVolumePerArea": "bu/ac",
"wetMass": "lb",
"wetMassPerArea": "lb/ac",
"speed": "mi/hr"
}