API Documentation

Welcome to our API documentation. This guide provides information about the available APIs, their endpoints, and how to use them. All APIs require authentication via an API key.

Authentication: All API endpoints require an API key to be passed in the X-API-Key header.

Interactive API Documentation

We provide interactive API documentation using Swagger and ReDoc:

Swagger UI

Interactive documentation with a user-friendly interface.

Open Swagger UI
ReDoc

Clean, responsive documentation with a three-panel design.

Open ReDoc

Available API Categories

Geometry Management

APIs for creating, retrieving, and managing geometries (polygons).

  • GET /api/geometry/ - List all geometries
  • POST /api/geometry/ - Create a new geometry
  • GET /api/geometry/{id}/ - Get a specific geometry
  • DELETE /api/geometry/{id}/ - Delete a geometry
View Details

Sentinel-2 Imagery

APIs for searching, analyzing, and retrieving Sentinel-2 satellite imagery.

  • POST /api/s2/search/ - Search for available imagery
  • POST /api/s2/stats/ - Get statistics for imagery
  • GET /api/s2/image/{id}/ - Get imagery for a geometry
View Details

Weather Data

APIs for retrieving current, forecast, and historical weather data.

  • GET /api/weather/current/ - Current weather
  • GET /api/weather/today/ - Today's weather
  • GET /api/weather/forecast/ - Weather forecast
  • GET /api/weather/historical/ - Historical weather
View Details

Digital Elevation Model (DEM)

APIs for retrieving elevation data and contour lines.

  • GET /api/dem/ - Get elevation data
  • GET /api/contours/ - Get contour lines
View Details

Miscellaneous

Other utility APIs.

  • GET /api/misc/colors/ - Get color palettes
View Details

Getting Started

Authentication

All API endpoints require authentication using an API key. Include your API key in the request headers:

X-API-Key: your-api-key-here

Response Format

All API responses are in JSON format, except for image endpoints which return binary data.

Error Handling

Error responses include an HTTP status code and a JSON object with an error message:

{
  "error": "Error message description"
}

Common Status Codes

  • 200 OK - Request succeeded
  • 201 Created - Resource created successfully
  • 400 Bad Request - Invalid request parameters
  • 401 Unauthorized - Missing API key
  • 403 Forbidden - Invalid API key
  • 404 Not Found - Resource not found
  • 500 Internal Server Error - Server error