REST API
Aveloxis includes a REST API server for programmatic access to collected data, repository statistics, time-series metrics, SBOM downloads, and vulnerability information. Start it with:
aveloxis api # listens on api.addr, 127.0.0.1:8383 by default; --addr overrides it
The API runs as a separate process alongside aveloxis serve (collection) and aveloxis web (GUI). All three share the same PostgreSQL database. It refuses to start until aveloxis migrate has brought the schema to its own version.
Changes for API clients in 0.29.114
POST /api/v1/me/sessions/revoke is never refused by a spent request quota
and is not counted, like POST /api/v1/auth/logout: an account at its hourly
or daily limit could not sign out everywhere (it got 429).
Changes for API clients in 0.29.113
Sessions (OWASP ASVS 5.0 review, release notes 0.29.113). Three routes:
GET /api/v1/me/sessions lists the account’s live sessions (browser
sessions, /auth/token tokens, the web proxy’s tokens; the one presenting
the request is current), POST /api/v1/me/sessions/revoke ends them
all (the caller’s own included — its next request is 401), and
POST /api/v1/admin/users/{userID}/sessions/revoke lets an administrator
end an account’s. POST /api/v1/me/email now answers 403 {"error": "reauthentication_required"} when the token’s sign-in is older
than web.session_idle_minutes (30 by default; every session token — the
SPA’s from /auth/token, the web proxy’s — is judged by the sign-in of the
browser session it was minted from, and one whose browser session has
expired is refused): sign in again and retry. A
browser session of the web GUI idle past that bound is signed out; a
/auth/token token is not (it lives its 30 days, and the SPA can keep its
own idle rule). Every answer of the api process’s handlers carries
X-Content-Type-Options: nosniff and Strict-Transport-Security (the
http_timeout_seconds 503 is written outside them and carries neither). The
per-IP 429 is logged once a minute per address.
Changes for API clients in 0.29.110
Stage 4 of the admin-console program (release notes 0.29.110) changes how the
built-in web GUI reaches this API, not the API itself: the web process
attaches a Bearer token of the signed-in session to every /api/ request it
forwards (minted on the session’s first such request, held in the web
process, revoked by sign-out, replaced when the API refuses it) and forwards
no cookie. For a client of the web process: POST /api/v1/auth/logout
through the web’s /api/ proxy is refused (403) — the built-in GUI signs
out through POST /logout, which revokes the proxy’s token with the session
— and the pages’ requests now count against the account’s session quotas
(shadow by default). Nothing changes for a client that calls the API with its
own token.
Changes for API clients in 0.29.109
Stage 3 of the admin-console program (release notes 0.29.109). Each line gives the new answer and the reason.
GET /api/v1/admin/monitor/queueacceptspage_size(at most 100; earlier releases always answered 100), carrieswarningsonly when a batched read behind the page failed (the rows then show the repository id, never a bare slash, and the counts 0 — said, not shown as the truth), and answers an absurdpagewith the last addressable (empty) page and aqlonger than any repository name with an empty page and a warning, where both were a500(an overflowed offset; a trigram scan nothing could match).A collection’s name is at most 200 characters and a whitespace-only name is refused (
name required; it was stored as given); its description at most 1,000; apositionoutside int4 is a400(position must be between -2147483648 and 2147483647) where the encoder’s refusal was a500. One rule per text, in the service, so the API and the web console refuse alike.GET /api/v1/admin/capacity/accounts?login=answers404for an empty login or one longer than 255 characters (no forge issues one) without a query; the value is trimmed first in both GUIs.A forge-ID adoption
noteis bounded at 1,000 characters (it was 1,000 bytes), the unit a form counts.A value the database refuses on an operation that takes no URL (SQLSTATE class 22, such as a NUL byte in a name) answers
400a value in the request was refused by the database (invalid text, or out of range)where it answered500; the URL-taking operations keep their URL sentence.A collection id of 0 or less is a
404(no collection with that id), as it was before the rules moved into the service.The comparison page’s “100%” mode is gone (the built-in GUI draws
/api/v1/compare, raw counts or z-scores); the API’s comparison is unchanged.
Changes for API clients in 0.29.100
Stage 1 of the admin-console program (release notes 0.29.100; the 58 §7 handler fixes): the administrative rules moved into one service, and several answers changed with them. Each line gives the new answer and the reason; the per-route notes below carry the detail.
A group that is not the caller’s is a
404on every group route (/groups/{id}/repos,/orgs,/pending-adds, the add, the removal), the same answer as for a group that does not exist: a group’s existence is not disclosed. An administrator’s session reads any group; an API token only its owner’s.A rejected group refuses an add with
409; before, the add went through and the scan skipped it.Every refusal body on the group, decision, role, removal and forge-ID adopt routes is JSON
{"error": "…"}; some were plain text. (The supply-chain routes’?group=refusals —400for a group id that is not one,404for a group that is not the caller’s — stay plain text, as the reference says.)A paste’s lines are each parsed as a repository URL first: a missing scheme is supplied, GitHub, GitLab and any git host are accepted, a line that is not a repository URL comes back in
invalid(url: why, credentials redacted) and is skipped while the rest go through; a paste with no usable line is a400. A GitHub deep link into a repository (github.com/o/r/tree/main,/issues/…) is not a repository URL; a GitLab path is taken as given, since a GitLab repository may sit at any depth.Collections answer what they hold: an id that does not exist is a
404on the detail, the copy (which answered200and linked nothing), the update, the delete and the member-group routes (which answered200or500); a duplicate name is a409(it was a500).The legacy pending-group approval is gone:
GET /api/v1/admin/groups/pendingand the group decision routePOST /api/v1/admin/groups/{id}/{decision}with itsapprovearm are removed — groups have been born approved since v0.27.20 and the migrate converted every pending one; the add-requests queue is the approval unit, and its ownapprove/rejectdecisions (POST /api/v1/admin/add-requests/{id}/{decision}) are unchanged.POST /api/v1/admin/groups/{id}/rejectremains.POST /api/v1/admin/users/{id}/adminrequires theadminfield ({}used to demote the account); self-demotion is a400, no such user a404.POST /api/v1/admin/capacity/contactrequirescontact_email({}used to clear the address; send""to clear).An API token never administers, whoever owns it (
403on every/admin/*route), and never reads as an administrator. A demoted administrator’s open session is refused by every operation of the service at once (privilege is read per operation); the administrative listing routes follow within a minute (the API’s authorization cache).GitLab groups are enumerated, by
serve, by full group path on the configuredgitlab.base_urlinstance when GitLab API keys exist; an organization URL on that instance is registered as a GitLab group and a repository URL on it is collected as a GitLab repository, whatever its host name says. A GitLab group on another instance (or on any instance whilegitlab.base_urlis empty) is refused at the add (400) and at the decision (409), as a GitHub organization offgithub.base_urlis.A forge ID is a positive decimal integer:
POST /api/v1/admin/forge-id-changes/{repoID}/adoptrefuses anything else with400instead of recording it.A collection copy’s
group_nameis bounded like any group name (at most 200 characters,400JSON past it; the copy created the group unbounded before).
Changes for API clients in 0.29.102
Stage 2 of the admin-console program (release notes 0.29.102) makes the web
GUI safe; two of its changes touch clients of the web process (aveloxis web, the OAuth origin aveloxis-gui signs in through):
POST /auth/tokenandPOST /logout(/auth/logout) are POST-only. A GET answers405and changes nothing. Minting a token and ending a session are state changes, and a state change never rides a GET (it was prefetchable and linkable). aveloxis-gui sends both as POST from its matching release, and itscheck-setup.shrequires 0.29.102.Signing out of the web GUI ends the tokens that sign-in minted. A token from
POST /auth/tokenrecords the browser session it came from;POST /logoutdeletes the session and those tokens together (a401on the next request). A token minted from a session that merely expired keeps its own 30-day life, andPOST /api/v1/auth/logoutstill ends one token on its own.A cross-site
POSTto the web process is refused (403). The request’sOrigin(orReferer) must be the web host orweb.spa_url’s origin; a browser’sSec-Fetch-Site: cross-siteis refused. aveloxis-gui on its own origin therefore needsweb.spa_urlset to that origin. A signed-in HTML form also carries a form token; the two GUI calls do not.Every answer of the web process’s handlers carries security headers (the
http_timeout_seconds503 is written outside them): a Content-Security-Policy with one script source (/static/, which now serves the page scripts and Chart.js — no CDN),frame-ancestors 'none',X-Frame-Options: DENY,X-Content-Type-Options: nosniffand a referrer policy. A page that embeds the web GUI in a frame stops working.
Changes for API clients in 0.29.99
Stage 1b of the admin-console program (release notes 0.29.99) changed what these routes answer. Each line gives the new behavior and the reason.
An unknown repository id is a
404on every repository route (/repos/{id}/..., the authz route included), before the caller’s scope is decided. It was a403for API tokens and sessions, and whatever the handler did for everyone else (200with zeros on/stats,500on/timeseries). One answer per situation:404means no such repository,403means a known repository outside an API token’s groups. An id of 0 or less is a400(invalid repo_id), like a non-integer.A date that does not parse is a
400on the Augur metrics (begin_date,end_date),/timeseries,contributions/*,/contributors/topand/contributors/elsewhere. The value fell back to the default before, which hid a client’s typo as a default window. The body names the parameter and the value (invalid since "x": want YYYY-MM-DD). Such a request is never served from the repository-page cache and never answered304.Augur’s
end_dateincludes its day, and the default window is the year before today through today (UTC days). The commit metrics (committers,code-changes,code-changes-lines, the commit half ofcontributors-new) count by the UTC day of the author timestamp, the same day/timeseriesand/compareuse, instead of the author’s local date; a commit whose author date could not be parsed is not counted (it never was by/timeseries). Thedateof a bucket is the UTC midnight that starts it, serialized in UTC.Empty lists are
[], nevernull, at every depth of every answer.The Augur catalog is scoped for API tokens:
/repos,/repo-groups(only groups holding one of the token’s repositories),/repo-groups/{id}/repos,/owner/{owner}/repo/{repo},/rg-name/{name}and/rg-name/{name}/repo-name/{repo}answer within the token’s groups. A name that exists only outside the scope is the structured403naming the repository; a name that exists nowhere is404. With a name on two forges the GitHub repository is picked, then the lower id. The repository name of the group lookup now matches without regard to letter case, like the owner lookup. Sessions, administrators and callers without an identity keep the whole catalog./watchersreturns the snapshot history (one row per metadata snapshot), like/starsand/forks; rows keep thewatcherskey./repos/stats?ids=refuses an entry that is not a repository id with a400(it skipped the entry before), and its rows carryarchived,forked_from,last_activity_atandforge_id_changesas the single-repository endpoint does: both are one reader now.The searches match
%and_literally (/repos/search, the entity search’s owner match, the monitor’s queue search); they acted as SQL wildcards.
Endpoints
Health Check
GET /api/v1/health
Returns the server status and version.
{"status": "ok", "version": "0.29.73"}
version is the running binary’s.
Public fleet stats
GET /api/v1/public/stats
Public (no token required, like /health) — the landing page’s
fleet-scale numbers. repos is the TOTAL repository count in the
catalog (v0.27.68: archived repos included — they carry full
collected history and analysis, and the number should agree with the
monitor’s queue view). v0.27.77 adds commits, issues, and prs
(sums of the collection queue’s cached cumulative per-repo gathered
totals — never a live scan of the data tables) and contributors
(the contributor catalog count). Served from a 60-second cache that
keeps the last good values if the database hiccups. Still subject to
the per-IP rate limiter. The fields are in the reference (publicFleetStats).
Repository Statistics
GET /api/v1/repos/{repoID}/stats
Returns gathered (collected totals) vs metadata (API-reported totals) for a single repo. An id no repository has is a 404 (since 0.29.99; see “Changes for API clients”). The fields are in the reference (repositoryStats). What the counts mean:
Gathered counts are the collection queue’s cached cumulative totals, as of the repo’s last completed collection cycle (v0.27.85 — the same source and freshness as the monitor, group, and collection listings; previously three live
COUNT(*)aggregates that cost ~23,500 buffer pages per call on a large repo).Metadata counts come from the most recent
repo_infosnapshot (GitHub GraphQL / GitLab API totals).Vulnerabilities come from OSV.dev vulnerability scanning.
forked_from (v0.27.79, omitted when empty) is the upstream
owner/namewhen the repository is a fork — captured from the forge on every Phase 0 cycle since v0.27.78. The literal(unknown upstream)means the forge reports fork status but the upstream was deleted or is inaccessible. Drives the repo page’s “Forked from X” chip.forge_id_changes (v0.29.62, omitted when empty) lists the forge-ID changes the operator adopted with
aveloxis adopt-forge-idor the admin approvals page’s Adopt button: the upstream repository was deleted and re-created under the same URL, and the new one was treated as a continuation, so this row holds data from both. Each entry carriesold_forge_id,new_forge_id,forge_created_at(when the forge created the new repository; omitted when unknown),first_observed_at,adopted_at,adopted_byand an optionalnote. Pending (observed, not adopted) changes are not listed. The repo page shows one notice per entry. Single-repo endpoint only.
Forge-ID changes (admin, v0.29.63)
GET /api/v1/admin/forge-id-changes?pending=1
POST /api/v1/admin/forge-id-changes/{repoID}/adopt
A repository deleted and re-created upstream under the same URL gets a new
forge ID. The org scan records the change as pending (it never changes the
repository row itself). GET lists the recorded changes: repo_id,
repo_git, old_forge_id, new_forge_id, forge_created_at (the new
repository’s creation date, when the scan listed it), first_observed_at,
last_observed_at, and for adopted ones adopted_at, adopted_by, note.
A pending change whose old ID is no longer the one the repository stores
is superseded: it stays in the full list as history and can no longer be
adopted. pending=1 lists only the
adoptable changes; the full list orders adoptable, superseded, then adopted.
POST …/adopt treats the new repository as a continuation: it moves the
stored forge ID to the one the scan observed and records the admin’s login.
The JSON body names the change, since a repository can have more than one:
{"old_forge_id": "…", "new_forge_id": "…", "note": "…"} (the note is
optional, at most 1,000 bytes). Answers 400 without both IDs, 404 when
no unadopted change with that pair is recorded, and 409 when the change is
superseded (nothing is written). The api
process holds no forge API keys, so this adopts the recorded observation;
aveloxis adopt-forge-id asks the forge live. Both require an admin Bearer
session.
API tokens (admin, v0.29.82)
GET /api/v1/admin/api-tokens
POST /api/v1/admin/api-tokens
POST /api/v1/admin/api-tokens/{tokenID}/revoke
GET /api/v1/admin/api-token-settings
POST /api/v1/admin/api-token-settings
Operator-issued API tokens for people who need more than the per-IP limit (see “Rate limits” below). A token belongs to an existing account and authenticates as that account, with its repository scope; it is counted against its own hourly and daily allowances instead of the per-IP limit.
GET /api/v1/admin/api-tokenslists every granted token, newest first (its owner, label, who granted it and when, expiry, allowances, last use and revocation; the fields are in the reference,apiTokens), plus the currentsettings. It never carries a token or its hash: only the hash is stored.POST /api/v1/admin/api-tokensgrants one. Body:{"user_id": 12, "label": "who or what it is for", "lifetime_days": 30, "rate_limit_per_hour": 1000, "rate_limit_per_day": 10000}; the last three are optional and default to the current settings. Answers201with the token ("token": "avx_…"), shown this once and sentno-store.400for a missing or unknownuser_id, an emptylabelor one over 200 characters, a lifetime that is not 1 to 365 days, or an allowance that is not a positive number. A token’s allowances are fixed when it is granted.POST …/{tokenID}/revokerevokes a token: it stops working on its next call to any api process (every call with an API token rechecks it, one indexed lookup). Revoking a revoked token is a no-op;404for an unknown id.GET/POST /api/v1/admin/api-token-settingsread and change the defaults the grant offers:{"default_rate_limit_per_hour": 1000, "default_rate_limit_per_day": 10000, "default_lifetime_days": 30}(the allowances positive, the lifetime 1 to 365 days; the values shown are the initial defaults since v0.29.89). The allowances are thetoken_requests_per_hourandtoken_requests_per_dayquotas (the same values the Capacity page shows); one thataveloxis.jsonsets is refused with409. An omitted daily value is left unchanged.
All five require an admin signed-in session: an API token, even one
granted to an administrator, is refused (403) on every admin route — a
token works as its owner for data, never to administer — and, since
v0.29.86, never as an administrator for data either: it reads only the
repositories in its owner’s groups, like any account’s (see “Shared
links” below for what a token gets outside them). Grants, revocations
and changed defaults are logged with who did them; a refused token is
logged once a minute per address, and a token over an allowance once per
window, never with the token itself.
Capacity (admin, v0.29.89)
GET /api/v1/admin/capacity
GET /api/v1/admin/capacity/largest
POST /api/v1/admin/capacity/quotas/{name}
POST /api/v1/admin/capacity/contact
GET /api/v1/admin/capacity/accounts?login=… (or ?user_id=…)
POST /api/v1/admin/capacity/accounts/{userID}
POST /api/v1/admin/capacity/signup-allowlist
POST /api/v1/admin/capacity/signup-allowlist/remove
The fair-use quotas (see “Rate limits” below and the capacity section
of the configuration guide), for aveloxis-gui’s Capacity page.
Administrator sessions only, like the token routes.
GET /api/v1/admin/capacityanswers every quota as applied (its value, mode —enforce,shadoworoff— andsource, theaveloxis.jsonword, witheditablefor the ones this route may change), the contact address refusals name, sign-ups per UTC day over the last 30 days, the sign-up allowlist, the accounts with their own values, and the busiest accounts today by saved session requests (at most 25). The fields are in the reference (capacityOverview).GET …/capacity/largestlists the accounts with the most repositories in their groups (at most 25). It reads every group link, so the page loads it only when asked.POST …/capacity/quotas/{name}{"allowed": 5000, "mode": "enforce"}saves one quota; the api processes apply it within a minute.409whenaveloxis.jsonsets the quota (DEFAULT, SHADOW or OFF),404for an unknown name,400for a value that is not positive or an unknown mode.POST …/capacity/contact{"contact_email": "…"}(the field is required since 0.29.100:{}used to clear the address) sets the address every refusal invites a heavy user to write to (empty: none offered).GET …/capacity/accounts?login=…(or?user_id=…) reads one account: itsuser_id,login,provider(the forge of its last sign-in) andgitlab_host, itsoverride, itsrepos(used,allowed,mode,exempt) and itsrequests_today.404for no such account,400for auser_idthat is not a positive integer in range. A login that more than one account has apart from letter case answers409withcandidates(eachuser_id,login,provider,gitlab_host): open the right one by?user_id=.POST …/capacity/accounts/{userID}{"repos_allowed": 5000, "requests_per_hour": null, "requests_per_day": 20000, "links_per_day": null, "note": "lab course, through May"}raises or lowers one account’s values (null: the quota’s value; allnulland no note removes the override).POST …/capacity/signup-allowlist{"cidr": "192.0.2.0/24", "note": "…"}exempts a network from the sign-up quota (an organization behind one address);…/remove{"cidr": …}removes it (404when it is not listed). Networks are stored normalised.
Every change is logged with who made it.
Batch Statistics
GET /api/v1/repos/stats?ids=1,2,3,42
Returns stats for multiple repos in one call. Response is a map keyed by repo ID. Since 0.29.99 the single-repository endpoint and this one are the same reader: every row carries every field the single endpoint does (archived, forked_from, last_activity_at, forge_id_changes included), and an ids entry that is not a positive integer is a 400 instead of being skipped, and an id no repository has is left out of the answer (it was a row of zeros).
Since v0.28.7 the batch rows carry the same gone_at and
metadata_as_of fields as the single-repo endpoint (and, since
v0.29.70, unavailable_reason and unavailable_url), and requested ids
with no collection-queue row (the prelim-dequeued “gone” cohort) fall
back to live gathered counts instead of serving zeros — the two
endpoints can no longer disagree about a vanished repository. The
fallback runs only for that rare queueless subset; every tracked repo
stays on the cached queue counts.
Since v0.28.10 the id list is capped at 500 per request (requests above the cap get a 400) — the queueless fallback makes per-id cost non-trivial for gone repos, so the batch stays bounded. Every real consumer (monitor at 200/page, group pages at 100/page) sits well under the cap.
Time Series
GET /api/v1/repos/{repoID}/timeseries
GET /api/v1/repos/{repoID}/timeseries?since=2024-01-01
Returns weekly aggregated counts for commits, PRs opened, PRs merged, and issues.
Every commit window on this API — this series, /contributors/top, /contributions/*, /compare — ends no later than the latest plausible commit time, two UTC days after now, and starts no earlier than the earliest, 1970-01-02, whatever since and until say. An author timestamp is an absolute instant, so only a wrong committer clock can place one in the future (the margin is a day of skew rounded to a day-aligned edge), and a Unix clock cannot place one before the epoch, which is what an unset clock stamps. Repositories carry the occasional author date in 2080 or 1970, and such a date must not stretch a window. The rows stay stored; only the windows are bounded.
since (default: two years ago) and until (default: the latest plausible
commit time; the last day of the window, inclusive) are YYYY-MM-DD; a value
that does not parse is a 400 (since 0.29.99). The fields are in the reference (repositoryTimeSeries).
Weeks are Monday-aligned via PostgreSQL date_trunc('week', timestamp). Queries use indexed timestamp columns for fast responses even on large databases.
Dependency Licenses
GET /api/v1/repos/{repoID}/licenses
Returns a summary of dependency licenses with counts and OSI compliance status, in an envelope that says whether the repository has been scanned at all (see “Vulnerabilities and home tab” below). The fields are in the reference (repositoryLicenses).
license is the table’s row key: the license normalized to canonical SPDX, with the operands of OR and AND in a fixed order, so MIT OR Apache-2.0, Apache-2.0 OR MIT and MIT/Apache-2.0 are one row (since v0.29.67). is_osi follows the SPDX license list’s isOsiApproved (the list is embedded; no network): an OR is approved when any option is, an AND when every term is, and X WITH exception follows X. Unknown and free text are never approved, including an OR with free text in one option (MIT OR proprietary is not an expression); a LicenseRef- option counts as recognized.
Parameter |
Values |
Default |
Description |
|---|---|---|---|
|
|
|
v0.27.46: |
Repository Search
GET /api/v1/repos/search?q=augur
Case-insensitive search across repo name, owner, and URL. Returns up to 20 matches (id, owner, name); [] when nothing matches. % and _ in the query match themselves (since 0.29.99). Used by the comparison page’s autocomplete search. The fields are in the reference (repositorySearch).
SBOM Download
GET /api/v1/repos/{repoID}/sbom?format=cyclonedx
GET /api/v1/repos/{repoID}/sbom?format=spdx
Generates and downloads a Software Bill of Materials in CycloneDX 1.7 (1.5 until v0.29.67) or SPDX 2.3 JSON format. The SBOM is generated on-the-fly from collected dependency data.
Since v0.27.134, repositories with C2 lockfile data (collection.vuln_scan_transitive enabled) get the real dependency graph: lockfile transitives join the component/package list, CycloneDX’s dependencies array carries actual parent→child links from the stored edges (root → direct set; parents → their children; unreachable packages stay leaves), and SPDX gains the matching package→package DEPENDS_ON relationships. Repositories without C2 data keep the flat pre-v0.27.134 shape byte-identical.
Parameter |
Values |
Default |
Description |
|---|---|---|---|
|
|
|
SBOM format |
|
|
|
v0.27.46: |
|
|
absent |
Annotate with the repo’s CURRENT (unresolved) findings. CycloneDX: native |
Returns JSON with Content-Disposition: attachment header for download.
Contributor identities in a window
GET /api/v1/repos/{repoID}/contributions/identities
GET /api/v1/repos/{repoID}/contributions/identities?since=2024-01-01
GET /api/v1/repos/{repoID}/contributions/identities?since=2024-01-01&until=2024-12-31
Returns every distinct contributor who made any kind of contribution to the repo in the requested window. The result is one row per person, suitable for rendering a roster or building an affiliation chart against a derived per-person grouping.
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
date (YYYY-MM-DD) |
2 years ago |
Window lower bound (inclusive) |
|
date (YYYY-MM-DD) |
unbounded (now) |
Window upper bound (inclusive — see note below) |
The until date is treated as inclusive of the entire calendar day — the server shifts it by +1 day before comparing against the half-open < upper SQL filter, so passing until=2024-12-31 captures everything through 2024-12-31T23:59:59.999Z.
A date that does not parse as YYYY-MM-DD is a 400 naming the parameter (since 0.29.99; it fell back to the default before, which hid a client’s typo as a default window), and so is since >= until.
One row per person: the identity (cntrb_id, login, full_name, email, profile_company, location) and the activity classification below. The fields are in the reference (repositoryContributorIdentities).
All string fields are normalized server-side: "" represents “no value recorded” (no per-field null handling needed on the client). Ordering is by login NULLS LAST, full_name NULLS LAST so unidentifiable contributors sort to the bottom of the roster.
Activity classification fields (v0.27.57, GitHub only — GitLab has no
equivalent of restrictedContributionsCount, so gl-side contributors keep
an empty activity_class): sourced from GitHub’s GraphQL
contributionsCollection over the trailing year and refreshed by a
scheduler sweep on the breadth cooldown cadence.
|
Meaning |
|---|---|
|
Public contributions > 0 in the trailing year. |
|
Zero public, but the user disclosed private activity ( |
|
Nothing observable this year; |
|
Nothing, ever. Render this honestly — GitHub deliberately makes truly-inactive indistinguishable from active-only-in-private with disclosure off. |
|
Never checked yet, GitLab-side contributor, or the account was deleted/renamed at check time. |
public_contribs_year is derived as calendar-total minus restricted
(the calendar includes disclosed private contributions).
What counts as a contribution (all in one window via the unified messages table and the standard work-tracking tables):
Kind |
Source table |
Time column |
|---|---|---|
Commit authorship |
|
|
Issue opened |
|
|
Issue closed |
|
|
Issue event (label / assignment / reference) |
|
|
PR opened |
|
|
PR review submitted |
|
|
PR event |
|
|
Any message (issue comment, PR conversation comment, inline review comment body) |
|
|
Per the “Unified message architecture” contract, all three text-contribution kinds live in messages with cntrb_id as the author — one filter covers them all.
What’s intentionally not counted:
Assignees and reviewers who never actually did anything — being asked to review isn’t a contribution. They show up in
*_assignees/*_reviewerstables but aren’t surfaced here.Commits whose
cmt_ght_author_idis NULL — these are commits aveloxis hasn’t been able to resolve to a contributor row (private email, or the search-resolve background ticker hasn’t reached them yet). They don’t have acntrb_idto return. The number of such commits in a given window is queryable via the metric endpoints (/code-changes) and the gap is closed over time by the v0.19.2 search-resolve work.contributor_reporows from the breadth worker — those represent “this person was active anywhere on the repo at some point” but the time semantics are different (collection-cycle timestamp, not when the contribution happened), so they don’t belong in a contribution-window query.Soft-deleted contributors (
cntrb_deleted != 0) — the v0.20.2 logical-merge path marks loser rows when a rename was detected. Filtering them out is the contract; merged identities surface only under the winningcntrb_id.
Affiliation breakdown for the same window
GET /api/v1/repos/{repoID}/contributions/affiliations
GET /api/v1/repos/{repoID}/contributions/affiliations?since=2024-01-01&until=2024-12-31
Returns the count of distinct contributors per affiliation, using the same window and the same contribution-kind definition as /contributions/identities. The two endpoints share a single SQL CTE on the server so the two responses can never disagree on which people are in scope — a sum across this endpoint’s contributor_count values equals the row count of /contributions/identities.
Same since / until parameters as the identities endpoint; same behavior on malformed input and since >= until.
One row per affiliation with its distinct-contributor count. The fields are in the reference (repositoryContributorAffiliations).
Ordered by contributor_count DESC then affiliation ASC. The (unknown) bucket is included rather than hidden so callers can decide whether to surface unaffiliated contributors (often the right call on community projects) or omit them.
Affiliation derivation priority (applied per-contributor):
contributor_affiliations[domain_of(cntrb_canonical)]— the curated email-domain → org map maintained by aveloxis’sPopulateAffiliationsbackground task. This is the most reliable signal because it covers people whose GitHub/GitLab profile is blank but whose verified email domain is well-known (e.g.@redhat.com→ “RedHat”).cntrb_company— what the user typed into their GitHub or GitLab profile. Freeform text; often blank, sometimes “@org” (the GitHub@-mention reference style — aveloxis strips the leading@before using it as an affiliation label).(unknown)— fallback bucket for contributors with neither a domain-mapped canonical email nor a profile company string.
The derivation priority is deliberate: the curated domain map is updated by a background task that watches observed contributor data, while the profile field is freeform and easily stale (“Self-employed”, “Earth”, typos of well-known company names, etc.). When both are present the domain-mapped value wins because it’s more likely to be canonical.
Tweaks you can make on the client side
Narrow to creative work only: this endpoint includes everything. To exclude event-only activity (labels, references) post-process the identities list against another endpoint that’s restricted to commits/PRs/issues only, or filter on the client.
Group of repos: the two endpoints are per-repo. For an org-wide rollup, call them for each repo in the group and merge the responses (the
cntrb_idcolumn is stable across repos so dedup is trivial).Hide the
(unknown)bucket: filter on the client. The server returns it so the math reconciles with/contributions/identities.Different windows:
?since=YYYY-MM-DDand?until=YYYY-MM-DDare both accepted independently. Omituntilfor “everything sincesince”.
Top contributors, ranked (v0.27.61)
GET /api/v1/repos/{repoID}/contributors/top
GET /api/v1/repos/{repoID}/contributors/top?since=2024-01-01&until=2024-12-31&limit=20
The ranked “who does the work here” table behind the repo page’s Top
contributors card. Same since/until window semantics as the
/contributions/* endpoints (default: trailing 2 years; until is
inclusive); limit defaults to 20 and is capped at 100.
Caching (since 0.29.71; 0.29.73). With api.response_cache_mb set, a
repository’s own GET answers (this endpoint, /timeseries, /licenses,
/deps, /libyear, /scancode-*, /vulnerabilities, /scorecard,
/sbom and /contributions/*) are reused until the repository is collected
again or scanned; with it unset (the default) only this endpoint and
/timeseries are, up to 1,000 answers. Answers that name contributors are also recomputed after
collection.enrich_interval_minutes (default 30). These answers carry an
ETag (weak for answers that depend only on the repository’s state); a
request whose If-None-Match names the current one gets
304 Not Modified. A response served from the cache carries X-Cache: hit.
Each entity’s series on /compare is reused inside the response, and only a
whole-response hit (below) carries the header. Shareable answers carry
Cache-Control: no-cache with a weak ETag, so a client revalidates every
time and gets a 304 when nothing changed. An answer that depends on who
asks — the per-user routes, every 401/403, and a response that just
added the repository to the caller’s group — carries
Cache-Control: private, no-store and is never cached by anything.
GET /api/v1/authz/repos/{repoID} (0.29.73) returns 204 when the caller
may read that repository, otherwise the same 401/403 the data endpoints
return. It returns no data.
?bots=hide (v0.27.69; widened v0.28.1 and v0.29.70) filters automation
identities by four markers: the non-human account types
gh_type IN ('Bot', 'ProgrammaticAccessBot', 'Organization')
(GitHub App accounts like dependabot[bot]; fine-grained-PAT
actors; org accounts acting as contributors — the codecov shape,
whose enriched row is typed Organization), the [bot] login
suffix, a login ending in bot (so -bot, -robot and
separator-less names such as pytorchmergebot; digits may follow —
the k8s-ci-robot class, which GitHub types as a regular User,
verified live), and the curated system-account list (actions-user,
web-flow, ghost, codecov, codecov-io, codecov-commenter — machine
accounts GitHub types as plain User). Mannequin rows are
deliberately NOT hidden: mannequins are import placeholders
standing in for unmatched humans, not automation. Logins ending in a
surname that ends in bot (abbot, barbot, cabot, chabot, jabot, rabot,
talbot) stay visible. Deliberately
broader than the contributor_retention metric’s bot exclusion,
which is pinned to 8Knot parity; this one is a display filter. The same parameter works
on /contributors/elsewhere so the two surfaces stay consistent. Requires the
same repo scope as every other per-repo endpoint. This endpoint’s answers
are cached as the caching paragraph above describes; /contributors/elsewhere
reads other repositories’ activity and keeps a 60-second cache.
The answer echoes the window and the limit and ranks the contributors with their per-kind counts and a total. The fields are in the reference (repositoryTopContributors).
What counts, per column: commits = DISTINCT commit hashes authored
(windowed on the commit’s author timestamp); issues = issues opened;
prs = pull requests opened; reviews = PR reviews submitted;
comments = unified messages (issue comments + PR conversation +
inline review comments). total is the sum and the ranking key.
Issue/PR events (labels, assignments, closes) deliberately do NOT
count here even though they DO count for cohort membership in
/contributions/identities — this endpoint ranks creative/review
work; the identities endpoint enumerates everyone who touched the
repo at all. activity_class is the v0.27.57 classification (empty =
never checked, GitLab-side, or — since v0.27.81 — an account whose
activity query exceeds GitHub’s per-query resource budget even when
fetched alone; those accounts are stamped checked without a class so
they stop re-claiming). Commits whose author was never resolved
to a contributor identity are excluded — there is no identity to rank.
Where else are these contributors active? (v0.27.64)
GET /api/v1/repos/{repoID}/contributors/elsewhere
GET /api/v1/repos/{repoID}/contributors/elsewhere?since=2026-02-01&limit=10
For the repo’s top contributors (same ranking as /contributors/top;
limit default 10, cap 25), their top-10 OTHER repositories from the
v0.27.58 contributor daily-history tables (GitHub
contributionsCollection data), aggregated over the window (since
defaults to the trailing 180 days — the standard history window).
Each contributor carries backfilled_at and an elsewhere list of other repositories with active days and per-kind counts. The fields are in the reference (repositoryContributorsElsewhere).
Reading backfilled_at (the honesty rule): a null stamp means
the v0.27.58 history backfill has not reached this contributor yet —
their empty elsewhere array is “history pending”, NOT “active
nowhere else”. Frontends must render the two differently. Exception
(v0.27.81; widened v0.28.1): accounts typed Bot /
ProgrammaticAccessBot / Organization and the curated system-account
list (actions-user, web-flow, ghost, codecov, codecov-io,
codecov-commenter) are excluded from the backfill claim entirely —
their stamps stay null permanently by design (their histories are
the most expensive to fetch and the contributor surfaces exclude
bots from display anyway). repo_id
is present only when the repo is tracked on this instance
(GitHub-side match; the history source is GitHub-only). The current
repo is excluded case-insensitively (GitHub’s canonical casing can
differ from ours).
One contributor’s cross-repo activity (v0.27.64)
GET /api/v1/contributors/{cntrbID}/activity
GET /api/v1/contributors/{cntrbID}/activity?bucket=month&months=24
The person-level view: monthly per-repo activity buckets (top-10
repos by total activity in the window) plus the contribution
calendar’s disclosed day-total series (day_totals — includes
private contributions when the user enabled disclosure, which is why
it can exceed the per-repo sum). months defaults 24, caps 60;
bucket accepts only month (400 otherwise — reserved for future
granularities). cntrbID must be a UUID (400 otherwise); unknown
contributors 404. Operational failures (database errors) surface as
500, never 404 — a 404 always means “this id parsed but nobody has
it” (v0.27.76).
Requires a Bearer identity but NOT repo scope: person-level history
spans repositories this instance doesn’t track, so repo scope cannot
express an authorization boundary for it — and it is not anonymous
data, so a signed-in identity is the floor. Carries backfilled_at
with the same semantics as /contributors/elsewhere.
Knowing whether your coverage is complete
GET /api/v1/repos/{repoID}/contributions/coverage
GET /api/v1/repos/{repoID}/contributions/coverage?since=2024-01-01&until=2024-12-31
Returns the enrichment-state snapshot for the same cohort as /contributions/identities and /contributions/affiliations. Operators call this before drawing conclusions from the affiliation breakdown to tell whether an (unknown) bucket represents truly unaffiliated contributors or just people the v0.18.29 enrichment ticker hasn’t reached yet.
Same since / until parameters as the other two endpoints; same behavior on malformed input and since >= until.
The answer carries the window and the counts the field-by-field table below explains. The fields are in the reference (repositoryContributionsCoverage).
The two timestamp fields are omitted entirely when the cohort has no rows in the relevant state (no pointer → field absent in JSON rather than emitting zero-time, which is operator-confusing).
Reading the response. A response with total=412, enriched=389, affiliation_resolved=318, affiliation_unknown=94 reads as:
412 people contributed in the window. 389 of them have been successfully enriched via
/users/{login}and 23 haven’t yet — the enrichment ticker is still working through them. 318 have a resolvable affiliation (either via the curated email-domain map or via their profile company field). 94 are bucketed as(unknown)— but 23 of those might be the unenriched cohort that will pick up an affiliation once the ticker reaches them. So the true unaffiliated count for this window is somewhere between 71 (if all 23 unenriched contributors turn out to be unaffiliated) and 94 (if none of them do).
Operators surface this floor-and-ceiling on dashboards rather than reporting (unknown) alone — the latter conflates “no affiliation” with “we haven’t asked yet.”
Field-by-field reference:
Field |
Source signal |
What it tells you |
|---|---|---|
|
The cohort |
Denominator for everything else |
|
|
|
|
|
Verified email known — drives domain → affiliation lookup |
|
|
Person matched to numeric GitHub user (stable identity across renames) |
|
|
v0.19.2 search-resolve ticker has tried to look this person up by email (60-min cooldown, 30-day re-attempt) |
|
|
v0.20.17 breadth worker has tried |
|
Domain-mapped via |
Will show up under a non- |
|
|
The |
|
|
How long the most-delayed unenriched contributor has been waiting — compare against your configured |
|
|
Oldest “last refreshed” timestamp — surfaces the long tail of “enriched 18 months ago and never refreshed” |
Spotting a stuck enrichment ticker. If enrichment_oldest_pending is more than ~2× your configured enrich_interval_minutes behind NOW(), the ticker may be stuck. Investigation:
# What does the enrich interval look like?
grep enrich_interval_minutes ~/.aveloxis/aveloxis.json
# Has the enrichment ticker been ticking?
grep -E "EnrichThinContributors|enrichment" ~/.aveloxis/aveloxis.log | tail -20
# Are we burning API budget?
grep -E "all API keys rate-limited|rate limit" ~/.aveloxis/aveloxis.log | tail -10
If the ticker is running but enrichment is still falling behind, it’s almost always API-key budget exhaustion (the v0.18.29 EnrichBatchSize = 14000 per tick is sized for a 73-key fleet; smaller key pools can’t keep up).
What this endpoint doesn’t tell you:
Per-affiliation coverage drill-down: the response is global to the cohort. If you need “what % of Acme Corp contributors have canonical emails” specifically, that’s a derived query — call
/identitiesand group client-side, or open an issue for a per-affiliation coverage endpoint.Whether
PopulateAffiliationsis current: the domain-mapped affiliations come from thecontributor_affiliationstable, which is rebuilt hourly by the v0.19.7 ticker. The table state at any given moment reflects the most recent successful rebuild, not a continuous live view. If you’ve just added new contributors with novel company strings, give it an hour forPopulateAffiliationsto surface them in the map.Fleet-wide coverage: this endpoint is per-repo. For a fleet-wide rollup, call it per repo and aggregate (or, if there’s operator demand, request a
/api/v1/contributions/coverageglobal endpoint as a follow-up).
When to use which endpoint
Need |
Use |
|---|---|
“Who contributed to this repo in the last two years?” |
|
“How many people from each company contributed?” |
|
“Is the affiliation data trustworthy yet, or is enrichment still catching up?” |
|
“How many new contributors per month did this repo gain?” (Augur metric) |
|
“Total contributor count, no window” |
|
“How many commits per week?” |
|
The Augur-compatible endpoints (/contributors, /contributors-new, etc.) follow Augur’s swagger spec with begin_date / end_date / period query params and return aggregated counts. The /contributions/* endpoints follow the aveloxis convention (since / until) and return per-contributor identity rows, an aggregated affiliation roll-up, and a coverage snapshot respectively. The two groups serve different questions and don’t overlap.
Mailing-list collection coverage
GET /api/v1/mailing-list/stats
Fleet-wide rollup of the mailing-list ingestion subsystem (architecture) — the same data as aveloxis mailing-list-stats. No parameters. Returns 500 if the query fails.
The keys are PascalCase (the rollup struct carries no JSON tags); the fields are in the reference (mailingListStats). What they mean:
Field |
Meaning |
|---|---|
|
registered lists, and how many have finished their current scan |
|
total |
|
rows classified as mirror mail ( |
|
messages that named a repo (Axis B) / those resolved to a repo we hold. The ratio is catalog-coverage, not quality — unresolved signals point at sibling repos not yet tracked. |
|
mailing-list message bodies / those whose sender resolved to a contributor (improves over time via the hourly backfill) |
|
per- |
Scancode results
Per-file license and copyright data gathered by the decoupled scancode worker (v0.21.0+).
GET /api/v1/repos/{repoID}/scancode-licenses— aggregated license breakdown from per-file scan results, pluslast_runandscancode_versionfreshness metadata.GET /api/v1/repos/{repoID}/scancode-files— per-file rows (path, detected license expression, copyright holders) backing the repo detail page’s sortable table.
Augur-compatible metric endpoints
For 8Knot and other Augur API consumers, the server also exposes the
Augur swagger-spec metric routes. They use Augur’s parameter conventions
(begin_date, end_date, period) rather than the native since/until.
Both dates are inclusive UTC days (the default window is the year before
today through today), a date that does not parse is a 400, an unknown
repository id is a 404, and an empty series is [] (all since 0.29.99).
The series keep Aveloxis’s uniform value field where Augur names the
field per metric; /watchers keeps Augur’s watchers.
Catalog routes: /api/v1/repo-groups, /api/v1/repos,
/api/v1/repos/{repoID}, /api/v1/repo-groups/{groupID}/repos,
/api/v1/owner/{owner}/repo/{repo}, /api/v1/rg-name/{rgName},
/api/v1/rg-name/{rgName}/repo-name/{repoName}. An API token sees only
its owner’s groups through them (since 0.29.99): a group is listed when it
holds one of the token’s repositories, a name that exists only outside the
scope is the structured 403, a name that exists nowhere is 404.
Per-repo metrics (all under /api/v1/repos/{repoID}/):
Category |
Endpoints |
|---|---|
Issues |
|
Pull requests |
|
Commits |
|
Contributors |
|
Popularity |
|
Code / deps |
|
Other |
|
License drill-down on /deps (v0.28.1)
GET /api/v1/repos/{repoID}/deps accepts two optional parameters
that turn it into the drill-down behind the dependency-licenses
table:
license=<canonical>— only rows whose license normalizes to the given canonical bucket (the sameNormalizeLicenseToSPDXmerge the licenses aggregate applies, so “MIT License”-spelled rows match theMITbucket). Pass thelicensevalue exactly as the/repos/{id}/licensesresponse returned it.scope=runtime|all— the same scope filter as/licenses(runtimeexcludes dev/test/build/optional/peer rows). Invalid values are a 400.
With EITHER parameter present, the row universe mirrors the licenses aggregate exactly (GitHub-Actions rows excluded — they carry no license data), so a license bucket counting N always drills down to exactly N rows. With NEITHER parameter, the legacy behavior is unchanged: the full raw dependency list, unfiltered.
CORS
CORS is handled by a single middleware (v0.27.1). With api.cors_origins
unset the API returns Access-Control-Allow-Origin: * (compatible with the
web GUI’s cross-port fetches); once configured it becomes a strict
allowlist — set it in production deployments, listing the aveloxis-gui
origin (and the web GUI origin if its pages fetch the API cross-port).
Deployment
The three processes are started together with aveloxis start all (pidfiles
and logs under ~/.aveloxis/) or, on a production host, as systemd units
(Running as a Service); the whole layout — proxy,
OAuth, the first admin, upgrades — is
Production Deployment.
Each api process keeps its own state: the per-repository response cache
(up to api.response_cache_mb, or 1,000 weekly-series and top-contributor
answers when it is unset), a short authorization cache, and these rate-limit
counts: the per-IP buckets, the hour windows of session and API-token quotas
(requests_per_hour, token_requests_per_hour) and the per-user cap on
repositories added to Shared with Me by viewing them. All of those start over
when the process restarts. The day counts of sessions and API tokens
(requests_per_day, token_requests_per_day) are shared through the
aveloxis_ops.request_counts table: every api process adds its counts there
about once a minute and when it stops, so they survive a restart and are
shared by all instances. Several instances behind a load balancer each compute
and hold their own answers, and the per-IP limits and hour windows are per
instance; run one per host unless that is what you want.
The web GUI’s charts fetch the API through the web process, which proxies
/api/* to web.api_internal_url (http://127.0.0.1:8383 by default);
when the API moves, that URL must follow. Behind a reverse proxy, keep the
GUI host’s /api/ on the web process — it attaches the signed-in session’s
Bearer, so a direct route answers 401 under api.require_auth — and set
web.trusted_proxy and api.trusted_proxy so the per-visitor limits see
each visitor (since 0.29.91). A script with its own token reaches the API on
a host of its own (aveloxis-gui’s host forwards /api/ to the API itself);
see “Reverse proxy” in Production Deployment.
Comparison analytics (v0.27.2)
See docs/guide/metrics.md for the metric definitions (“Improvements
on CHAOSS metrics”). Entities: repo:<id> or org:<host>/<login>
(≤7 per request; an org is the union of its tracked repos, capped at
500). All entities are validated against the caller’s §2b scope.
Out-of-scope selections auto-add (v0.27.14). When an
authenticated non-admin selects a COLLECTED entity entirely outside
their groups, the request no longer dead-ends in a 403: the entity’s
already-collected repos are added to the user’s implicit
“Comparisons” group (created on first use, normal v0.19.0 status
rules — the same pattern as the v0.27.4 “Starred” group), the request
proceeds, and the response carries a one-time
added_to_group: [{entity, group}] notice for the GUI toast
(responses carrying it are never cached). Org entities add only the
org’s already-collected repo set (≤500) — org TRACKING is never
registered, so the flow can never enqueue new collection; approval
continues to gate collection, not visibility. The structured 403
(entity_out_of_scope) remains for entities that resolve to nothing
collected.
Comparisons is a persistent record (v0.27.86). Every
authenticated compare — admins and in-scope selections included —
silently links its REPO entities into the caller’s “Comparisons”
group, so the group is the standing record of what the user has
compared (before this, only the out-of-scope auto-add above wrote to
it, and admin comparisons left no trace). Repo entities only: org
entities are never recorded (an org expands to up to 500 repos).
Idempotent, best-effort (a record failure never fails the compare),
and notice-free — added_to_group stays reserved for the
scope-granting auto-add.
GET /api/v1/metrics— the metric catalog (docs-as-data; drives the GUI’s popovers and reference page).GET /api/v1/compare?entities=repo:1,org:github.com/chaoss&metric=contributors&since=2023-07-01&until=2026-07-01&bucket=week— temporal metrics; window defaults to the trailing 3 years; bucket week (default) or month; buckets are densified (aligned x-axes). Whole responses are cached 60s per (user, query) (X-Cache: hit); each entity’s series is also reused under its repositories’ collection state, for at mostcollection.enrich_interval_minutes(see the caching note under the top-contributors endpoint). The default window starts on the bucket boundary three years before the last complete bucket.Per-entity window clamp (v0.27.24): each entity’s series is densified from
max(since, its first activity)— the least of first issue, first PR, first commit, and the forge’s repo creation date — so young repositories chart from when their data starts instead of padding zeros back to the window start. Each series entry carriesdata_start(YYYY-MM-DD, omitted when the entity has no dateable activity). Series in one response may therefore have different lengths: consumers must align them by bucket value, not array position. The clamp is per-entity, not per-metric — a repo whose issues begin a year after its commits shows that year as real flat zeros.metric=contributor_retention(v0.27.16) additionally acceptsretention_threshold=N(N ≥ 1, default 4 — 8Knot’s “Contributions Required” default): contributors with ≥ N total contributions across all collected history are “repeat”, the rest “drive-by”, bucketed by the month/week of their FIRST contribution. Each series in the response carriespoints(per-bucket total) plusparts.drive_byandparts.repeatcomponent series — the only multi-series temporal metric.
GET /api/v1/compare/snapshot?entities=...&metric=labor_investment— snapshot metrics (labor_investment, upstream_dependencies, license_coverage) with per-entity value + as_of + detail.GET /api/v1/entities/search?q=augur— picker results in three classes:in_scope(chartable now),collected(one click to add),uncollected(submit a collection request).
Rate limits
Aveloxis runs on limited hardware, so callers have fair-use limits. Every refusal says which limit was reached, when it resets (or how to make room) and whom to write to for more (v0.29.89).
The per-IP limit (api.rate_limit_rps, default 1 request per second with a
burst of api.rate_limit_burst, default 10, and api.rate_limit_daily,
default 1,000 per day) applies only to callers without a valid token
(v0.29.82). Clients on an exempt network (api.exempt_cidrs) are not
limited by it. A valid token is counted against its own quotas from every
address, exempt networks included.
A valid session token (signed in, below) is counted per account against
requests_per_hour(5,000, from the hour’s first request) andrequests_per_day(10,000, the UTC day). An administrator can give one account other values. An administrator’s own session is counted but never refused.An operator-issued API token (
Authorization: Bearer avx_…) is counted against its own hourly and daily allowances (by default 1,000 an hour and 10,000 a day since v0.29.89; 5,000 an hour for tokens granted before), whatever address the calls come from.No token, an unknown token or an expired one is counted per IP, with
429andRetry-Afterpast the limit. An address over its limit that has just presented an invalid token gets its further tokens refused without a lookup for a minute, unless they are already known valid; such a refusal past the daily quota has aRetry-Afterof when that minute ends (an empty bucket’s refusal keepsRetry-After: 1).
Each quota runs in a mode the operator chooses: enforce (refused past
the value), shadow (counted and logged, never refused: how a new limit
starts) or off. Hours are counted by each api process; days are
shared by all of them through the database, at most a minute behind.
An answer counted against an enforced quota carries the
IETF RateLimit-Policy and RateLimit headers
(for example RateLimit-Policy: "token_requests_per_hour";q=1000;w=3600
and RateLimit: "token_requests_per_hour";r=998;t=3412, the tightest
quota) and the older X-RateLimit-Limit, X-RateLimit-Remaining and
X-RateLimit-Reset (Unix seconds) for that quota; all of them and
Retry-After are readable by cross-origin browser clients. A quota in
shadow is not advertised.
A refusal by a quota is one JSON shape, never stored:
{
"error": "capacity_limit",
"kind": "rate",
"quota": "requests_per_hour",
"window": "hour",
"used": 5000,
"allowed": 5000,
"reset_at": "2026-10-10T14:02:11Z",
"retry_after": 1834,
"contact": "aveloxis.io@gmail.com",
"message": "This account has reached its limit of 5,000 requests per hour. …"
}
A rate quota answers 429 with Retry-After. The repository allocation
("kind": "allocation", quota repos_per_account: at most 1,000
repositories across an account’s groups, additions waiting for approval
included) answers 403 with wanted (how many more the refused change
would have added) and no Retry-After: nothing frees up with time. Make
room by removing repositories from your groups
(POST /api/v1/groups/{groupID}/repos/{repoID}/remove), or write to the
contact address. Removing makes room only for repositories you added
yourself: a group that tracks an organization gets that organization’s
repositories linked back by the next scan. A repository you already have in
another group always links.
Repositories newly added to an account’s groups are also counted per UTC day
(quota repo_links_per_day, "kind": "rate": 429 with Retry-After
until 00:00 UTC). Removing one does not give the addition back, so the daily
count bounds adding, reading and removing in a loop. Repositories an
organization scan links count too, unless an administrator approved that
organization for that group (v0.29.91): an organization you add that is
already tracked elsewhere is approved automatically, and its repositories
count. Repositories a paste brings under web.auto_approve_add_limit count
as well, decided with the paste, all or nothing. A bulk add or a collection copy that does not fit adds nothing, even when
the same account adds from somewhere else at the same moment: the
repositories already tracked are linked, and the new ones recorded (for
approval, or as approved when web.auto_approve_add_limit applies, which
then processes them), in one step (v0.29.90).
GET /api/v1/me carries the caller’s numbers in capacity: repos
(used, allowed, mode, exempt, contact) and requests (each
window’s quota, window, used, allowed, mode and reset_at, as
this api process counts them).
Authentication: getting an API token
When api.require_auth is true, every data endpoint (everything
except GET /api/v1/health and GET /api/v1/public/stats) requires a session token sent as
Authorization: Bearer <token>. Exempt-CIDR clients (same box / LAN
by default) bypass this for the read endpoints; the portal endpoints
above always require a token regardless.
Using the web GUI: nothing to do. The built-in GUI’s web process mints a
token for your session and attaches it to every /api/ request it forwards
(0.29.110; the browser never holds it, and signing out revokes it), so the
pages count against your session’s request quotas like the SPA’s. The SPA
exchanges your session for a token through POST /auth/token and stores it
in the browser.
For scripts, curl, or notebooks, mint a token through the same exchange:
Sign in to the web GUI (GitHub or GitLab OAuth) in your browser.
In the same browser, mint a token with a POST to
/auth/token(POST-only since 0.29.102; a GET answers405). The browser’s console on the site does it in one line — the session cookie rides along:fetch('/auth/token', {method: 'POST'}).then(r => r.json()).then(console.log)
You get JSON back:
{"token": "64-hex-chars...", "expires_at": "2026-08-13T10:00:00Z", "user_id": 3, "login": "yourlogin"}
Copy the
tokenvalue and send it on every request:SITE=aveloxis.example.org curl -H "Authorization: Bearer $TOKEN" \ "https://$SITE/api/v1/compare?entities=repo:42&metric=contributors"
Token semantics:
Tokens are DB-backed and live 30 days — they survive server restarts. An expired or unknown token gets a structured 401; sign in again and mint a new one. A token the server could not resolve because the database failed (validating it, or reading its account flags or scope) gets a structured 503 with a try-again body (v0.29.68) — never the 401, which the GUI treats as “the token is gone”; retry the request.
Each
POST /auth/tokenmints a new token; existing tokens keep working until they expire, so long-running scripts aren’t cut off when you log in elsewhere.Signing out ends the token (v0.29.82):
POST /api/v1/auth/logoutwith the session token as the Bearer deletes it server-side (204; a missing token401, an API token400— an administrator revokes those; an already-invalid token gets401whenapi.require_authis on,204otherwise). The GUI’s Sign out calls it. Before 0.29.82 a token copied before sign-out stayed valid for its 30 days. Signing out a session is never refused by a spent request quota and is not counted (v0.29.91); an API token on this route is counted like any request (it is answered400).Session tokens are stored only as their SHA-256 hash (v0.29.82), tagged with the algorithm (
sha256$…, v0.29.88; API tokens likewise): a read of the database, or a backup, yields nothing a caller can present. Upgrading signs nobody out, with one exception: a database last migrated by v0.29.82–v0.29.86 signs every API session out once at the v0.29.88 migrate (a session an older release wrote there could be stored raw but marked hashed). Rolling back below v0.29.82 signs every API session out once (the older release cannot read hashed tokens). Rolling back from v0.29.88 to v0.29.82–v0.29.87 makes every session AND every API token unusable while the older release runs (it looks for the untagged hash); re-upgrading makes them work again — do not re-grant API tokens. From v0.29.87, sessions an older release creates — during a rollback, or by a process still on the old version during a deploy — are removed by the next migrate, so their users sign in again once and nothing they stored is left behind.A token’s role and repository scope are cached for 60 seconds per process. An admin mutation, and (v0.29.68) an add through
POST /api/v1/groups/{id}/reposthat linked or queued repositories, drop the cache in the process that served them. An approval decided in the web process reaches the api process only when its cache entry expires — up to 60 seconds; the two processes share no memory. Signing out (POST /api/v1/auth/logout, or the web GUI’s sign-out, which deletes the tokens it minted) ends the token at once in every api process: a session token and an API token are both rechecked against their row on every call. Only the role and the repository scope keep the 60-second window.A server-side failure is a 500 whose body never carries the cause (
internal error; try again, or a fixed phrase such aspackage list failed, v0.29.68); the cause is in the api log. Client-side refusals (400/403/404) keep their own messages.Your token carries your repository scope — every repo in any of your groups (pending included; approval gates new collection, not visibility of collected data). An administrator’s signed-in session is unscoped; an API token never is (v0.29.86), whoever owns it.
Shared links (v0.27.82): requesting a repo outside your groups auto-adds it to your implicit “Shared with Me” group and the request proceeds (v0.29.82: at most 100 such additions per user per hour across Shared with Me, the compare’s Comparisons group and stars of repositories outside your groups — an organization entity counts once, and a request that links nothing new counts nothing; each
apiprocess keeps its own count, which starts over when it restarts; past that the request is429withRetry-Afterand thecapacity_limitbody,quotashared_with_me_adds_per_hour(v0.29.89), and that addition is not made, though entities of the same request resolved before it were; an organization entity’s repositories are linked all or none (v0.29.91); with the account’s repository allocation full, the request is refused with thecapacity_limitbody, see “Rate limits”) — repo links are shareable between signed-in users (the Starred/Comparisons auto-add pattern, triggered by viewing). The response that performed the add carries a one-timeX-Aveloxis-Added-To-Group: Shared with Meheader (CORS-exposed) so GUIs can toast it; subsequent requests are ordinary in-scope reads. The auto-add LINKS the existing repo only — it never enqueues collection, never registers org tracking (the v0.27.20 approval principle: approval gates collection, never visibility). Repo IDs with no repos row still return the structured 403 (repo_out_of_scope), as do requests when the auto-add cannot be performed (fail closed).An API token never auto-adds (v0.29.86). The auto-add above is for a signed-in session following a shared link. A request with an API token for a repository outside its owner’s groups (a repository route, the compare, a star) is refused
403and nothing is written. The refusal says how to add it:repo_url(or, in the compare,entity_url),your_groups(eachgroup_idandname),add_to_existing_group(POST /api/v1/groups/{group_id}/reposwith the body to send) andcreate_group(POST /api/v1/groupswith a name; then add to the new group’s id). For an organization in the compare,entity_repo_urlslists its collected repositories and the add sends them all in one call (urls); registering the organization itself is not suggested, since that only queues tracking for approval. A repository still queued for collection is readable once added; one that is no longer queued waits for an administrator’s approval, unless the add fits underweb.auto_approve_add_limit, which adds it at once. Only groups that accept additions are listed. A repository id that does not exist gets the plain refusal, with no instructions.GET /api/v1/repos/stats?ids=answers a non-administrator — an API token or a signed-in session (v0.29.88) — only for the ids in its groups and leaves the others out. For an API token,/repos/{id}/contributors/elsewhereand/contributors/{id}/activityleave out collected repositories outside its owner’s groups; a contributor’s other repositories not collected here stay (v0.29.88). Refusals of this kind are logged once a minute per user and kind.Treat the token like a password.
POST /api/v1/auth/logoutwith the token as the Bearer ends it (the GUI’s Sign out does this). To end every session of an account at once, an operator runs one statement, which also removes anyaveloxis_ops.refresh_tokensrow carried over from Augur that points at a session (a plain session delete fails on it):WITH gone AS (DELETE FROM aveloxis_ops.user_session_tokens WHERE user_id = N RETURNING token) DELETE FROM aveloxis_ops.refresh_tokens WHERE user_session_token IN (SELECT token FROM gone).
Vulnerabilities and home tab (v0.27.4)
GET /api/v1/repos/{repoID}/vulnerabilities— every finding ever recorded for the repo, most critical first, CURRENT findings before resolved-historical ones. Rows are never deleted: when a complete scan stops reporting a finding it is stampedresolved_at(dependency upgraded past it, or dropped) and kept as historical record; a finding that reappears is un-resolved automatically. Each row carriesadvisory_url(osv.dev — resolves every id) andcve_url(app.opencve.io, only when a CVE id exists), plusfirst_detected_at/last_seen_at/resolved_at(absent = currently affected). The envelope’scountsobject hascurrent,resolved, andcritical(current-only), plus — v0.27.21 Phase C1 —direct,transitive, anddev(all current-only; pre-C1 rows count as direct), and — v0.27.46 —runtime(current findings on runtime-scope dependencies:current - dev, the headline GUIs should lead with).Unknown-version advisories (v0.29.70). A dependency that declares no version (
version_resolution: "unpinned") was queried at OSV.dev without one, and OSV answers such a query with every advisory ever published for the package — most of them for old releases. Whether the repository is affected is unknown (the VEXunder_investigationclass), so these rows are no longer dependency exposure:current,critical,direct,transitive,devandruntimeexclude them, and they are counted apart asunknown_version(withunknown_version_critical). Except GitHub Actions dependencies (ecosystemgithubactions): a floating ref (@v4,@main) is storedunpinnedtoo, but its advisories were matched against the ref, so they stay exposure. The rows themselves stay invulnerabilities. The same definition applies to the repository stats (vulnerabilities,critical_vulns, and the newvulnerabilities_version_unknown), the operator digest and the supply-chain package views. Range floors (range-floor,bounded-range) stay exposure: the lowest version the declared range allows is affected.Transitive findings (v0.27.21 Phase C1). With
collection.vuln_scan_transitiveenabled, findings from the full lockfile closure carrydependency_kind: "transitive"(direct declarations carry"direct";""= pre-C1 row that heals on the repo’s next scan) and adependency_scopewhen the lockfile flags the entry’s scope. Since v0.27.46 DIRECT findings carrydependency_scopetoo, stamped from the manifest’s own scope (dev/test/build/optional/peer;"runtime"explicit since v0.27.51 — legacy""rows read as runtime and heal to the word on each repo’s next scan). GUIs should lead with direct findings — a repo with 3 direct and 400 transitive findings must never headline “403 vulnerabilities”.introduced_by(v0.27.133, CURRENT transitive findings only): up to 3 attributions{"root": "<direct dep>", "chain": ["<root>", ..., "<vulnerable package>"]}walked from the stored lockfile edges. Each walk stays inside ONE lockfile’s graph (v0.27.135) and roots on that lockfile’s own direct dependencies plus the repo’s manifest-declared set as a repo-wide fallback (v0.27.137) — in a monorepo, a package that is direct in one workspace never terminates another workspace’s chain. Resolved-historical findings never carry the field (today’s graph cannot explain an older snapshot’s finding). ABSENT when no edge data exists (knob off, or an edge-less lockfile format) — treat absence as “attribution unavailable”, never as “no parents”.introduced_by_total_roots(v0.27.148): the TRUE count of distinct direct roots pulling the package in.introduced_bycaps at 3 emitted chains; this field is how a consumer distinguishes “exactly 3 roots” from “30 roots, showing 3”. Whenintroduced_by_total_roots == len(introduced_by)the attribution set is complete; when it is larger, bumping the named roots alone may not remove the package. Omitted (0) when no chain resolved.Version-resolution accuracy (v0.27.11). Each finding also carries
declared_requirement— the raw manifest requirement string (apache-airflow>=3.0.0) — andversion_resolution, how the scanned version was chosen:version_resolutionMeaning
lockedA committed lockfile resolved this package — the purl is the LOCKED version, not the range floor. Go dependencies are
lockedby construction (go.mod versions are exact under MVS).exact==Xor a bare version: the manifest names exactly one version.bounded-rangeThe requirement has an upper bound (
~=,^,~, or a compound containing</<=). The purl is the range FLOOR.range-floorLower bound only (
>=,>). The purl is the FLOOR — the worst case the declaration permits, not the installed version. UIs should say so, e.g. “lowest allowed” beside the version, with the declared requirement.unpinnedNo version declared: OSV.dev was queried without one and returned every advisory for the package, so exposure is unknown — counted apart as
unknown_version(v0.29.70). For a GitHub Actions dependency it is a floating ref (a major tag or a branch) whose advisories were matched against the ref: exposure, counted incurrent.Both fields are absent (
"") on findings last touched by a pre-v0.27.11 scan and heal on the repo’s next scan.The envelope carries
scanned_at(v0.28.1) — the timestamp of the most recent COMPLETED vulnerability scan.nullmeans the repo has never been scanned; a date on a zero-finding repo means “scanned, clean”. The stamp is written only where OSV was actually consulted or the dependency universe was genuinely empty (v0.28.5): scan errors never stamp, and neither do the two degenerate passes that query nothing — a repo whose dependencies all lack purl mappings, or whose legacy targets were all dropped as malformed. Those staynull(honestly “not yet scanned”) until a real scan runs, so a date + zero findings genuinely means “checked and clean”. Frontends must rendernulldistinctly (e.g. “not yet scanned”), never as a clean result.The envelope also gains
lockfile_certainty, derived at read time: anoverallverdict and, per ecosystem, the lockfile kind and how many packages it locks (the reference,repositoryVulnerabilities).overallisfullwhen every ecosystem that has dependencies also has a committed lockfile (Go counts as covered by construction),partialwhen some do,noneotherwise (including repos with no dependencies at all).requirements.txtis NEVER treated as a lockfile — even fully==-pinned it carries the same ambiguities as any other manifest (its pins classify per-finding asexact, but it does not contribute lockfile certainty).scanned_version(v0.27.14) is the version the scan actually ran against, derived from the purl (everything after the last@; empty when the purl carries no version) — pair it with the version-resolution class when rendering, since a range-declared dependency is scanned at its floor, not necessarily the installed version.GET /api/v1/repos/{repoID}/sbom?vulns=1— the CURRENT SBOM annotated with the repo’s unresolved findings. CycloneDX: nativevulnerabilitiesarray (affects.ref= component purl). SPDX (since v0.27.46): package-level SECURITY/advisoryexternalRefs— the 2.3-conformant vehicle (the old 400 is gone).GET /api/v1/repos/{repoID}/stats— response gains (v0.27.50)archived(the forge’s read-only status, read from the latest repo_info snapshot — the ACCURATE signal, distinct from the internal repos.repo_archived flag) andlast_activity_at(most recent observed commit/issue/PR timestamp; omitted when the repo has no activity). The GUI derives the Archived/Dormant chip and the historical chart window from these. v0.27.84 addslast_collected(omitted when the repo has never completed a collection pass) — the GUI’s signal to render the “queued for first collection” banner instead of misleading zeros. v0.28.1 addsgone_at(omitted unless prelim’s probe got a definitive 404/410/451 — the repo no longer resolves on its forge; the GUI must suppress the queued banner and render the no-longer-available notice, with gone taking precedence over the archived chip) andmetadata_as_of(the repo_info snapshot date behind the metadata_* counts, so gone repos can date their frozen metadata honestly). Also v0.28.1: for QUEUELESS repos (no collection_queue row — the prelim-dequeued gone cohort) the gathered counts fall back to live row counts instead of fabricated zeros; tracked repos keep the cached-count read. v0.29.70 addsunavailable_reasonandunavailable_url(both omitted when empty): the forge’s own message for a blocked or disabled repository, repeated on the repository page — GitHub’s block answer on a 451 or 403 (“Repository access blocked (dmca)”) with its notice link, or the text git prints when the forge refuses a clone (“Access to this repository has been disabled by GitHub staff.”). At most 500 characters; the link is present only when it is an https URL. Independent ofgone_at: a repository disabled by staff is not marked gone. Cleared when a clone succeeds again or the gone state is lifted. The batch endpoint carries the same two fields.GET /api/v1/repos/{repoID}/licenses— response is now an envelope{"scanned": bool, "licenses": [...]}.scanned=falsemeans the dependency-analysis phase has not recorded anything for this repo yet;scanned=truewith an empty list means the repository declares no dependencies.PUT|DELETE /api/v1/repos/{repoID}/star— star/unstar for the signed-in user (Bearer required unconditionally). Idempotent. Starring a repo outside the caller’s groups auto-adds it to their implicit “Starred” group (created on first use) and the response carriesadded_to_group: "Starred"— approval only ever gates NEW collection, and stars can only target already-collected repos (a star of an id that names no repository is404, v0.29.82), so no approval is involved. Unstarring never removes the repo from the group (scope stays until the user prunes the group).GET /api/v1/repos/{repoID}/star—{"starred": bool}, the signed-in caller’s current star state for one repo (v0.27.85 — backs the repo page’s star toggle; every other starred signal is list-shaped). Bearer required unconditionally, same posture as PUT/DELETE; starred state is caller-personal, so repo scope does not apply.GET /api/v1/home/repos?limit=50(max 100; oversized values clamp) — the home-tab list: the user’s starred repos first (always included), then the most active repos from their own groups over the trailing 90 days (issues + change requests opened). Default limit is 50 (v0.27.14; was 20). There is no cap on the number of repos a user may star — the limit only bounds how many rows the home list returns per request. Freshness (v0.29.0): the activity ranking reads the queue’s cachedlast_activity_90d, stamped per completed collection cycle — the same as-of-last-collected freshness as every gathered count. The response is additionally cached per user for 5 minutes and served stale-while-revalidate past that: an expired entry returns immediately while one background refresh recomputes it (stale serving is bounded at one hour past expiry — older entries block on a fresh load, which the cached ranking keeps fast). TheX-Cacheheader reportshit,stale, ormiss; starring a repo invalidates the entry so the next request reorders immediately.GET /api/v1/home/new-repos?days=30— the “New Repositories” home feed (v0.27.62):{"days", "fleet": [...], "mine": [...]}where each row is{repo_id, owner, name, org, added_at}, newest-first, up to 200 rows per arm.fleet= repos added inside the window whose owner matches an org registered by an ADMIN user (the curated what’s-new-on-this-instance signal);mine= same, for orgs the caller registered. Orgs whose owning group is rejected surface in neither arm.daysdefaults to 30, capped at 90. Requires a Bearer identity (discovery surface — not repo-scoped, same posture as/repos/search).added_atis the v0.27.60 fleet-entry stamp; rows created before that release carry a last-touch approximation, so the feed is honest-noisy for one window after that deploy. v0.27.84: rows surface only AFTER the repo’s first completed collection pass — a freshly-added, never-collected repo would land users on an all-zeros page, so it stays out of the feed until it has data to show. Known v1 edge: GitLab nested-group paths (group/subgroup) don’t equalrepo_ownerand fall out of the feed.GET /api/v1/repos/{repoID}/scorecard— the current OpenSSF Scorecard results for the repo:{"repo_id", "scanned", "as_of", "overall", "mode", "checks": [{"name", "score"}]}.overallis scorecard’s aggregate headline score (one decimal); it is absent for repos whose last scan predates v0.27.4 and fills in on the next scheduled scorecard run. Check scores are 0–10 as reported by scorecard;-1means the check did not apply or was inconclusive (render as N/A, not as a failure).scanned=falsemeans scorecard has never run for this repository.mode(v0.29.6, present whenscanned) says which check SET this is:"remote"is the complete set (~18 checks, scorecard’s--repomode against GitHub);"local"is the subset a clone alone can answer (~11 checks — GitLab and generic-git repos always, and a GitHub repo whose only successful runs so far were local). A check absent from a local set was NOT measured — do not render a missingCode-RevieworBranch-Protectionas a zero.""marks rows written before v0.27.5. A local run never replaces a stored remote set (the partial-never-replaces-complete rule), so a repo’smodeonly moves fromlocaltoremote, never back.
Supply-chain package view (v0.29.60)
The findings turned around: keyed by package instead of by repository, so a reader can see what a Dependabot pull request for one library cannot show — how many repositories in a cohort are exposed, how much of that exposure is transitive, how long it has been open, which advisory leads, and how many versions are in simultaneous use.
GET /api/v1/supply-chain/packages?ecosystem=npm&q=minimatch&sort=repos&limit=50&offset=0&group=12— the leaderboard: one row per(ecosystem, package_name)in the cohort,totalfor paging,sortone ofrepos(default),unresolved,cvss,transitive,versions,days,name. Every row carries the profile fields below.GET /api/v1/supply-chain/packages/{ecosystem}/{name}— one package’s profile plusadvisories(most widespread first, each withadvisory_urlandcve_url),versions(each scanned version among CURRENT exposures with how many repositories run it — the version-agreement panel) andrepos(the exposed repositories, most findings first;?repos=sets the list size, default 50, clamped at 500). A scoped npm name keeps its slash:/supply-chain/packages/npm/@scope/name. A package with no finding in the scope is404.
Exposed-repository fields. Each repos entry carries repo_id,
repo_owner, repo_name, findings_unresolved (its open findings on the
package), transitive (every open finding is transitive), versions (the
distinct scanned versions, in text order) and version_detail — the same
versions with their weight, one object per version:
{"version": "1.1.15", "findings_unresolved": 3, "lockfiles": 16}
findings_unresolved is that version’s open findings; lockfiles is how
many distinct lockfiles in the repository’s current lockfile snapshot
resolve the package to exactly that version (the package is matched with
the same key the lockfile graph uses: ecosystem aliases such as
gem/rubygems fold together, names compare case-insensitively, and PyPI
names fold _ and . to -). lockfiles can be 0: a direct dependency
scanned at its manifest version, or an ecosystem without lockfiles. The
entries are ordered by open findings, most first, then by version compared
segment by segment as numbers (1.0.2 before 1.0.10). A finding whose
package URL carries no version counts in the repository’s
findings_unresolved but has no version_detail entry, so the entries can
sum to less than the repository total.
Profile fields. cohort_repos (repositories that have ever had a finding
on the package) and repos_unresolved (have one now); findings /
findings_unresolved (rows: one per repository × advisory × version);
pct_unresolved, pct_transitive (share of rows whose dependency is
transitive — the exposure a manifest reader cannot see); median_days_open
(median age of the current findings); worst_severity, max_cvss,
n_advisories; distinct_versions_in_use, modal_version and
modal_version_share_pct (over repos_with_known_versions); and the lead
advisory — the one on the most repositories — as lead_advisory,
lead_cve, lead_severity, lead_fixed_version, lead_advisory_repos.
Scope. The envelope’s scope says which cohort answered (kind,
group_id, repos) and what answered it: source is matview when the
fleet views served the request and live when the cohort was aggregated on
request (or the fleet was, on a deployment without the views). An admin
without ?group reads the fleet from the materialized views
explorer_package_exposure and explorer_package_advisory (Aveloxis-owned:
refreshed every collection.supply_chain_refresh_hours, default 24, apart
from the weekly 8Knot rebuild — see Materialized views); a signed-in user without ?group reads their own scope — every
repository their groups hold — computed live; ?group=<id> reads that
group’s repositories live (a non-admin must own the group, and its
repositories are intersected with the caller’s scope; an unknown or
unowned group is 404). The live path aggregates the cohort’s findings on
request through the repository index, milliseconds for hundreds of
repositories and about three seconds for a 62,000-repository scope on the
production fleet; responses are cached for 60 seconds per caller and query.
Both endpoints require a Bearer session.
Portal and admin endpoints (v0.27.3)
These back the aveloxis-gui portal pages (group / monitor /
pending-groups / users). Unlike the read endpoints above — which are
gated by api.require_auth during rollout — every endpoint here
requires a valid Authorization: Bearer token unconditionally,
even from exempt-LAN addresses and while require_auth is off. They
carry user context (whose groups? who approves?) that cannot exist
without an identity. The /api/v1/admin/* routes additionally
require the caller’s user to be an administrator (403 otherwise).
Per-user:
GET /api/v1/me—{user_id, login, name, avatar_url, provider, email, email_pending, is_admin, scope_repo_count}(loginadded v0.27.77;name+avatar_urladded v0.27.84 — the home greeting and nav avatar render the REAL signed-in identity, stored from OAuth and refreshed on every login;provider(githuborgitlab),emailandemail_pendingadded 2026-10-04 for the profile page:emailis the forge’s own address taken at sign-in, or one confirmed through the mailed link;email_pendingis an address awaiting confirmation, or empty).scope_repo_countis-1for an administrator’s session (unscoped); through an API tokenis_adminisfalseand the count is the owner’s groups’ (v0.29.86). The GUI usesis_adminto decide whether to render the admin navigation.POST /api/v1/me/email(a signed-in session only: an API token is refused403, v0.29.88; a sign-in older thanweb.session_idle_minutesis403 {"error": "reauthentication_required"}, 0.29.113) — body{"email": "…"}: stores the address as pending and mails the confirmation link, for an account whose forge gave no email (a private GitHub address).200 {"sent": true}, or422 {"sent": false, "message": "…"}with the reason (not a deliverable address; mail not configured —mail.site_urland the Gmail settings are required; a failed save or send). The link lands on the front end’s profile page whenweb.spa_urlis set, on the web process’s/account/email/confirmotherwise. The same submission the web process’s/account/emailform runs.GET /api/v1/me/sessions(0.29.113) — the account’s live sessions:{sessions: [{kind, from_web_session, current, created_at, last_used_at, expires_at}]};kindisweb(a browser session of the web GUI) orapi(a Bearer token:/auth/token’s or the web proxy’s, both minted from a browser session:from_web_sessionistruewhile that session lives,falseonce it has expired — the SPA’s token outlives it by up to 29 days);currentmarks the one presenting the request;last_used_atmoves (at most once a minute (every half bound when the bound is under two minutes)) for browser sessions only, and is a token’s mint time. Operator-issued API tokens are not sessions.POST /api/v1/me/sessions/revoke(0.29.113) — ends every session of the account, this one included:200 {"ok": true, "ended": N}, then401for each of them. Like sign-out, it is never refused by a spent request quota and is not counted (0.29.114).POST /api/v1/me/email/confirm— body{"token": "…"}from that link, for the signed-in account:200 {"status": "confirmed"};200 {"status": "invalid"}for a token that is not live for this account (unknown, expired, already used, another account’s — nothing changes);500 {"status": "error"}when the database failed (the link still works).GET /api/v1/groups— the caller’s groups:{groups: [{group_id, name, status, repo_count, favorited, pending_adds}]}.statusisapproved,pending, orrejected(empty legacy values normalize toapproved).pending_adds(v0.27.84) counts the group’s pending addition requests — the GUI renders “N additions awaiting approval” from it, since under the v0.27.20 model the GROUP is approved while its ADDITIONS may pend.POST /api/v1/groupswith{"name": "..."}— create a group (a name of at most 200 characters, v0.29.88). Groups are createdapproved(v0.27.20 — the approval unit is the ADDITION of not-yet-collected repos/orgs, never the group container). Returns{group_id}.GET /api/v1/groups/{groupID}/repos?page=1&page_size=50&sort=name&dir=asc— one page of the group’s repos in a pagination envelope:{repos: [...], total, page, page_size, sort, dir}(page_sizedefaults to 50, capped at 100). v0.27.75: the row shape and sort semantics are IDENTICAL to the collection detail listing. Each repo row is{repo_id, owner, name, git_url, issues, prs, commits, last_collected?, last_activity?, starred}— the counts are the collection queue’s cached cumulative gathered totals (never a per-request aggregation),last_activityis the forge’s ownlast_updatedfrom the latest repo_info snapshot, andstarredreflects the calling user’s star state.sortacceptsname(default),issues,prs,commits,collected,activity;diracceptsasc(default) ordesc; unknown values fall back and the response echoes the effective sort. The group must be the caller’s (an administrator’s session reads any group; an API token only its owner’s): otherwise a404, the same answer as for a group that does not exist (stage 1 of the admin-console refactor, 0.29.100).POST /api/v1/groups/{groupID}/reposwith{"url": "https://github.com/owner/repo", "kind": "repo"}(or"kind": "org"with an org URL) — add a repo or track an org. Aurlslist carries at most 1,000 URLs per add (v0.29.88): paste a larger set in parts, or add its organization. This is the “request access / request collection” affordance the compare picker’s three-class results point at: already-collected repos link instantly; new repos in a pending group wait for admin approval before collection starts. Bulk paste (2026-07-21): the body also accepts{"urls": ["...", "..."], "kind": "repo"}— every URL lands in ONE batched add (one approval unit per v0.27.20).urlswins when both fields are present; the single-urlbody remains accepted. The response carriessubmittedplus the outcome counts{linked, enqueued, pending_approval?, request_id?, registered?}.linkedcounts only repositories this request newly linked into the group: posting a repository that is already in the group again returnslinked: 0(PR #218 review C2). Whenweb.auto_approve_add_limitlets a batch through and some of its repositories cannot be added, the others are still added and the call fails with an error saying how many could not be; sending the same URLs again retries them (v0.29.50). Every line is parsed as a repository URL first (0.29.100): a missing scheme is supplied, GitHub, GitLab and any git host are accepted, and a line that is not a repository URL is reported ininvalid(eachurl: why, credentials redacted) and skipped while the rest go through; a paste with no usable line is a400. A group the caller does not own is a404(the same answer as a group that does not exist); a rejected group is a409; a URL longer than 1342 bytes (v0.29.54) or one the database refuses (such as one with a NUL byte; v0.29.52) is a400; repositories that could not be added and any server-side failure are a500with a plain message and no database text (v0.29.51). Every refusal body is JSON{"error": "…"}. Org outcomes (v0.27.84):registered: 1means the org is tracked NOW — admin adds always register, and a non-admin’s add of an org that is ALREADY registered in a group that is not rejected auto-approves (it adds zero new collection: the org’s repos are already tracked and its future repos already auto-enqueue via the existing registration; an auto-approved audit row is still recorded). A non-admin’s add of a NEW org returnspending_approval— registering a new org is an open-ended future-repo commitment, so it awaits admin review. Orgs stay one per request — a multi-URLkind: "org"body is a 400. An add that would take the account past its repository allocation (v0.29.89) adds nothing and answers thecapacity_limitbody (see “Rate limits”).POST /api/v1/groups/{groupID}/repos/{repoID}/remove— removes a repository from one of the caller’s groups (v0.29.89). The repository stops counting toward the account’s allocation once no other group of theirs holds it.404for a group that is not the caller’s;404that repository is not in that groupwhen the repository was not in the group (v0.29.91; before, the answer said removed either way).GET /api/v1/groups/{groupID}/orgs— the organizations tracked in the group (2026-07-21; read-only — registration goes through the POST above withkind: "org"). Envelope:{orgs: [{org_request_id, url, name, platform, last_scanned?}]}.last_scannedis omitted until the scheduler’s org scan first visits the org. The group must be the caller’s (an administrator’s session reads any group; an API token only its owner’s): otherwise a404, the same answer as for a group that does not exist.
Admin-only:
GET /api/v1/admin/users—{users: [{user_id, login, email, provider, is_admin, created_at, last_seen}]}. Since v0.27.89created_atis the REAL join date (INSERT-onlyusers.created_at) andlast_seenisdata_collection_date, which every login re-stamps. Rows that predate v0.27.89 carry the migration’s honest last-touch approximation as their join date (the table had no earlier timestamp to backfill from), so for those two fields start equal and diverge from the next login onward.POST /api/v1/admin/users/{userID}/adminwith{"admin": true|false}— promote/demote; the field is required (0.29.100:{}used to demote the account). Self-demotion is refused (400). A demotion that would leave no admin at all is a409withrefusing to demote the last admin — promote another user first(it was a500before PR #218 review); the count and the write are one locked transaction, so two demotions deciding at once cannot both pass. No such user is a404.POST /api/v1/admin/users/{userID}/sessions/revoke(0.29.113) — end every session of an account (a lost device, a suspected takeover): its web sessions,/auth/tokentokens and the web proxy’s tokens are deleted, each401at its next request; operator-issued API tokens are not touched.200 {"ok": true, "ended": N}(0for an account with none); a non-integer id is400. Logged.POST /api/v1/admin/groups/{groupID}/reject— reject a group: the group-level abuse lever (v0.27.20); it takes no further additions and its organizations stop being listed; its repositories stay.404for a group that does not exist. The legacy pending-group approval —GET /api/v1/admin/groups/pendingand theapprovedecision — is gone since 0.29.100: groups have been born approved since v0.27.20 and the migrate converted every pending group then; the additions queue below is the approval unit.GET /api/v1/groups/{groupID}/pending-adds— the group’s own awaiting-approval content (v0.27.20): repo URLs from pending add-requests plus pending org registrations, each withrequest_id,kind,url,created_at. The group must be the caller’s (an administrator’s session reads any group): otherwise a404, the same answer as for a group that does not exist; a server-side failure is a500without database text (v0.29.52). Envelope:{pending: [...]}.GET /api/v1/admin/add-requests— the v0.27.20 per-add approval queue: pending additions of not-yet-collected repos/orgs by non-admins. Each entry carries the requester (user_login,user_email), group,kind(repos|org),item_count, up to 10sample_urls(ororg_urlfor org requests), andcreated_at. Envelope:{pending: [...]}.POST /api/v1/admin/add-requests/{requestID}/{decision}where decision isapproveorreject— decide one add-request. Approving areposrequest creates + enqueues + links each item in the background (resumable — re-approving picks up unprocessed items); approving anorgrequest registers the org for tracking (the scheduler’s next org-scan tick collects its repos; re-approving an approved org request whose registration is missing registers it, returnschanged: trueand notifies the requester). The requester is notified by email when a mailer is configured. Response:{ok: true, changed: bool}—changed=falsemeans the request was already decided (idempotent double-click). A request id that does not exist answers404. An org request that can never be registered answers409with the reason and “reject the request”: an org that is not on this deployment’s GitHub host or GitLab instance, a URL carrying credentials, or a request created before v0.29.54 whose URL is longer than the registration index holds (2,684 bytes).GET /api/v1/admin/monitor/stats—{queue: {status: count}}:queued,collecting(real jobs),draining(repos parked by the startup staging drain or by heal-collection-gaps, v0.29.64) andtotal.GET /api/v1/admin/monitor/queue?page=1&q=augur— the collection queue, up to 100 rows per page (page_size, default 100; since 0.29.109 — earlier releases always answered 100), optional search. Each job carries the repo label (owner/name), status, priority, due_at, last_collected, last_error, gathered issue/PR/commit counts, AND the forge-reported meta counts (meta_issues,meta_prs,meta_commitsfrom the latest repo_info snapshot) for gathered-vs-metadata comparison. Sortable (v0.29.0):?sort=<key>&dir=asc|descwith keysrepo,status,priority,due,last_run,issues,prs,commits,meta_issues,meta_prs,meta_commits— resolved through a server-side allowlist (unknown keys keep the default collecting-first composite ordering); the envelope echoes the EFFECTIVEsort/dir(an unknown key echoes BOTH as""— the composite ordering has no single direction, so a caller’sdiris never parroted when it was not applied). Themeta_*keys order by the latest repo_info snapshot and are API-only — the SPA’s paired “(ours / meta)” headers sort the gathered half. When a batched read behind the page fails (since 0.29.109) the envelope carrieswarnings(an array of sentences: names unreadable — everyrepois then the id; counts unreadable — the counts show 0) and the failure is logged; the key is absent otherwise.POST /api/v1/admin/monitor/queue/{repoID}/prioritize— the SPA monitor’s “Boost” button (v0.27.14). Pushes the repo to priority 0, makes it immediately due, and resets its status toqueued— the exact samePrioritizeRepostore call the legacy :5555 monitor’s/api/prioritize/{repoID}makes. 404 when the repo has no queue row; 400 for a non-numeric id. Returns{ok: true, repo_id}.
Collections (v0.27.63)
Admin-curated groups-of-groups for the GUI home page (“Apache
Graduated”, “CNCF Sandbox”, …). A collection joins to LIVE
user_groups — never a frozen repo list — so admin org-groups that
auto-grow via org scans keep their collections fresh for free. Only
admin-owned groups may be members (link-time check). Mutations are
POST-everywhere because the CORS Allow-Methods header only
advertises GET/POST.
Reads (any authenticated user):
GET /api/v1/collections—{collections: [{collection_id, name, description, position, groups, repos, starred, created_at}]}, repo counts deduped across member groups. Ordering (v0.27.70): the CALLER’s starred collections first, then position, then name.starredreflects the calling user only — stars are a per-user sort preference, never a visibility control (every collection is visible to every authenticated user).PUT /api/v1/collections/{collectionID}/star/DELETE .../star— star / unstar the collection for the signed-in user (mirrors the repo-star routes). Both idempotent; PUT on a nonexistent collection returns 404. Response{ok, starred}.GET /api/v1/collections/{collectionID}?page&page_size&sort&dir— (404for a collection that does not exist, 0.29.100;diris echoed as the direction applied,ascordesc) — member groups (each with live repo count) + one page of the deduped repo set:{collection_id, groups, repos, total, page, page_size, sort, dir}. Page size defaults 50, caps 100. v0.27.74: rows carryissues,prs,commits(the queue’s CACHED cumulative counts — the monitor’s numbers, never per-request aggregation),last_collected,last_activity(the FORGE’s own last_updated from the latest repo_info snapshot — deliberately not a live per-table MAX, keeping page renders cheap at 3K-repo collection scale), and the calling user’sstarredflag.sort∈ name | issues | prs | commits | collected | activity (allowlisted server-side; unknown falls back to name),dir∈ asc | desc; repo_id is always the stable tiebreaker. The envelope echoes the EFFECTIVE sort/dir.POST /api/v1/collections/{collectionID}/copywith{group_id}(must be the caller’s) or{group_name}(find-or-create for the caller; at most 200 characters, a400past it since 0.29.100) — links every repo of the collection into that group and returns{added, group_id}(repos already in the group no-op); a collection that does not exist is a404(0.29.100; it answered 200 and linked nothing). Never enqueues collection and never creates add-requests: collection repos are already tracked, and approval only ever gates NEW collection (v0.27.20). The caller’s auth scope and home cache are invalidated so the repos are visible on the next request.
Admin mutations (requireAdmin):
POST /api/v1/admin/collections{name, description, position}→{collection_id}. Name is globally UNIQUE: a taken name is a409(0.29.100; it was a 500).POST /api/v1/admin/collections/{collectionID}{name, description, position}— update in place;404for a collection that does not exist,409for a taken name (0.29.100; both were 500s).POST /api/v1/admin/collections/{collectionID}/delete— removes the collection; member links cascade, member groups are untouched;404for a collection that does not exist (0.29.100; it answered 200).POST /api/v1/admin/collections/{collectionID}/groups{group_id}— link an ADMIN-OWNED group (400 for a group owned by a non-admin;404for a collection or a group that does not exist, 0.29.100; linking an already-linked group is an idempotent ok).POST /api/v1/admin/collections/{collectionID}/groups/{groupID}/remove— unlink; the group and its repos are untouched;404for a collection that does not exist. Every administrative body on these routes is bounded (64 KiB) and read by one decoder (0.29.100).
Window-boundary semantics (v0.27.39)
Two deliberate boundary behaviors that differ between endpoint families — documented so cross-referencing them is not mistaken for a data bug:
untilinclusivity differs:/repos/{id}/timeseriesand the Augur metrics’end_date(since 0.29.99) treat the end day as INCLUSIVE (the named day’s data appears — the handler shifts by +1 day internally);/comparetreats the parsed date’s midnight as EXCLUSIVE. Changing/comparewould break existing consumers, so that divergence is documented rather than converged./compareends at the last COMPLETE bucket (v0.27.39): the in-progress week/month is never served as a data point — pre-fix it made every active repo’s final point droop and painted phantom anomaly dots on trend charts. Request an explicituntilinside a bucket and the series still ends at that bucket’s start.Commit bucketing is one rule since 0.29.99: the Augur-compat metric routes,
/compareand/timeseriesall bucket commits by the UTC day ofcmt_author_timestamp. (Until 0.29.98 the Augur routes used the author’s LOCAL date,cmt_author_date, Augur’s historical semantic, so the same commit could land in adjacent days across the two families.) A commit whose author date could not be parsed has no timestamp and is counted by no family.