Add the backend service and endpoint needed to validate and persist values recorded on a sensor graph, including values produced by recurrence expansion.
Acceptance criteria
- Operate only on the sensor identified by the sensor page or endpoint.
- Require the appropriate permission to create sensor data.
- Validate event starts, values, resolution, timezone, and belief time.
- Use the selected belief time, defaulting to the current time when none is supplied.
- Allow values for the same event start when their belief times differ.
- When an exact event-start and belief-time collision exists, preserve the existing belief.
- Return a summary of values created, skipped because of collisions, and rejected.
- Persist the batch atomically so partial failures do not leave an incomplete recording.
- Reuse the recurrence-expansion function rather than implementing DST behavior in the route.
Tests
- Successful single-value and batch recording.
- Permission failure.
- Same event start with a different belief time.
- Exact collision where the existing belief wins.
- Validation failure rolls back the full batch.
Out of scope
- Graph recording controls.
- Recurrence stored as schema rather than concrete beliefs.
Add the backend service and endpoint needed to validate and persist values recorded on a sensor graph, including values produced by recurrence expansion.
Acceptance criteria
Tests
Out of scope