Correct a data point value
Substitutes the value of one data point, addressed by its data point type slug within an event. Use it to replace a wrong value, or to set one where none was recorded. The server records the previous value as from_value, which is null when no value existed, and creates the data point on the event if it didn’t exist yet. Requires the write:event token scope.
Each new correction appends to the data point’s correction history, so the original value stays readable.
Setting a value doesn’t recalculate anything downstream: a batch that was already generated keeps the value it was generated with. Data rules do re-evaluate against the corrected value, so a correction can clear an alert or raise a new one.
Replays return 200, new corrections return 201. A call is a replay when the data point’s latest correction has both the same method and the same value; that correction is returned and nothing is written. Values are compared after normalization, so "10.2", 10.2 and a stored 10.20 all match. Because method takes part in the check, retrying with a different method writes a second correction. expect is checked first, so a retried expect: gap call returns 422 once the first call has filled the gap; on that 422, read the data point to confirm its value before resending without expect.
Authorizations
Path Parameters
The project's friendly ID (e.g. prj_aBcD1234eFgH5678).
The event's friendly ID (e.g. evt_aBcD1234eFgH5678).
Data point type slug on the event's event type (e.g. ambient-temperature-c). A slug the event type doesn't define returns 422.
Body
The corrected value, a number, string or boolean matching the data point type. Required; a null value returns 400.
How the value was arrived at, recorded on the correction and shown in the audit trail. Free text. It also decides whether a repeat call is a replay.
Free-text justification stored with the correction.
Optional guard on the state you believe the data point is in. gap requires that it is currently empty, and existing 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 creating data. It only tests empty against non-empty, so it won't detect a value that changed from one number to another.
gap, existing Response
Replay of the latest correction; nothing was written.
One entry in a data point's correction history.
Correction friendly ID (sub_...).
Friendly ID of the corrected data point.
ingestion corrections change the data point's value, which every model and report reads; this API writes only these. value_stream corrections override the value for one value stream and leave the shared value untouched.
ingestion, value_stream Where the correction came from. Corrections written through this API are api.
api, transformation, rule, manual How the value was arrived at. On a correction written through this API it is the method the caller sent, or manual_entry when none was sent. A data rule's correction carries the substitution method that resolved it, and a revert carries revert.
substituted changed an existing value. imputed set a value where none was recorded; the two are kept apart because program substitution thresholds count them differently. reverted restored the original value.
substituted, imputed, reverted The value before this entry. Null when no value existed.
The value after this entry. Null only on a revert of an imputed value, which restores the empty slot.
Free-text justification sent with the correction.
The data rule that wrote this correction. Null for manual and API corrections.
Name of the user the correction is attributed to. Null on a correction a data rule wrote on its own, or one written with an API token that isn't associated with a user.