Get repository details
GET/api/repos/{owner}/{repo}
getRepository
Returns the repository metadata and projected view snapshot. Authentication is optional; anonymous callers can only resolve public repositories.
Authentication is not described for this operation in the spec — that does not mean it is public. Check tokens and scopes.
curl
curl -X GET 'https://neosource.dev/api/repos/OWNER/REPO'fetch
fetch("https://neosource.dev/api/repos/OWNER/REPO", {
method: "GET",
});Path parameters
ownerrequiredRepository owner or organization slug.
reporequiredRepository name.
Responses
200Repository details
application/json
Standard errors
Bodies documented once for the whole API — see standard errors.
- 400Bad Request — one of: invalid_input
- 403Forbidden — one of: forbidden
- 404Not Found — one of: not_found
- 423Locked — one of: busy
- 429Rate limited — retry after the `Retry-After` header
- 500Internal server error
- 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
- 504Gateway timeout — the request exceeded the server's handling budget
Schemas
Referenced above. Listed here rather than expanded inline, so the same definition is not repeated at every level.
MergeMethod
How a pull request's commits land on its target branch. A repo carries two settings over this enum (`migrations/20260820120000_repo_merge_methods.sql`): the set it *permits* (`RepoRecord::allowed_merge_methods`, never empty) and the one the merge path reaches for when the request names none (`RepoRecord::default_merge_method`, always a member of that set — enforced by the settings route, which is the only place both columns are visible at once). `Default` is [`MergeMethod::Merge`] to match the column default, which is itself the pre-existing behaviour of every repo: before this setting existed, a merge always minted a two-parent commit. `Rebase` is deliberately absent rather than merely unimplemented — it replays N commits, can conflict per commit, and rewrites the SHAs the stacked-PR re-parent invariant leans on (`plans/archive/pr-merge-methods-2026-08.md` §"Not doing"). Adding it later is one `ALTER TYPE merge_method ADD VALUE` plus an arm here, which is why the stored shape is an enum array and not a pair of booleans.
"merge""squash"
RepoParentInfo
Summary of a fork's parent repository.
repo_idrequired
RepoStatusOutput
Repo lifecycle state surfaced by the API. Mirrors `RepoStatus`. See ADR 0012 §2.
"creating""ready""importing""import_failed"
RepoVisibilityInput
"public""internal""private"
RepoIssueSource
Where repository issue content is sourced from.
"native""github"
RepoLanguageStat
One language's line counts across the default branch's tip tree.
blanksrequiredBlank lines.
coderequiredLines that are neither blank nor a comment.
commentsrequiredComment lines.
filesrequiredFiles that classified as this language. Zero for a language that only appears embedded in another (JavaScript inside an HTML `<script>`) — its lines count, but the enclosing file is one file of its own kind.
namerequiredtokei's language name (`Rust`, `TypeScript`, `Cpp`, …). A deliberately **open vocabulary**, not a closed-set enum: tokei owns ~150 names upstream and adds to them, and mirroring that table is the alternative ADR 0105 §Rejected already rejected.
RepoMirrorKind
Mirror target host kind. Mirrors `MirrorTargetKind`.
"github""gitlab""generic"