API Reference
All endpoints live under /api/v1/ and exchange JSON. Requests are authenticated with JWT tokens kept in httpOnly cookies.
Description
Signing In
Authentication uses JWT in httpOnly cookies: signing in returns an access token and a refresh token. Two-factor authentication (TOTP) is available.
Authentication Endpoints
Pipelines
Sensors
Leak Events
Alerts
WebSocket
The WebSocket endpoint streams sensor readings and leak events as they happen. Connect with a valid authentication cookie.
Message Format
The connection is authenticated: the token in the httpOnly cookie is checked when the connection is upgraded.
- Create a user account
- Sign in and receive the JWT tokens
- End the current session
- Get a new access token when the old one has expired
- The signed-in user
- Change the signed-in user’s password
- Start setting up two-factor authentication (TOTP)
- Check the TOTP code at sign-in
- The organisation’s pipelines
- Create a pipeline
- A pipeline with its nodes
- Change a pipeline’s parameters
- Delete a pipeline
- The nodes of a pipeline
- Add a node to a pipeline
- Calculated physics: wave speed and product properties
- The sections of a pipeline
- The organisation’s sensors
- Register a sensor
- One sensor in detail
- Change a sensor’s settings
- Delete a sensor
- A sensor’s measurement history
- The latest reading of every sensor
- The sensor types available
- Leak events, with filters
- One leak event in detail
- Change a leak event
- Assign a repair crew to a leak
- Mark a repair as finished
- Alarms, with filters
- Only the alarms still standing
- Alarm counts by priority and state
- Acknowledge an alarm
- Close an alarm
- Live stream of sensor readings and leak events