Skip to content

docs(api): document request bodies, required params and status codes in REST reference - #188

Open
TimeToBuildBob wants to merge 1 commit into
ActivityWatch:masterfrom
TimeToBuildBob:docs/rest-reference-request-shapes
Open

TimeToBuildBob wants to merge 1 commit into
ActivityWatch:masterfrom
TimeToBuildBob:docs/rest-reference-request-shapes

Conversation

@TimeToBuildBob

Copy link
Copy Markdown
Contributor

The REST reference lists endpoint paths only. A watcher author following it hits avoidable failures, found by probing aw-server (Python) and aw-server-rust 0.13.2 with the same script:

  • POST .../heartbeat without ?pulsetime= is rejected by both servers (400 on Python, an HTML 422 on Rust).
  • POST .../events requires a JSON list on Rust; Python also accepts a bare object. This mismatch is what broke aw-watcher-jetbrains (aw-server-rust#174).
  • /query/, import/export, settings, event count and bucket delete (?force=1) were undocumented.

This documents request bodies, parameters, status codes and the known Python/Rust differences (settings DELETE only on Rust, error behaviour, import into an existing bucket). Only behaviour observed in the probe is stated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant