Manual File Upload Endpoints
About
All HTTP methods should be prepended by this service's endpoint:
This service has the following endpoints available:
| Description | Endpoints |
|---|---|
| Upload a file | POST /batch |
| Get a batch | GET /batch/{id} |
| Get all batches | GET /batch |
| Retry a batch | PUT /batch/{id}/retry |
| Get Batch Files Status | GET /batch/{id}/status |
To easily test these endpoints, we recommend using our Postman collection.
requires Leaf User
You will need a Leaf User to manually upload files. If you don't have a Leaf User, see the Leaf user overview
Upload a file
 POST /batch
Creates a new file in Leaf. The file must be sent as a zip.
This endpoint accepts a .zip of operation files, detects which files are in the .zip, and returns the ID of the process, which can in turn be used to retrieve the ID's of the files being processed.
File size limit of 3 GB
Currently, our upload endpoints accepts files with the maximum size limited to 3 gigabytes.
This endpoint receives two required URL parameters, a leafUserId and provider
A provider can be set as one of the following:
If provider is set to "Other", Leaf will detect which files are present in the .zip file and process them accordingly.
Leaf will detect files present in the uploaded .zip and create file ids for the files that are detected in the uploaded .zip. These files can then be accessed individually by their file ID, batch ID, or their associated field boundary.
Expected file structures from each provider are listed below. Very often these default file structures are edited by users. In these cases Leaf attempts to automatically repair the file structure and find all necessary files within any uploaded .zip.
The following file formats from each provider are supported:
JohnDeere
| File Format | Monitor Model | Details |
|---|---|---|
| GS2 | GreenStar 2 – 2600 | /RCD/*.fdd, *.fdl |
| GS3 | GreenStar 3 – 2630 | /GS3_2630/profile/RCD/EIC/global.ver |
| Gen4 | Gen 4 - 4600/4630 | /JD-Data/log/*.jdl |
| Shapefile | Exported from MyJohnDeere | Shapefile with extra metadata in a .json file |
Climate FieldView
| File Format | Monitor Model | Details |
|---|---|---|
| dat | 20|20 SeedSense Gen 1 and Gen 2 | A zip with .dat files |
| 2020 | 20|20 SeedSense Gen 3 | A zip with .2020 files |
CNHI
| File Format | Monitor Model | Details |
|---|---|---|
| CN1 | Case IH Pro 700 / New Holland IntelliView IV | <name>.cn1/index.vy1 |
| ISOXML | Case IH Pro 1200 / New Holland IntelliView 12 | /TASKDATA/TASKDATA.XML |
AgLeader
| File Format | Monitor Model | Details |
|---|---|---|
| yld | YM2000, PF Advantage & other OEM systems | A zip with .yld files |
| ilf | INTEGRA / Insight / Edge | A zip with .ilf files |
| agdata | INTEGRA / VERSA / COMPASS | A zip with .agdata and .agsetup files |
Trimble
| File Format | Monitor Model | Details |
|---|---|---|
| AgData | FMX and CFX monitors | /AgData/ |
| AgGPS | TMX and GFX monitors | /AgGPS/ (shapefile-based) |
Precision Planting
| File Format | Monitor Model | Details |
|---|---|---|
| dat | 20|20 SeedSense Gen 1 and Gen 2 | A zip with .dat files |
| PP2020 | 20|20 SeedSense Gen 3 | A zip with .2020 files |
Raven Slingshot
| File Format | Monitor Model | Details |
|---|---|---|
| FMIS | Raven FMIS | A zip with .xml and .tab files |
| JDP | Raven JDP | A zip with .jdp files |
ISOXML
| File Format | Supported Brands | Details |
|---|---|---|
| ISOXML | CLAAS, Kuhn, Kverneland Group, Müller-Elektronik, Teknomika, Topcon | /TASKDATA/ with *.XML and *.bin |
Farmobile
| File Format | Details |
|---|---|
| GeoJSON | GeoJSON files exported from Farmobile. Since GeoJSON files do not contain information on the units used, we assume the default units from Farmobile are being used. |
Other
| File Format | Details |
|---|---|
| Shapefile | Shapefiles exported from SMS, Raven Slingshot, and Topcon. Since Shapefiles do not contain information on the units used, we assume the default units from the provider will be used. |
For detailed file structure requirements, preparation guidelines, and shapefile column mappings, see Supported File Formats.
Request examples
- cURL
- Python
- JavaScript
Response
This id can then be queried to retrieve on Get batch to get the individual file ID's.
Then you can query each of the files individually with
Get a File or all of them, filtering by batchId, on
Get all Files.
Batch status
The status key will evolve accordingly to the following states:
| Status | Description |
|---|---|
| RECEIVED | Is the default state for every batch created |
| PROCESSED | When all the files included in the batch were processed, and at least one file have status SUCCESS |
| FAILED | The batch did not generated any leaf files with status SUCCESS |
The messages with FAILED status have the key statusDetails. The `statusDetails`` is just informative and should not be used programatically.
The following status can be present on statusDetails:
| Status | Description |
|---|---|
| No valid files found | Unable to find a valid file based on supported extensions and expected file structure |
| Leaf internal error. Please contact Support | Internal error that need to be reported |
| Files found but unable to read. Please check file format before re-trying or contact Support | A valid file was found but could not be converted |
Get Batch upload
 GET /batch/{batch_id}
Once you've uploaded files, you can then query these files individually, merge the files, or query for them via Get all Files. You can also query the batch upload ID to see a list of files generated in the upload and a status of the upload with this endpoint.
Request examples
- cURL
- Python
- JavaScript
Response
Get all Batches
 GET /batch
Once you've uploaded files, you can then query these files individually, merge the files, or query for them via Get all Files. You can also query the batch upload ID to see a list of files generated in the upload and a status of the upload with this endpoint.
Request examples
- cURL
- Python
- JavaScript
Response
Retry a batch
 PUT /batch/{id}/retry
If a batch upload does not complete as expected, this endpoint allows you to try again. This action will reprocess the fragments of uploaded data that didn't succeed processing before, keeping existing converted files unaffected.
Request examples
- cURL
- Python
- JavaScript
Response
Batch Files Status
 GET /batch/{id}/status
After your batch generate the list of Leaf Files, this enpoint can be used to verify the status of each resource complied on the same response.
Request examples
- cURL
- Python
- JavaScript
Response
The most common failed messages are listed here.
Please note
Once you have finished setting up manual file upload, refer to machine file conversion next