Skip to main content

Module api

Module api 

Source
Expand description

Shared JSON request/response types and element conversion for the HTTP API.

Structs§

AppendRequest
POST /elements body.
ElementJson
Flat JSON representation of any element type.
ErrorResponse
Generic JSON error body.
LogStats
StatsJson
Stats response.
TaskStats
UpdateRequest
PATCH /elements/:ref body.

Functions§

compute_stats
Compute stats over a set of elements grouped by date.
element_to_json
Convert a parsed Element into its API JSON representation.
format_date_str
Convert a raw “YYYYMMDD” date prefix to “YYYY-MM-DD”.