Commit 512bbc5228

512bbc5228f87e51b0d42379f3e49cff7bc400af

parent: ef43cd2f79

Verified · cmc

cmc <hello@cleberg.net> · 2026-08-27 06:15 UTC

API, Parity: dashboard read, feed, cursor pagination

Ref krz/gitbay#40, krz/gitbay#41

Layout: unified · split

API.org +30
@@ -58,6 +58,36 @@ printf '{"argv":["issue","create","you/project","--title","t","--file","-"],"std
5858curl -s -H "Authorization: Bearer $TOKEN" -d @- https://gitbay.org/api/v1/cmd
5959#+end_src
6060
61** GET /api/v1/read
62
63The conditional half: the same registry over GET, admitting only
64commands the registry marks read-only, so a GET structurally cannot
65mutate. Responses carry an =ETag=; =If-None-Match= answers 304.
66
67#+begin_src sh
68curl -s -H "Authorization: Bearer $TOKEN" \
69 "https://gitbay.org/api/v1/read?argv=repo&argv=show&argv=you/project"
70#+end_src
71
72** The dashboard read
73
74=dashboard= returns the account aggregate — pinned repositories, open
75merge requests, assigned issues, recent builds — in one call:
76
77#+begin_src sh
78curl -s -H "Authorization: Bearer $TOKEN" \
79 "https://gitbay.org/api/v1/read?argv=dashboard"
80#+end_src
81
82** Cursor pagination
83
84=issue list=, =mr list=, =repo list=, and =feed= accept =--limit <n>=
85(1–200) and =--cursor <c>=. With either flag present the =data=
86envelope becomes ={"items": [...], "next": "..."}=; =next= is an
87opaque cursor for the following page, absent on the last one. Without
88the flags the response stays the complete bare array; a bare =feed=
89returns the newest 50 events.
90
6191* Commit statuses (CI reporting)
6292
6393CI reports results through the same command surface (over SSH or the
Parity.org +9
@@ -65,6 +65,8 @@ web dispatcher refuses =SSHOnly= commands outright.
6565| SSH keys: list, add, remove| yes | yes |
6666| PGP keys: list, add, remove| yes | yes |
6767| email add and verify | yes | yes |
68| dashboard aggregate | yes | yes |
69| activity feed | yes | yes |
6870| API token mint | yes | no |
6971| account export bundle | yes | no |
7072
@@ -79,6 +81,13 @@ web dispatcher refuses =SSHOnly= commands outright.
7981| team repo grants | yes | yes |
8082| create, rename, delete | yes | no |
8183
84* Pagination
85
86=issue list=, =mr list=, =repo list=, and =feed= take =--limit <n>=
87and =--cursor <c>=. Cursors are opaque; each page carries the next
88one. Without the flags a list stays complete, so existing scripts are
89unchanged. The web renders server-side and does not paginate.
90
8291* SSH only, by design
8392
8493Build secrets, mirror configuration and tokens, custom domain claims,