Get worktree diff
GET /api/v1/projects/{projectId}/{agentType}/worktrees/{wid}/diff
GET
/api/v1/projects/{projectId}/{agentType}/worktrees/{wid}/diff
Returns uncommitted changes (tracked and untracked files) for a worktree as a unified diff with per-file statistics.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” projectId
required
string
Project ID
wid
required
string
Worktree ID
Responses
Section titled “ Responses ”OK
object
files
Files lists per-file change statistics.
Array<object>
object
additions
Additions is the number of lines added.
integer
deletions
Deletions is the number of lines removed.
integer
isBinary
IsBinary is true when the file is a binary file.
boolean
oldPath
OldPath is the previous path for renamed files.
string
path
Path is the file path relative to the worktree root.
string
status
Status is the change type: “added”, “modified”, “deleted”, or “renamed”.
string
rawDiff
RawDiff is the unified diff output from git.
string
totalAdditions
TotalAdditions is the sum of additions across all files.
integer
totalDeletions
TotalDeletions is the sum of deletions across all files.
integer
truncated
Truncated is true when the raw diff exceeded the size limit and was capped.
boolean
Bad Request
object
code
string
error
string
Not Found
object
code
string
error
string
Internal Server Error
object
code
string
error
string