Commit 512bbc5228
Verified · cmc
Layout: unified · split
API.org +30
| @@ -58,6 +58,36 @@ printf '{"argv":["issue","create","you/project","--title","t","--file","-"],"std | ||
| 58 | 58 | curl -s -H "Authorization: Bearer $TOKEN" -d @- https://gitbay.org/api/v1/cmd |
| 59 | 59 | #+end_src |
| 60 | 60 | |
| 61 | ** GET /api/v1/read | |
| 62 | ||
| 63 | The conditional half: the same registry over GET, admitting only | |
| 64 | commands the registry marks read-only, so a GET structurally cannot | |
| 65 | mutate. Responses carry an =ETag=; =If-None-Match= answers 304. | |
| 66 | ||
| 67 | #+begin_src sh | |
| 68 | curl -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 | |
| 75 | merge requests, assigned issues, recent builds — in one call: | |
| 76 | ||
| 77 | #+begin_src sh | |
| 78 | curl -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= | |
| 86 | envelope becomes ={"items": [...], "next": "..."}=; =next= is an | |
| 87 | opaque cursor for the following page, absent on the last one. Without | |
| 88 | the flags the response stays the complete bare array; a bare =feed= | |
| 89 | returns the newest 50 events. | |
| 90 | ||
| 61 | 91 | * Commit statuses (CI reporting) |
| 62 | 92 | |
| 63 | 93 | CI 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 | 65 | | SSH keys: list, add, remove| yes | yes | |
| 66 | 66 | | PGP keys: list, add, remove| yes | yes | |
| 67 | 67 | | email add and verify | yes | yes | |
| 68 | | dashboard aggregate | yes | yes | | |
| 69 | | activity feed | yes | yes | | |
| 68 | 70 | | API token mint | yes | no | |
| 69 | 71 | | account export bundle | yes | no | |
| 70 | 72 | |
| @@ -79,6 +81,13 @@ web dispatcher refuses =SSHOnly= commands outright. | ||
| 79 | 81 | | team repo grants | yes | yes | |
| 80 | 82 | | create, rename, delete | yes | no | |
| 81 | 83 | |
| 84 | * Pagination | |
| 85 | ||
| 86 | =issue list=, =mr list=, =repo list=, and =feed= take =--limit <n>= | |
| 87 | and =--cursor <c>=. Cursors are opaque; each page carries the next | |
| 88 | one. Without the flags a list stays complete, so existing scripts are | |
| 89 | unchanged. The web renders server-side and does not paginate. | |
| 90 | ||
| 82 | 91 | * SSH only, by design |
| 83 | 92 | |
| 84 | 93 | Build secrets, mirror configuration and tokens, custom domain claims, |