Get Pull Request Diff
Returns a link for downloading the complete Git-compatible unified diff for the current pull request iteration.
Public links resolve the latest iteration when downloaded. Signed links pin the iteration
selected when the link is issued and remain usable until expires_at.
Downloads are limited to 300 changed files, 1 MiB total, 500 KiB per encoded file diff
and 20,000 lines.
Exceeding a limit returns HTTP 429 without a partial diff; retrying the same diff will not help.
Request
GET
https://api.sourcecraft.tech/repos/{org_slug}/{repo_slug}/pulls/{pull_request_slug}/diff
Path parameters
|
Name |
Description |
|
org_slug |
Type: string Example: `` |
|
pull_request_slug |
Type: string Example: `` |
|
repo_slug |
Type: string Example: `` |
Responses
200 OK
A successful response.
Body
application/json
{
"link": "example",
"expires_at": "2025-01-01T00:00:00Z"
}
|
Name |
Description |
|
expires_at |
Type: string<date-time> Expiration time for a signed link. Omitted when the link does not expire. Example: |
|
link |
Type: string Link for downloading the complete Git-compatible unified diff. Example: |
default
Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme
Body
application/json
{
"error_code": "example",
"message": "example",
"request_id": "example",
"details": null
}
|
Name |
Description |
|
details |
Type: unknown Example: |
|
error_code |
Type: string Example: |
|
message |
Type: string Example: |
|
request_id |
Type: string Example: |