`GET /v1/repos/{org}/{repo}/refs?q=` — the repo's branches and tags for a searchable ref picker (ADR-0046), backed by the repo's `ForgeConnection`. `q`, when set, is a case-insensitive substring the ref name must contain (applied by the adapter, since neither forge's list API takes a search param). Branches sort before tags, each group name-ascending, so the picker order is stable regardless of forge return order. Scoped to branches + tags. Read capability.
const url = 'https://example.com/v1/repos/example/example/refs';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/v1/repos/example/example/refsParameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Repo owner
Repo name
Query Parameters
Section titled “Query Parameters”Case-insensitive substring the ref name must contain
Responses
Section titled “Responses”The repo’s branches and tags
GET /v1/repos/{org}/{repo}/refs?q= body: the repo’s branches and tags for a
searchable ref picker (ADR-0046). Scoped to branches + tags — recent commits
and open-PR head-refs are a deliberate follow-up, not part of v1.
object
Branches first, then tags; each group name-sorted.
One branch or tag: its kind, bare name, and the short SHA of the commit it points at (a resolved-SHA hint for the picker row). The full SHA is intentionally omitted — selecting a ref re-resolves it through the pipelines endpoint, which is the authority on the pinned commit.
object
branch or tag.
The bare ref name (no refs/{heads,tags}/ prefix), e.g. main, v0.3.1.
The 7-char short SHA of the commit the ref points at.
Examplegenerated
{ "refs": [ { "kind": "example", "name": "example", "short_sha": "example" } ]}