Synced from Hive. This page is pulled from hivecommons/hive@v5 during the docs build. Edit the canonical source in the Hive repository.

Dashboard REST API reference — Contribute

Part of the Dashboard REST API reference; see that page for how auth levels and pkg/<file>:<line> source citations are read and checked. Edit this file for routes in this area and run src/scripts/check-api-reference-citations.sh --fix to resync citations.

MethodPathAuthPurposeSource
GET/contributePublicContribute Landingpkg/dashboard/api_contribute.go:227
GET/contribute/{tab}PublicContribute Landingpkg/dashboard/api_contribute.go:233
GET/api/contribute/wsPublics.contribute Hub.Handle WSpkg/dashboard/api_contribute.go:241
POST/api/contribute/registerPublicContribute Registerpkg/dashboard/api_contribute.go:242
POST/api/contribute/invitePublicContribute Invitepkg/dashboard/api_contribute.go:248
POST/api/contribute/reissue-tokenPublicContribute Reissue Tokenpkg/dashboard/api_contribute.go:249
GET/api/contribute/statusPublicContribute Statuspkg/dashboard/api_contribute.go:251
GET/api/contribute/repositoriesPublicContribution-eligible repositories for a contributor repo_scope: {repositories:[{id,forge,host,full_name}],generated_at}, the monitored repos minus hub.disabled_repos; id is {forge}/{host}/{owner}/{name} lower-cased (#12805)pkg/dashboard/api_contribute.go:254
GET/api/contribute/activityPublicContribute Activitypkg/dashboard/api_contribute.go:258
GET/api/contribute/fleetPublicContribute Fleetpkg/dashboard/api_contribute.go:259
GET/api/contribute/eventsPublicContribute Events (SSE). Every frame carries a monotonic seq; a connection whose channel filled gets a gap frame naming how many events it missed, so a long-lived client can tell “nothing happened” from “I missed events” (#6218)pkg/dashboard/api_contribute.go:263
GET/api/contribute/queuePublicContribute Queuepkg/dashboard/api_contribute.go:266
GET/api/contribute/opportunisticPublicContribute Opportunisticpkg/dashboard/api_contribute.go:270
GET/api/contribute/limitsPublicContribute Limitspkg/dashboard/api_contribute.go:275
GET/api/contribute/metricsPublicContribute Metricspkg/dashboard/api_contribute.go:281
GET/api/contribute/mePublic path; caller identity resolved server-side (401 anonymous; a signed-in caller with no profile on this hive gets 200 with has_profile:false and no counters, #12111)The caller’s OWN contribution stats — issues worked (24h and all-time), completions that produced a verified PR (24h and all-time, #7894), and failures. No username parameter, so it only ever answers for its caller (#6543)pkg/dashboard/api_contribute.go:291
GET/api/contribute/run-stats/modelsPublicPer-model run evidence for the contributor wall: runs, verified-PR share, and failure rate over the selected window.pkg/dashboard/api_contribute.go
GET/api/contribute/wallPublicContributor wall posts when the hive-wide wall switch is enabled; anonymous readers see visible posts, authors can still see their own hidden posts.pkg/dashboard/api_contribute.go
POST/api/contribute/wallSigned-in contributorCreate a 500-character plain-text wall post or one-level reply, with optional model, backend, and repo tags. Returns 401 anonymous, 403 when disabled/revoked/muted, and 429 when rate-limited.pkg/dashboard/api_contribute.go
DELETE/api/contribute/wall/{id}Post authorAuthor deletes their own wall post; action is audit logged.pkg/dashboard/api_contribute.go
POST/api/contribute/wall/{id}/hideOwner/read-writeHide a wall post from public readers while leaving it visible to the author; action is audit logged and pushed over /api/contribute/events.pkg/dashboard/api_contribute.go
POST/api/contribute/wall/{id}/flagSigned-in contributorFlag a wall post for Management review; action is audit logged.pkg/dashboard/api_contribute.go
GET/api/contribute/triagePublicContribute Triagepkg/dashboard/api_contribute.go:312
PUT/api/contribute/queue/orderPublicContribute Queue Orderpkg/dashboard/api_contribute.go:316
POST/api/contribute/queue/holdPublicContribute Queue Holdpkg/dashboard/api_contribute.go:321
POST/api/contribute/queue/hold/clearPublicContribute Queue Hold Clearpkg/dashboard/api_contribute.go:325
GET/api/contribute/interestsPublicContribute Interestspkg/dashboard/api_contribute.go:331
PUT/api/contribute/interestsPublicContribute Interestspkg/dashboard/api_contribute.go:332
GET/api/contributorsDashboard auth/sessionContributors Listpkg/dashboard/api_contribute.go:340
GET/api/contributors/{id}Dashboard auth/sessionContributor Getpkg/dashboard/api_contribute.go:341
POST/api/contributors/{id}/wall-muteOwner onlyMute or unmute a contributor from posting to the contributor wall; action is audit logged.pkg/dashboard/api_contribute.go
PUT/api/contributors/{id}/trustOwner onlyContributor Trustpkg/dashboard/api_contribute.go:343
PUT/api/contributors/{id}/agent-roleOwner onlyContributor Agent Rolepkg/dashboard/api_contribute.go:344
PUT/api/contributors/{id}/agent-role-grantsOwner onlyContributor Agent Role Grantspkg/dashboard/api_contribute.go:345
POST/api/contributors/{id}/revokeOwner onlyContributor Revokepkg/dashboard/api_contribute.go:346
POST/api/contributors/{id}/requeueDashboard auth/sessionContributor Requeuepkg/dashboard/api_contribute.go:347
DELETE/api/contributors/{id}Owner onlyContributor Deletepkg/dashboard/api_contribute.go:348
GET/contribute/dossier/{username}PublicContributor Dossier Page (HTML)pkg/dashboard/api_contribute.go:240
GET/api/contribute/run-statsPublicContribute Run Statspkg/dashboard/api_contribute.go:299
GET/api/contribute/runsPublicContribute Per-Run Historypkg/dashboard/api_contribute.go:389
GET/api/contribute/decisionsOwner/read-writeContribute Hub Decisionspkg/dashboard/api_contribute.go:399
GET/api/contribute/dossierPublicContribute Dossier Getpkg/dashboard/api_contribute.go:336
POST/api/contribute/dossierPublicContribute Dossier Updatepkg/dashboard/api_contribute.go:337
GET/api/leaderboard/contributor/{username}/heraldryPublicContributor Heraldrypkg/dashboard/api_contribute.go:369
GET/api/cards/player/{asset}PublicOpenAPI alias for a cacheable contributor social-card SVG (asset is <github-login>.svg).pkg/dashboard/social_cards.go:112
GET/api/cards/achievement/{login}/{asset}PublicOpenAPI alias for a cacheable attained-achievement SVG (asset is <achievement-id>.svg).pkg/dashboard/social_cards.go:113
GET/api/cards/leaderboard/{asset}PublicOpenAPI alias for a cacheable leaderboard-summary SVG (contributors.svg, teams.svg, or swarm.svg).pkg/dashboard/social_cards.go:114
GET/cards/player/{asset}PublicCacheable 1200×630 SVG social card for one public contributor profile.pkg/dashboard/social_cards.go:109
GET/cards/achievement/{login}/{asset}PublicCacheable SVG achievement-unlocked card for an attained Achievement System 2.0 badge.pkg/dashboard/social_cards.go:110
GET/cards/leaderboard/{asset}PublicCacheable SVG summary card for contributors, teams, or swarm.pkg/dashboard/social_cards.go:111
GET/share/player/{login}PublicShare landing page with Open Graph/Twitter metadata for a contributor card and link to the public dossier.pkg/dashboard/social_cards.go:115
GET/share/achievement/{login}/{achievementID}PublicShare landing page with metadata for an unlocked achievement card and link to the public dossier.pkg/dashboard/social_cards.go:116
GET/share/leaderboard/{board}PublicShare landing page with metadata for a public leaderboard card and link to live standings.pkg/dashboard/social_cards.go:117
PUT/api/contribute/help-linksOwner/read-writeContribute Help Linkspkg/dashboard/api_contribute.go:257
GET/api/contribute/operators/messagePublic path; caller identity resolved server-side (401 anonymous, 403 without a profile)Returns only the signed-in contributor’s unacknowledged operator messages; no username/body field can select another recipient (#8461).pkg/dashboard/api_contribute.go:292
POST/api/contribute/operators/messageOwner/read-writeSends a sanitized, length-capped one-to-one operator note to a contributor profile, persists it until acknowledgement, and pushes it to matching live relay sockets only (#8461).pkg/dashboard/api_contribute.go:293
POST/api/contribute/operators/message/ackPublic path; caller identity resolved server-sideAcknowledges the signed-in contributor’s own message, optionally recording a short sanitized reply for operators.pkg/dashboard/api_contribute.go:294

Issue claims (hivecommons/hive#8380)

MethodPathAuthPurposeSource
GET/api/claimsDashboard authEvery live worker claim ({enabled, claims:[…]}); enabled:false when claims.enabled: falsepkg/dashboard/claims_api.go:54
GET/api/claims/{owner}/{repo}/{number}Dashboard auth{held, claim} for one issuepkg/dashboard/claims_api.go:55
POST/api/claims/{owner}/{repo}/{number}Signed-in / hub-proxied / GitHub-token caller claims as a human under their login; a verified owner token claims as the ownerBody {force, ttl_s, session}. 200 with outcome claimed/renewed/taken_over; 409 with outcome held (same rank, retry with force) or refused (higher rank holds it) and a hintpkg/dashboard/claims_api.go:56
DELETE/api/claims/{owner}/{repo}/{number}Same identity rulesBody {force, reason}. Releases your claim or a lower-ranked holder’s; force with a verified owner role releases regardless of holderpkg/dashboard/claims_api.go:57

/api/v1 contributor subpaths

handleAPIv1 dispatches authenticated contributor API calls below /api/v1. Every request must carry a GitHub personal access token in the Authorization header, using either the Bearer <token> scheme (hosted clients) or the legacy token <token> scheme (what gh auth token and older hive CLIs send). Both are accepted; the legacy scheme is retained for backward compatibility. Credentials in the query string (?token=) are NOT supported and are rejected, because query strings land in ingress and access logs. The same rule applies to the shared dashboard owner token: send it in the Authorization header, not in URLs. Dashboard terminal links use /api/terminal/handoff to mint a ≤60-second single-use code for the browser navigation instead of putting the owner token in the terminal URL.

Authorization: every /api/v1 path except /api/v1/me additionally requires the caller to be in the hive’s authorized-users allowlist (any role), and returns 403 otherwise — contributor, activity and knowledge data are hive-private, not world-readable. /api/v1/me is exempt because it only returns the caller’s own profile. Client-supplied X-Hive-User, X-Hive-Role and owner-verified headers are stripped at the top of the handler; identity is always resolved server-side from the validated token.

MethodPathAuthPurposeSource
GET/POST/api/v1/statusGitHub token + allowlistContributor status summarypkg/dashboard/api_contribute.go:1528
GET/POST/api/v1/queueGitHub token + allowlistPaginated ready-work listing (?limit=<int>&offset=<int>) over the actionable/offerable backlogpkg/dashboard/api_contribute.go:1524
GET/POST/api/v1/activityGitHub token + allowlistContributor activity feedpkg/dashboard/api_contribute.go:1530
GET/POST/api/v1/contributorsGitHub token + allowlistContributor listpkg/dashboard/api_contribute.go:1532
GET/POST/api/v1/knowledgeGitHub token + allowlistKnowledge exportpkg/dashboard/api_contribute.go:1534
GET/POST/api/v1/meGitHub token (self-scoped, no allowlist)Current contributor profilepkg/dashboard/api_contribute.go:1536
POST/api/v1/prs/{owner}/{repo}/{number}/queue-automergeGitHub token + merger/owner role (POST only; GET returns 405)Queue PR auto-merge using the validated actor and current PR headpkg/dashboard/api_contribute.go