Skip to main content
The blame endpoint returns, for every line of a file, the commit that introduced that line. No clone is needed. Each of those commits carries the same landing attribution as the history listing: the operation that landed it (push, promote, or merge) and the actor that ran it.
In a clone, git blame works as usual; Tensorlake is a normal remote. This endpoint is for dashboards, code review tools, and agents that need line-level attribution without a checkout.

Blame over HTTP

{path} is the file’s repository path, given literally (e.g. blame/src/app.rs). Authenticate with a short-lived Git credential over HTTP Basic auth (a read-scoped credential is enough):

Query Parameters

A bare name resolves as a branch first, then as a tag. The response’s ref_name field reports the ref that resolved (refs/heads/main, refs/tags/v1.0, or absent when ref was a commit oid). An unknown ref, or a path that does not exist at that ref, returns 404.

Response Fields

Limits and Partial Results

The endpoint reports incomplete or inapplicable results explicitly instead of returning wrong attribution:
  • unblameable: "not_a_file" — the path is a directory at ref.
  • unblameable: "binary_or_too_large" — the file is binary or larger than the 256 KiB content cap. The file’s size and object id are still available from the tree and file endpoints; blame returns no line ranges for it.
  • truncated: true — the walk stopped before every line was attributed. This happens when the history is deeper than the scan cap (10,000 commits), the file was changed more times than the diff cap (512), the walk reached a binary or over-cap version of the file, or the time budget elapsed. Lines attributed before the stop are returned normally; the rest are in ranges without a commit field.
  • 425 Too Early — the file’s content at the tip is still being indexed after a recent push. Retry after a short delay. The history endpoints use the same status for the same condition.

How It Works

Blame walks the file’s changes newest-first over the same changed-path index that file history uses, so commits that did not change the file are skipped without reading any content. At each change it diffs the file against the parent version and maps unattributed lines backward; a line is attributed to the commit that introduced it. Attribution comes from these content diffs, not from commit metadata.

Next Steps

Commits & History

Branch history with landing attribution, file and directory filters, and per-commit diffs.

Repository Mounts

The snapshot and promote workflow that produces attributed history.

Repository SDKs

Repository operations and the operation log from Python or TypeScript.

Authentication

Short-lived Git credentials, scopes, and token lifetime.