Git
Get file blame
Changed onReturns blame information for a file at a given repository path and optional git ref.
The response is split into two parts:
- ranges: contiguous, non-overlapping line ranges, each attributed to a single commit. Ordered by startLine.
- commits: commit metadata (hash, date, message, author, optional previous pointer for walking back through history) keyed by hash, deduplicated across ranges.
Whole-file renames are followed automatically. Cross-file line moves and copies are not.
get/api/blame
Request
- The document declares no server URL.
- Auth
- HTTP bearer
- or API key in header X-Sourcebot-Api-Key
- or none
Query parameters
pathstring required
The file path to blame, relative to the repository root.
repostring required
The fully-qualified repository name.
refstring
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.
Changes
- info
added the required property
to the response with the status
- info