Skip to main content
GET
/
buoys
/
last_readings
Get last readings for multiple buoys
curl --request GET \
  --url https://thesurfkit.com/api/v2/buoys/last_readings \
  --header 'Authorization: Bearer <token>'
{
  "status": "success",
  "data": {
    "buoys": [
      {
        "id": 123,
        "name": "<string>",
        "lat": 123,
        "lng": 123,
        "source": "<string>",
        "last_reading": {
          "id": 123,
          "uuid": "<string>",
          "significient_height": 123,
          "maximum_height": 123,
          "period": 123,
          "time": "2023-11-07T05:31:56Z",
          "water_temperature": 123,
          "direction": 123,
          "direction_compass": "<string>",
          "unit": "<string>",
          "energy_per_wave": 123
        }
      }
    ],
    "missing_ids": [
      123
    ]
  }
}

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token in the Authorization header.

Format: Authorization: Bearer YOUR_API_KEY

Alternative: Pass as query parameter ?api_key=YOUR_API_KEY

Security: API keys are stored as BCrypt hashes (never plain text). Only the hash is stored in the database.

Query Parameters

ids
string
required

Comma-separated or array-style buoy IDs (e.g., ids=1,2,3 or ids[]=1&ids[]=2)

limit
integer
default:3

Maximum number of buoys to return from the supplied ids list (default: 3, max: 100)

Required range: 1 <= x <= 100

Response

Successful response

status
string
Example:

"success"

data
object