Diff a branch
GET
/api/orgs/{org}/projects/{project}/diff
const url = 'https://api-dev.wrktr.com/api/orgs/example/projects/example/diff?head=example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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).
Authorizations
Section titled “Authorizations”- bearer
- None
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org
required
string
project
required
string
Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”BranchDiff
Media typeapplication/json
object
base
required
string
head
required
string
baseSha
required
string
headSha
required
string
fromSha
required
string
toSha
required
string
files
required
truncated
required
boolean
Example
{ "files": [ { "status": "added", "additions": "Infinity", "deletions": "Infinity" } ]}Unauthorized
Media typeapplication/json
object
_tag
required
string
message
required
string
Example
{ "_tag": "Unauthorized"}ProjectNotFound | BranchNotFound