Skip to main content

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.

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.

Base URL

http://localhost:8000
The interactive Swagger UI is automatically generated by FastAPI and available at:
http://localhost:8000/docs

Authentication

Protected endpoints require an Authorization header with a Bearer token:
Authorization: Bearer <INGESTA_SECRET_KEY>
The secret key is configured via the INGESTA_SECRET_KEY environment variable in config/.env. AgroIA reads this value at startup through src/utils/config.py using pydantic-settings.
Authorization
string
required
Bearer token for authenticating write and delete requests. Format: Bearer <INGESTA_SECRET_KEY>.
Requests to protected endpoints without a valid Authorization header return 401 Unauthorized. The INGESTA_SECRET_KEY value must never be committed to version control.

Endpoints

MethodEndpointAuth requiredDescription
GET/healthNoServer status, database name, embedding model, and version
POST/ingestaYesAsync ingestion of a single agronomic lot
POST/ingesta/debugYesSynchronous ingestion for testing and debugging
POST/ingesta/geojsonYesBulk ingestion from a multipart GeoJSON file upload
GET/lotesNoList all lots with summary fields
GET/lotes/{lote_id}NoFull informe and historical series for one lot
DELETE/lotes/{lote_id}YesDelete a single lot and its full history
DELETE/lotesYesDelete all lots — irreversible

Error codes

CodeMeaningTriggered by
401UnauthorizedMissing or incorrect Authorization header on protected endpoints
404Not foundGET /lotes/{lote_id} or DELETE /lotes/{lote_id} when the lot does not exist
400Bad requestInvalid or empty GeoJSON file submitted to /ingesta/geojson
500Internal server errorUnexpected 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.

Build docs developers (and LLMs) love