Skip to content

Diff a branch

GET
/api/orgs/{org}/projects/{project}/diff
curl --request GET \
--url 'https://api-dev.wrktr.com/api/orgs/example/projects/example/diff?head=example' \
--header 'Authorization: Bearer <token>'

The files a branch changes against base (the project’s default branch if omitted).

org
required
string
project
required
string
head
required
string
base
Any of:
string

BranchDiff

Media typeapplication/json
object
base
required
string
head
required
string
baseSha
required
string
headSha
required
string
mergeBaseSha
required
Any of:
string
fromSha
required
string
toSha
required
string
files
required
Array<object>
object
path
required
string
status
required
string
Allowed values: added deleted modified
oldBlob
required
Any of:
string
newBlob
required
Any of:
string
additions
required
Any of:
number
deletions
required
Any of:
number
binary
required
boolean
tooLarge
required
boolean
truncated
required
boolean
Example
{
"files": [
{
"status": "added",
"additions": "Infinity",
"deletions": "Infinity"
}
]
}

Unauthorized

Media typeapplication/json
object
_tag
required
string
Allowed values: Unauthorized
message
required
string
Example
{
"_tag": "Unauthorized"
}

ProjectNotFound | BranchNotFound

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: ProjectNotFound
project
required
string
Example
{
"_tag": "ProjectNotFound"
}