Skip to main content
GET
/
api
/
v1
/
repos
/
blame
Blame
curl --request GET \
  --url https://api.{cluster}.code.storage/api/v1/repos/blame \
  --header 'Authorization: Bearer <token>'
{
  "commit_sha": "b003fc78805954584e1ee364a4ad39d7c79e819a",
  "lines": [
    {
      "author_email": "jane@example.com",
      "author_name": "Jane Doe",
      "author_time": "2024-01-15T14:32:18Z",
      "commit_sha": "b003fc78805954584e1ee364a4ad39d7c79e819a",
      "committer_email": "jane@example.com",
      "committer_name": "Jane Doe",
      "committer_time": "2024-01-15T14:32:18Z",
      "line_number": 42,
      "original_line_number": 40,
      "original_path": "src/main.go",
      "previous_commit_sha": "a4d39d7c79e819ab003fc78805954584e1ee36",
      "summary": "fix: resolve scrolling issue in dashboard"
    }
  ],
  "path": "src/main.go",
  "ref": "main"
}

Documentation Index

Fetch the complete documentation index at: https://code.storage/docs/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 auth token.

Query Parameters

path
string
required

Repository-relative file path to blame.

ref
string

Optional branch, tag, or commit SHA to blame at. When omitted, the repository default branch is used.

ephemeral
boolean

Whether ref should be resolved from the ephemeral namespace.

range
string[]

Optional git blame -L-style range spec. May be repeated to blame multiple regions (max 16). Each value is one -L argument: e.g. 10,20, 10,+5, /getUser/,/^}/, /getUser/,+30, 10,, ,20, 10, :^func .*Foo, :funcname.

detect_moves
boolean

Follow the file across renames and copies.

Response

Per-line blame for the resolved file revision.

Per-line blame information for the requested file at the resolved revision.

commit_sha
string
required

Commit SHA the blame was computed at.

Example:

"b003fc78805954584e1ee364a4ad39d7c79e819a"

lines
object[]
required

Per-line blame results in file order.

path
string
required

Repository-relative file path that was blamed.

Example:

"src/main.go"

ref
string
required

Resolved ref used for the blame.

Example:

"main"