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 |
---|---|---|
GS3 | GreenStar 3 β 2630 | /GS3_2630/profile/RCD/EIC/global.ver |
Gen4 | Gen 4 - 4600/4630 | /JD-Data/log/user defined name/*.jdl |
Shapefile | Exported from MyJohnDeere | Shapefile with extra metadata in a .json file |
Expected file structure
GreenStar 4 (4600+)
GreenStar 3 (2630)
Green Star 2 (2600)
Climate FieldView
File Format | Monitor Model | Details |
---|---|---|
dat | All files from Climate FieldView | A zip with .dat files |
Expected file structure
20|20 SeedSense Generation 1 and Generation 2
20|20 SeedSense Generation 3
CNHI
File Format | Monitor Model | Details |
---|---|---|
CN1 | Case IH Pro 700, equivalent to New Holland IntelliView IV | /file.cn1/index.vy1 |
ISOXML | Case IH Pro 1200, equivalent to New Holland IntelliView 12 | /TASKDATA.XML |
Expected file structure
Voyager 2
ISOXML
AgLeader
File Format | Monitor Model | Details |
---|---|---|
yld | YM2000, PFAdvantage & 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 files |
Expected file structure
AgLeader Integra (versions 3.5+), Versa
AgLeader Edge, Insight, and Integra (version 3.4)
AgLeader PF Advantage, PF 3000, PF 3000 Pro, YM2000
Trimble
File Format | Monitor Model | Details |
---|---|---|
AgData | FMX and CFX monitors | /AgData/ |
AgGPS | TMX and GFX monitors | /AgGPS/ |
Expected file structure
GFX-750, TMX-2050
CFX-750, FMX
Precision Planting (beta)
File Format | Monitor Model | Details |
---|---|---|
PP2020 | 20|20 | A zip with .2020 files. |
Expected file structure
20|20 SeedSense Generation 1 and Generation 2
20|20 SeedSense Generation 3
ISOXML
Expected file structure
CLAAS
Expected file structure
Kuhn
Expected file structure
Kverneland Group
Expected file structure
MΓΌller-Elektronik
Expected file structure
Teknomika
Expected file structure
Topcon Precision Agriculture
Expected file structure
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. |
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