Skip to main content
GET
Get file blame
This endpoint is rate limited. Each call counts toward your daily request limit.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>. The token may be a Sourcebot API key, OAuth access token, or scoped access token, subject to endpoint requirements.

Query Parameters

path
string
required

The file path to blame, relative to the repository root.

repo
string
required

The fully-qualified repository name.

ref
string

The git ref (branch, tag, or commit SHA) to blame at. Defaults to the repository's default branch.

Response

Blame ranges and deduplicated commit metadata.

repo
string
required

The repository that the commit hashes and paths belong to. Usually the requested repository; for an owner repository's knowledge-base/ path it is the knowledge repository, with paths relative to it.

ranges
object[]
required

Contiguous, non-overlapping line ranges ordered by startLine. Each range is attributed to a single commit.

commits
object
required

Commit metadata keyed by hash, deduplicated across ranges.