AgroIA’s REST API is a FastAPI application (version 2.0) running on port 8000. It exposes endpoints for ingesting agronomic lot data, querying stored records, and performing bulk GeoJSON uploads. Most write and delete operations require Bearer token authentication; read-only and health endpoints are publicly accessible.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sdarionicolas-boop/AgroIA-RAG/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
Authentication
Protected endpoints require anAuthorization header with a Bearer token:
INGESTA_SECRET_KEY environment variable in config/.env. AgroIA reads this value at startup through src/utils/config.py using pydantic-settings.
Bearer token for authenticating write and delete requests. Format:
Bearer <INGESTA_SECRET_KEY>.Endpoints
| Method | Endpoint | Auth required | Description |
|---|---|---|---|
GET | /health | No | Server status, database name, embedding model, and version |
POST | /ingesta | Yes | Async ingestion of a single agronomic lot |
POST | /ingesta/debug | Yes | Synchronous ingestion for testing and debugging |
POST | /ingesta/geojson | Yes | Bulk ingestion from a multipart GeoJSON file upload |
GET | /lotes | No | List all lots with summary fields |
GET | /lotes/{lote_id} | No | Full informe and historical series for one lot |
DELETE | /lotes/{lote_id} | Yes | Delete a single lot and its full history |
DELETE | /lotes | Yes | Delete all lots — irreversible |
Error codes
| Code | Meaning | Triggered by |
|---|---|---|
401 | Unauthorized | Missing or incorrect Authorization header on protected endpoints |
404 | Not found | GET /lotes/{lote_id} or DELETE /lotes/{lote_id} when the lot does not exist |
400 | Bad request | Invalid or empty GeoJSON file submitted to /ingesta/geojson |
500 | Internal server error | Unexpected exception during synchronous processing in /ingesta/debug |
Quick navigation
Ingestion endpoints
POST /ingesta, /ingesta/debug, and /ingesta/geojson — request schemas and examples.
Lot query endpoints
GET and DELETE /lotes — response fields, path and query parameters.
Health check
GET /health — server status without authentication.
Environment configuration
Set INGESTA_SECRET_KEY and all other required environment variables.