Leaf Agriculture Fields API
The Fields API from Leaf Agriculture — 6 operation(s) for fields.
The Fields API from Leaf Agriculture — 6 operation(s) for fields.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/leaf-agriculture:leaf-agriculture-fields-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Leaf Fields API
description: Food and Agriculture developers use Leaf's API to access clean, standardized, and aggregated Farm data from all major sources.
version: 1.0.0
servers:
- url: https://api.withleaf.io
security:
- bearerAuth: []
tags:
- name: Fields
paths:
/services/fields/api/fields:
get:
tags:
- Fields
summary: Get all fields
operationId: getAllFields
security:
- bearerAuth: []
parameters:
- name: leafUserId
in: query
schema:
type: string
- name: provider
in: query
schema:
type: string
- name: type
in: query
schema:
type: string
- name: beforeCreatedTime
in: query
schema:
type: string
format: date-time
- name: afterCreatedTime
in: query
schema:
type: string
format: date-time
- name: beforeUpdatedTime
in: query
schema:
type: string
format: date-time
- name: afterUpdatedTime
in: query
schema:
type: string
format: date-time
- name: farmId
in: query
schema:
type: string
responses:
'200':
description: Successful response
/services/fields/api/users/{leafUserId}/fields/{fieldId}:
get:
tags:
- Fields
summary: Get a field
operationId: getField
security:
- bearerAuth: []
parameters:
- name: leafUserId
in: path
required: true
schema:
type: string
- name: fieldId
in: path
required: true
schema:
type: string
responses:
'200':
description: Successful response
delete:
tags:
- Fields
summary: Delete a field
operationId: deleteField
security:
- bearerAuth: []
parameters:
- name: leafUserId
in: path
required: true
schema:
type: string
- name: fieldId
in: path
required: true
schema:
type: string
responses:
'204':
description: Field deleted
patch:
tags:
- Fields
summary: Update a field
operationId: updateField
security:
- bearerAuth: []
parameters:
- name: leafUserId
in: path
required: true
schema:
type: string
- name: fieldId
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
farmId:
type: string
geometry:
type: object
responses:
'200':
description: Field updated
/services/fields/api/users/{leafUserId}/fields:
post:
tags:
- Fields
summary: Create a field
operationId: createField
security:
- bearerAuth: []
parameters:
- name: leafUserId
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
geometry:
type: object
properties:
type:
type: string
example: MultiPolygon
coordinates:
type: array
items:
type: array
responses:
'201':
description: Field created
/services/fields/api/users/{leafUserId}/fields/{fieldId}/integration/{providerName}:
post:
tags:
- Fields
summary: Upload field to provider
operationId: uploadFieldToProvider
security:
- bearerAuth: []
parameters:
- name: leafUserId
in: path
required: true
schema:
type: string
- name: fieldId
in: path
required: true
schema:
type: string
- name: providerName
in: path
required: true
schema:
type: string
- name: organizationId
in: query
schema:
type: string
responses:
'200':
description: Field uploaded to provider
/services/fields/api/fields/query/intersects:
post:
tags:
- Fields
summary: Get fields by geometry
operationId: getFieldsByGeometry
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
geometry:
type: object
properties:
type:
type: string
example: MultiPolygon
coordinates:
type: array
items:
type: array
responses:
'200':
description: Successful response
/services/fields/api/users/{leafUserId}/fields/intersect:
post:
tags:
- Fields
summary: Get intersection of fields
operationId: getFieldsIntersection
security:
- bearerAuth: []
parameters:
- name: leafUserId
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
type: string
responses:
'200':
description: Successful response
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
x-provenance:
method: harvested
publisher: Leaf Agriculture
source: https://docs.withleaf.io/openapi.yaml
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)