Skip to content

About

Terra read-only public API documentation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Terra Read-Only API

Public read-only API surface of Terra provided for external consumers under the read-only service agreement. Enforced by an explicit endpoint allowlist in the gateway (terra repo, gateway/.../ReadOnlyEndpointFilter.kt): anything not listed returns 403.

Base URL

https://terra.farmtogether.com/api/ro

Three surfaces:

Prefix Backend Notes
/api/ro/** facade The 90 endpoints listed below (one doc file each)
/api/ro/titiler/** titiler Raster tiles — see endpoints/titiler.md
/api/ro/martin/** martin Vector tiles — see endpoints/martin.md

Authentication

Send the static API token in the Authorization header, either as a raw UUID or as a Bearer token:

Authorization: 550e8400-e29b-41d4-a716-446655440000
Authorization: Bearer 550e8400-e29b-41d4-a716-446655440000

Tokens are issued by FarmTogether and have an inclusive expiry date (UTC). A token is valid through the end of its expiry date.

Read-only UI

The same token also grants access to the Terra web UI in read-only mode. Navigate to:

https://terra.farmtogether.com/readonly-login

Your browser will prompt for basic auth credentials:

  • Username: any non-empty name (shown in logs as the session user)
  • Password: your API token

After a successful login you are redirected to the main UI. Read-only sessions are held to the same endpoint allowlist as the token API (non-listed calls return 403), and the internal dashboard is not available. Logging out and opening the UI again will prompt for the credentials anew; the token keeps working until its expiry date.

Status codes

Code Meaning
401 Missing, unknown or expired token
403 Endpoint (method + path) is not in the read-only allowlist
400 titiler: url query param outside the allowed S3 prefix or contains ..
429 More than 4 concurrent in-flight requests per token

Conventions

  • JTS geometry fields (Geometry, Point, LineString) are serialized as GeoJSON objects ({"type": ..., "coordinates": [...]}).
  • Fields named *Wkt, wkt4326, geom, geometry4326, centroidWkt are WKT strings in EPSG:4326.
  • Dates are ISO-8601 (2026-10-06, 2026-10-06T12:00:00).
  • Paginated endpoints take a PageRequest<Filters> body ({"filters": {...}, "page": {"size": 20, "number": 1}, "sort": {"column": "...", "direction": "ASC"}}) and return PageResponse<T> ({"data": [...], "totalPages": n, "totalElements": n, "page": {...}}). Exact Kotlin definitions are included in each endpoint doc.
  • Each endpoint doc contains the verbatim Kotlin source of the controller method and all request/response DTO classes — treat that code as the authoritative schema.

Endpoints

Reference

Farms

Hazards and satellite

Crops and modeling

Search

Dictionaries

Soils and ArcGIS

Climate

LiDAR

Boundary and elevation

Satellites

Market data

Tiles

About

Terra read-only public API documentation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors