Skip to main content
GET
/
api
/
repos
/
{repo_name}
/
blame
Blame
curl --request GET \
  --url https://api.{cluster}.code.storage/api/repos/{repo_name}/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.

Path Parameters

repo_name
string
required

Repository name. Names that contain / or any other character that is not safe in a URL path segment must be URL encoded so the value occupies a single path segment. For example pierre/example is sent as pierre%2Fexample. Plain names such as example can be sent as-is. The server URL-decodes the value before resolving the repository.

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"