List a path's commit history
GET/api/repos/{owner}/{repo}/path-history
listRepositoryPathHistory
Returns one page of the first-parent commits that changed a file or directory (`git log --first-parent -- <path>`), newest first, each with what it did to the path. Continue with `cursor = next_cursor`. The history stops at the path's creation (or where it cannot be found): `earlier` then carries the cursor and reason for an explicit `earlier=true` search of older history, which may take several (bounded, possibly empty) pages. `status: pending` means the starting commit is still being indexed; ask again shortly. Mode-only changes (a chmod, or a symlink replaced by a file with the same bytes) are not listed, unlike `git log`; renames are not followed.
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/path-history'fetch
fetch("https://neosource.dev/api/repos/OWNER/REPO/path-history", {
method: "GET",
});Path parameters
ownerrequiredRepository owner or organization slug.
reporequiredRepository name.
Query parameters
refBookmark name (or 40-hex commit id) to read from. Defaults to the repository default branch.
pathSlash-delimited repository path, a file or a directory. Absent or empty for the whole tree.
cursorThe previous page's `next_cursor`: the commit to continue from (inclusive). Replaces `ref` as the starting point when present.
per_pageEntries per page (max 100, default 30).
earlierSearch past where the history stops (a previous page's `earlier`): step over spans where the path did not exist. Costs one lookup per change of the path's deepest surviving prefix, bounded per page; a page in this mode may come back empty with a `next_cursor`, which continues the search (pass `earlier=true` again).
Responses
200One page of the path's history
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 interval in 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.
HistoryStopReason
Why a path's history stopped before the root with more history possibly behind it. Older than this point the path did not exist on the first-parent line until some earlier change, and finding that change costs one lookup per change of the path's deepest surviving prefix, so it is searched only on request.
"created_here""not_found_yet"
FileChangeKind
What a commit in a path's first-parent history did to that path, relative to its first parent: `git log --first-parent --name-status -- <path>`'s letter, without renames (`A`/`M`/`D`; no rename detection is done). Read off ADR 0132's derived rows, so it shares their semantics: a kind flip (file ↔ directory) is `Modified`, and a mode-only change is invisible.
"added""modified""deleted"
CommitResponse
authorrequiredauthor_account- one of
checks- one of
committerrequiredcommitter_account- one of
messagerequiredoidrequiredparentsrequired- items
pull_request- one of
treerequired
CommitStatusState
State of a single commit status, GitHub-shaped. `Error` is distinct from `Failure` on individual statuses (infrastructure/tooling breakage vs. a real red result) but the combined rollup folds both into `Failure`.
"pending""success""failure""error"
WorkflowRunStatus
Lifecycle of a workflow run. Mirrors the GHA-shaped surface that the SPA renders. The serde `snake_case` strings are the wire vocabulary the API emits (pinned by the `enum_wire_consistency` tests).
"pending_approval""queued""quota_blocked""concurrency_blocked""running""cancelling""succeeded""failed""cancelled"