Skip to content

Monitor Reading

The monitor reading resource.

Base/monitorReading
GET/monitorReading

List monitor readings

Retrieve a paginated list of monitor readings. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GET/monitorReading
curl --request GET \
  --url '<your-host>/monitorReading?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "companyId": "xyz789",
    "tankMonitorId": "xyz789",
    "tankId": "xyz789",
    "readingAt": "2026-01-01T00:00:00Z",
    "createdAt": "2026-01-01T00:00:00Z",
    "pctOfCapacity": 0,
    "gallonsEstimate": 0
  }
]
GET/monitorReading

Retrieve a monitor reading

Fetch a single monitor reading by filtering on `id`.

Query parameters

idstring

Match on the monitor reading's `id`, e.g. `eq.{id}`.

GET/monitorReading
curl --request GET \
  --url '<your-host>/monitorReading?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "tankMonitorId": "xyz789",
  "tankId": "xyz789",
  "readingAt": "2026-01-01T00:00:00Z",
  "createdAt": "2026-01-01T00:00:00Z",
  "pctOfCapacity": 0,
  "gallonsEstimate": 0
}
POST/monitorReading

Create a monitor reading

Create a new monitor reading.

Body parameters

companyIdstringrequired

References company.id

tankMonitorIdstringrequired

References tankMonitor.id

tankIdstringrequired

References tank.id

readingAttimestamprequired
pctOfCapacitynumber
gallonsEstimatenumber
sourcestring
receivedAttimestamp
temperatureFahrenheitnumber
batteryVoltsnumber
signalStrengthnumber
troubleCodestring
readingQualitystring
providerStatusstring

Status reported by the provider; interpreted using provider vocabulary, observed at readingAt.

batteryAlarmboolean

Explicit provider battery alarm, never inferred from voltage. Null means not reported.

readingTroubleboolean

Explicit provider invalid-reading flag. Null means not reported.

highDrainAlarmboolean

Explicit provider rapid-draw alarm; not a diagnosis of a leak.

POST/monitorReading
curl --request POST \
  --url <your-host>/monitorReading \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"companyId":"xyz789","tankMonitorId":"xyz789","tankId":"xyz789","readingAt":"2026-01-01T00:00:00Z"}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "tankMonitorId": "xyz789",
  "tankId": "xyz789",
  "readingAt": "2026-01-01T00:00:00Z",
  "createdAt": "2026-01-01T00:00:00Z",
  "pctOfCapacity": 0,
  "gallonsEstimate": 0
}
PATCH/monitorReading

Update a monitor reading

Update an existing monitor reading, matched on `id`.

Body parameters

companyIdstringrequired

References company.id

tankMonitorIdstringrequired

References tankMonitor.id

tankIdstringrequired

References tank.id

readingAttimestamprequired
pctOfCapacitynumber
gallonsEstimatenumber
sourcestring
receivedAttimestamp
temperatureFahrenheitnumber
batteryVoltsnumber
signalStrengthnumber
troubleCodestring
readingQualitystring
providerStatusstring

Status reported by the provider; interpreted using provider vocabulary, observed at readingAt.

batteryAlarmboolean

Explicit provider battery alarm, never inferred from voltage. Null means not reported.

readingTroubleboolean

Explicit provider invalid-reading flag. Null means not reported.

highDrainAlarmboolean

Explicit provider rapid-draw alarm; not a diagnosis of a leak.

PATCH/monitorReading
curl --request PATCH \
  --url '<your-host>/monitorReading?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"companyId":"xyz789"}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "tankMonitorId": "xyz789",
  "tankId": "xyz789",
  "readingAt": "2026-01-01T00:00:00Z",
  "createdAt": "2026-01-01T00:00:00Z",
  "pctOfCapacity": 0,
  "gallonsEstimate": 0
}
DELETE/monitorReading

Delete a monitor reading

Delete a monitor reading, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the monitor reading to delete, e.g. `eq.{id}`.

DELETE/monitorReading
curl --request DELETE \
  --url '<your-host>/monitorReading?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content