Skip to main content

AquaCloud API v2 (Legacy)

The v2 endpoints remain available for integrations that have not yet migrated to the richer v3 resources. They continue to share the same authentication flow as v3: obtain a bearer token via Keycloak and send it in the Authorization: Bearer <token> header (plus x-client-secret for non-premium farmers).

Legacy status

New development should target the /v3 API. The v2 routes are in maintenance mode—schema changes are avoided, and new datasets are not added. Plan a migration to v3 to benefit from more detailed filters, pagination metadata, and a unified response envelope.

Available domains

DomainPath prefixDescription
Environment/v2/environmentHistorical temperature, salinity, and oxygen readings per site.
Feeding/v2/feedingSpecific feed rate (SFR) benchmarks by region or country.
Mortality/v2/mortalityLegacy mortality benchmarks, codelists, and top-category reports.
Production Areas/v2/regionProduction area catalogue used by v2 datasets.

Common conventions

  • Pagination: v2 uses simple limit and offset query parameters (where supported). The default limit is 1000 with an enforced maximum of 10000.
  • Metadata: Responses return a meta or metadata object that at minimum includes the server-side processing timestamp. Unlike v3, there is no pagination object.
  • Role-based filtering: Routes marked with exclude_self parameters require a farmer token. When exclude_self=true, benchmark calculations ignore the authenticated farmer.
  • Error handling: v2 endpoints return standard HTTP errors. Validation failures respond with 400 and a descriptive message; unexpected errors produce a 500.

Example request

curl -X GET "https://api.aquacloud.ai/v2/environment/environment-by-site?limit=500&offset=0" \
-H "Authorization: Bearer $TOKEN" \
-H "x-client-secret: $CLIENT_SECRET"

The response includes an array of environment readings in data and a meta.time ISO timestamp.