curl --request GET \
--url https://api.example.com/api/diff \
--header 'Authorization: Bearer <token>'{
"files": [
{
"oldPath": "<string>",
"newPath": "<string>",
"hunks": [
{
"oldRange": {
"start": 123,
"lines": 123
},
"newRange": {
"start": 123,
"lines": 123
},
"body": "<string>",
"heading": "<string>"
}
]
}
]
}Returns a structured diff between two git refs (branches, tags, or commit SHAs) using a two-dot comparison. See git-diff for details.
curl --request GET \
--url https://api.example.com/api/diff \
--header 'Authorization: Bearer <token>'{
"files": [
{
"oldPath": "<string>",
"newPath": "<string>",
"hunks": [
{
"oldRange": {
"start": 123,
"lines": 123
},
"newRange": {
"start": 123,
"lines": 123
},
"body": "<string>",
"heading": "<string>"
}
]
}
]
}Send either a Sourcebot API key (sbk_... or legacy sourcebot-...) or, on EE instances with OAuth enabled, an OAuth access token (sboa_...) in the Authorization header.
The fully-qualified repository name.
The base git ref (branch, tag, or commit SHA) to diff from.
The head git ref (branch, tag, or commit SHA) to diff to.
Structured diff between the two refs.
The list of changed files.
Show child attributes
Was this page helpful?