Base URL
Endpoints
Machine files
Batch upload
To access machine files, you need a Leaf user with valid provider credentials. See the Users and Integrations documentation to set up credentials.
Get all machine files
GET/files
Returns a paginated list of machine files for the authenticated API owner.
Parameters
The default page size is 20 when
page and size are not set.Request
Get a machine file
GET/files/{id}
Returns a single machine file by its UUID.
Parameters
Request
Get file summary
GET/files/{id}/summary
Returns the summary for a machine file, containing aggregated statistics for the file’s data points.
Parameters
Request
Get file standardGeoParquet
GET/files/{id}/standardGeoparquet
Returns a URL to the standard GeoParquet file.
Parameters
Request
Get file polygonGeoParquet
GET/files/{id}/polygonGeoparquet
Returns a URL to the polygon GeoParquet file.
Parameters
Request
Get file units
GET/files/{id}/units
Returns the property-to-unit mapping for the machine file. Properties vary by operation type but use standardized keys across providers.
Parameters
Request
Get file status
GET/files/{id}/status
Returns the processing status for each step of Leaf’s pipeline for the specified machine file.
Parameters
Request
Response
status value is one of:
Common failure messages
Get file outsideFieldGeoJSON
GET/files/{id}/outsideFieldGeojson
Returns a GeoJSON file containing data points from the machine file that do not fall within any field boundary.
Parameters
Request
Response
Get all outsideFieldGeoJSON
GET/files/outsideFieldGeojson
Returns a list of all machine files that have data points outside field boundaries.
Parameters
Request
Response
Get uncovered files
GET/files/uncoveredFiles
Returns a list of machine file IDs that did not generate field operations because they do not intersect with any field boundary.
Parameters
Request
Response
Merge files
POST/files/merge
Merges two or more machine files into a single file. Processing is asynchronous — poll the returned file ID to check status.
All files must belong to the same Leaf user, share the same operation type, and have processed status.
Request body
Request
Response
Upload a file
POST/batch
Uploads a .zip file containing operation data. Leaf detects the files inside the archive, creates machine file entries, and processes them asynchronously.
Parameters
Set
provider to Other if you are unsure of the format. Leaf auto-detects files from supported providers.Request
Response
Batch status values
Get a batch
GET/batch/{id}
Returns a single batch upload by its UUID, including the list of generated machine file IDs.
Parameters
Request
Response
Get all batches
GET/batch
Returns a paginated list of batch uploads.
Parameters
Request
Response
Retry a batch
PUT/batch/{id}/retry
Retries processing for a batch upload. Only reprocesses the files that did not succeed previously — existing converted files are not affected.
Parameters
Request
Response
Get batch files status
GET/batch/{id}/status
Returns the processing status of each machine file generated from the batch, grouped by status.
Parameters
Request
Response
Get batch upload manifest
GET/batch/{id}/manifest
Returns one row for each file in the uploaded archive, including files inside nested archives. Each row says what Leaf did with the file. /batch/{id}/status lists the machine files a batch produced. This endpoint lists the files you sent, so you can tell an end user which files Leaf used, which it skipped, and why.
path and ordinal together identify a row, so two files with the same name in one upload get separate rows.
Leaf writes the manifest when it decompresses the batch. Batches uploaded before this endpoint shipped have no manifest. See Response states.
Parameters
The response has an
X-Total-Count header. Page with page and size. Without sort, the page order is not guaranteed, so set sort=ordinal,asc to keep archive order across pages.
Request
Response
Response fields
One file can have more than one link when two formats claim it. For example, Leaf can put one
taskdata.xml in both an ISOXML fileset and an FMIS fileset.
Leaf reads links[].entryStatus and links[].leafFileIds at request time. They show the current state, including after a retry or reprocess.
Disposition values
Response states
Leaf writes the manifest once, when decompression finishes. The endpoint returns one of these four responses:Example: a batch where nothing converted
This batch contains only a shapefile without its.dbf. The batch fails with no machine files, and the manifest shows why:
FAILED. The manifest tells you what to fix: add the .dbf file to the upload.
