Skip to main content
GET
Git Diff Query

Authorizations

X-Session-API-Key
string
header
required

Query Parameters

path
string
required

The file path to get diff for

ref
string | null

Optional git ref to diff against (e.g. 'HEAD' for git status-style changes, or a commit hash). When omitted, the upstream/default branch is auto-detected.

commit
string | null

Optional commit SHA. When set, the diff is the change that commit introduced (vs its first parent), read entirely from git objects so deleted files still render. Mutually exclusive with 'ref'.

Pattern: ^[0-9a-fA-F]{4,64}$

Response

Successful Response

modified
string | null
required
original
string | null
required