Skip to main content
POST

Authorizations

Authorization
string
header
required

The device's API key, sent as Authorization: Bearer <api_key>. Issued per device in the app and shown once. Issuing a new key revokes the previous one.

Body

application/json

One reading. A timestamp is not accepted; the server assigns it.

device_id
string<uuid>
required

The id of a device claimed in the app.

Example:

"77777777-7777-7777-7777-777777777703"

metric_id
integer
required

What was measured, from the shared metric catalogue. 220 is soil moisture in percent.

Example:

220

value
required

The reading, as a number or a numeric string. Stored and returned as a string. Units are not converted.

Example:

42.5

Response

Reading stored. The body is the stored row.

A stored reading.

device_id
string<uuid>
required
Example:

"77777777-7777-7777-7777-777777777703"

metric_id
integer
required
Example:

220

value
string
required

The stored reading, always a string.

Example:

"42.5"

timestamp
string
required

Server-assigned time of arrival in epoch milliseconds, serialised as a string.

Example:

"1784367787126"