v1

latestOpenAPI 3.0.12026-07-172011.0 KB
AirBeamMini fixed sessions binary flow

Upload binary measurements for an AirBeamMini session

Receives a binary measurement payload from the AirBeamMini. Can be called once per minute for live uploads or in bulk after connectivity loss — both are handled identically.

Binary Format

Offset     Size  Type        Description
0          2     uint8[2]    Magic bytes: 0xAB 0xBA
2          2     uint16 BE   Measurement count N
--- repeated N times ---
4+i*9      4     uint32 BE   Unix timestamp (seconds since epoch, UTC)
8+i*9      1     uint8       sensor_type_id (returned by session creation endpoint)
9+i*9      4     float32 BE  Sensor value
--- end repeat ---
4+N*9      1     uint8       XOR checksum of all preceding bytes

Resend behaviour: sending a measurement with an already-stored (stream_id, time_with_time_zone) pair is silently ignored — no duplicate is created.

Time synchronisation: an empty body is valid and returns 200 immediately. The AirBeamMini uses this to read the current server time from the X-Server-Time response header (Unix epoch, UTC) when its clock drifts.

Error Codes

All error responses share the shape { "error_code": "...", "message": "..." }.

error_codeHTTPDescription
unauthorized401Missing or invalid Authorization token
session_not_found404No session with the given UUID exists for this user/token
payload_too_short400Payload has fewer bytes than required for even one frame
invalid_magic_bytes400First 2 bytes are not 0xAB 0xBA
empty_measurement_count400Frame count field in header is zero
payload_size_mismatch400Actual payload size does not match the declared frame count
invalid_checksum400XOR checksum of payload does not match the final byte
invalid_epoch400A frame's timestamp is zero or implausibly far in the future
invalid_value400A frame's sensor value is NaN or Infinity
post/api/v3/fixed_sessions/{uuid}/measurements

Path parameters

uuidstring required

Session UUID (same as used in session creation)

Headers

Authorizationstring required

Mobile app: Token token=<user_token>. AirBeam: Bearer <session_token> (returned by session creation endpoint).

Response

measurements stored (or empty body time-sync)