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
58curl -s -H "Authorization: Bearer $TOKEN" -d @- https://gitbay.org/api/v1/cmd 58curl -s -H "Authorization: Bearer $TOKEN" -d @- https://gitbay.org/api/v1/cmd
59#+end_src 59#+end_src
60 60
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
61* Commit statuses (CI reporting) 91* Commit statuses (CI reporting)
62 92
63CI reports results through the same command surface (over SSH or the 93CI reports results through the same command surface (over SSH or the
Parity.org +9
@@ -65,6 +65,8 @@ web dispatcher refuses =SSHOnly= commands outright.
65| SSH keys: list, add, remove| yes | yes | 65| SSH keys: list, add, remove| yes | yes |
66| PGP keys: list, add, remove| yes | yes | 66| PGP keys: list, add, remove| yes | yes |
67| email add and verify | yes | yes | 67| email add and verify | yes | yes |
68| dashboard aggregate | yes | yes |
69| activity feed | yes | yes |
68| API token mint | yes | no | 70| API token mint | yes | no |
69| account export bundle | yes | no | 71| account export bundle | yes | no |
70 72
@@ -79,6 +81,13 @@ web dispatcher refuses =SSHOnly= commands outright.
79| team repo grants | yes | yes | 81| team repo grants | yes | yes |
80| create, rename, delete | yes | no | 82| create, rename, delete | yes | no |
81 83
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
82* SSH only, by design 91* SSH only, by design
83 92
84Build secrets, mirror configuration and tokens, custom domain claims, 93Build secrets, mirror configuration and tokens, custom domain claims,