API v4.9.0

Havida Sensor API

Secure, customer-scoped access to current and historical underwater camera sensor measurements from Havida installations.

Current and historical values

The service exposes the latest measurements, time-range history and open CSV export.

Customer isolation

A customer read token can only access locations registered to that customer.

HTTPS and Bearer tokens

All external requests use HTTPS. Tokens must be sent in the Authorization header.

Authentication

Include the customer-specific read token with every data request:

Authorization: Bearer CUSTOMER_ADMIN_READ_TOKEN

In the interactive API documentation, select Authorize and enter only the token value. Swagger adds the Bearer prefix automatically.

Do not place tokens in URLs, source code, screenshots, email, or support logs. Havida's global administration token is never distributed to customers.

Endpoints

MethodPathPurposeAuthentication
GET/v1/measurements/latestAll latest locations for the authenticated customerCustomer read token
GET/v1/measurements/latest?location_name=Fjord%20Site%20ALatest values for one locationCustomer read token
GET/v1/measurements/history?from=...&to=...Historical batches for a time range of up to 31 days per requestCustomer read token
GET/v1/measurements/export.csv?from=...&to=...Open CSV export of historical measurementsCustomer read token
POST/v1/measurementsSensor-agent ingest; not intended for customer office systemsLocation ingest token
GET/healthAPI process health; contains no sensor valuesNone

Read example

curl

curl -sS \
  -H "Authorization: Bearer $READ_TOKEN" \
  "https://ingest.api.havida.no/v1/measurements/latest"

PowerShell

$headers = @{ Authorization = "Bearer $READ_TOKEN" }
Invoke-RestMethod `
  -Uri "https://ingest.api.havida.no/v1/measurements/latest" `
  -Headers $headers | ConvertTo-Json -Depth 10

Response example

{
  "customer_id": "example-aquaculture",
  "customer_name": "Example Aquaculture AS",
  "location_id": "fjord-site-a",
  "location_name": "Fjord Site A",
  "received_at": "2026-08-25T14:55:13.757175+02:00",
  "measurements": [
    {
      "customer_name": "Example Aquaculture AS",
      "location_name": "Fjord Site A",
      "camera_name": "Cage 5 Underwater Camera",
      "temperature_celsius": 8.4,
      "depth_meters": 6.2,
      "measured_at": "2026-08-25T12:55:13.651861Z"
    }
  ]
}

Fields and units

FieldTypeDescription
customer_idstringStable technical customer identifier assigned by Havida
customer_namestringCustomer display name
location_idstring or nullStable technical location identifier
location_namestringLocation display name
site_idURNStable globally unique site identifier assigned by Havida
device_idUUID URNStable globally unique logical camera/device identifier
sensor_idsobjectStable UUID URNs for each sensor value supplied by the device
camera_namestringCamera display name from the local Havida system; may contain the cage description
temperature_celsiusnumber or omittedTemperature in degrees Celsius
depth_metersnumber or omittedDepth in metres
oxygen_percentnumber or omittedOxygen value in percent when supplied by the sensor
measured_atISO 8601Time the edge agent read the measurement, normally UTC with Z
received_atISO 8601Time Havida Cloud accepted the batch, including timezone offset

Optional sensor fields are omitted when the local camera object does not provide a numeric value. API consumers must not assume that every camera provides every sensor type.

HTTP responses

200Request completed
202Measurement batch accepted
401Missing or invalid Bearer token
403Token is not authorised for the requested customer or location
404No data received for the requested location
422Invalid request or missing filter
503Customer registry unavailable

Operational behaviour