No results
1
API Contract
Joël Jon Moix edited this page 2026-10-27 11:27:09 +01:00
Table of Contents
API contract
- The OpenAPI document generated from the code (
chronexus-server openapi) is the contract.api/openapi.jsonandapi/types.tsare generated bypython3 scripts/contract.pyand checked with--check; a drift fails the check. GET /api/v1/metareports the API version and capabilities; clients refuse servers that lack what they need (for exampleincremental-sync).- Human-readable reference:
docs/API.md. The desktop client's view of the same contract: the app'sdocs/SYNC_API.md.
Compatibility rules
- Add, do not break: new fields are optional, new behaviour is announced by a capability.
- Requests reject unknown fields, so clients must not send fields the server does not document.
- Status codes carry meaning the client relies on:
401sign in again,403/404on a campaign read means access is gone,409conflict (with the current revision),410expired invitation or stale cursor,429slow down.