Skip to main content
PUT

Authorizations

Authorization
string
header
required

Path Parameters

project_id
string
required
event_id
string
required

Unique ID of the event in the evt_XXXX syntax. For example: evt_DLnYvzbjSujNAvXE

slug
string
required

Data point type slug on the event's event type. For example: ambient-temperature-c. A slug the event type does not define returns 422.

Body

application/json
value
required

The corrected value. Number, string or boolean, matching the data point type. Required; a null value returns 400.

method
string
default:manual_entry

How the value was arrived at, recorded on the correction and shown in the audit trail. Free text, and it also decides whether a repeat call is treated as a replay.

notes
string

Free-text justification stored with the correction.

expect
enum<string>

Optional guard on the state you believe the data point is in. Pass gap to require that it is currently empty, or existing to require that it already has a value. A mismatch returns 422 and writes nothing. Because this endpoint creates the data point when the slug has no value yet, existing is the guard that stops a wrong slug or event ID from silently manufacturing data. It only tests empty against non-empty, so it will not detect a value that changed from one number to another.

Available options:
gap,
existing

Response

Replay of the latest correction; nothing was written.

One entry in a data point's correction history.

id
string

Correction friendly ID.

Example:

"sub_9TnpQxL2mKdRvWs4"

data_point_id
string

Friendly ID of the corrected data point.

Example:

"in_kiIuaGIUqRxWUmTY"

stage
enum<string>

ingestion corrections change the data point's value, which every model and report reads. Corrections written through this API are always ingestion. value_stream corrections are overrides scoped to a single value stream and leave the shared value untouched; they cannot be created here.

Available options:
ingestion,
value_stream
source
enum<string>

Where the correction came from. Corrections written through this API are api.

Available options:
manual,
api,
rule,
transformation
method
string

How the value was arrived at, as supplied by the caller. Reverts are recorded with the reserved method revert.

Example:

"manual_entry"

origin
enum<string>

substituted changed an existing reading. imputed set a value where none was recorded, and is the case the Events table calls Value was missing. reverted restored the previous value.

Available options:
substituted,
imputed,
reverted
from_value

The value before this entry. Null when no reading existed.

to_value

The value after this entry.

notes
string | null
rule
object | null

The data rule that wrote this correction. Null for manual and API corrections.

created_by
string | null

Name of the user the correction is attributed to.

created_at
string<date-time>