Skip to content

Diff two blobs

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

Hunks between two blobs by their shas; omit one side for an added or deleted file.

org
required
string
project
required
string
old
Any of:
string
new
Any of:
string

FileDiff

Media typeapplication/json
object
path
required
string
status
required
string
Allowed values: added deleted modified
binary
required
boolean
tooLarge
required
boolean
hunks
required
Array<object>
object
oldStart
required
Any of:
number
oldLines
required
Any of:
number
newStart
required
Any of:
number
newLines
required
Any of:
number
lines
required
Array<object>
object
kind
required
string
Allowed values: context add del
text
required
string
oldLine
required
Any of:
Any of:
number
newLine
required
Any of:
Any of:
number
Example
{
"status": "added",
"hunks": [
{
"oldStart": "Infinity",
"oldLines": "Infinity",
"newStart": "Infinity",
"newLines": "Infinity",
"lines": [
{
"kind": "context",
"oldLine": "Infinity",
"newLine": "Infinity"
}
]
}
]
}

BadRequest

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

Unauthorized

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

ProjectNotFound

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