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
| Domain | Path prefix | Description |
|---|---|---|
| Environment | /v2/environment | Historical temperature, salinity, and oxygen readings per site. |
| Feeding | /v2/feeding | Specific feed rate (SFR) benchmarks by region or country. |
| Mortality | /v2/mortality | Legacy mortality benchmarks, codelists, and top-category reports. |
| Production Areas | /v2/region | Production area catalogue used by v2 datasets. |
Common conventions
- Pagination: v2 uses simple
limitandoffsetquery parameters (where supported). The default limit is1000with an enforced maximum of10000. - Metadata: Responses return a
metaormetadataobject that at minimum includes the server-side processing timestamp. Unlike v3, there is no pagination object. - Role-based filtering: Routes marked with
exclude_selfparameters require a farmer token. Whenexclude_self=true, benchmark calculations ignore the authenticated farmer. - Error handling: v2 endpoints return standard HTTP errors. Validation failures respond with
400and a descriptive message; unexpected errors produce a500.
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.