Skip to main content
GET
/
api
/
blame
Get file blame
curl --request GET \
  --url https://api.example.com/api/blame \
  --header 'Authorization: Bearer <token>'
{
  "ranges": [
    {
      "hash": "<string>",
      "startLine": 1,
      "lineCount": 1
    }
  ],
  "commits": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.sourcebot.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your API key.

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.

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.