---
metadata:
  - name: generator
    content: Diplodoc Platform v5.71.0
alternate:
  - https://vibe.sourcecraft.dev/portal/docs/en/api-ref/Repository/GetCommitDiffByID.md
  - https://vibe.sourcecraft.dev/portal/docs/ru/api-ref/Repository/GetCommitDiffByID.md
  - https://vibe.sourcecraft.dev/portal/docs/ru/api-ref/Repository/GetCommitDiffByID.md
  - href: https://vibe.sourcecraft.dev/portal/docs/ru/api-ref/Repository/GetCommitDiffByID.md
    type: text/markdown
    title: Markdown version
  - href: https://vibe.sourcecraft.dev/portal/docs/ru/llms.txt?revision=r22245536
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://vibe.sourcecraft.dev/portal/docs/ru/llms.txt?revision=r22245536

<div class="openapi">

# Get Commit Diff (By ID)

<!-- markdownlint-disable-file -->

Returns a link for downloading the complete Git-compatible unified diff from the first parent to the requested commit.
Root commits are compared with the empty tree. The link always identifies this commit.
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

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-get);margin-bottom: 12px">

<div class="openapi__request">

GET {.openapi__method}
```text translate=no
https://api.sourcecraft.tech/repos/id:{repo_id}/commits/{commit_hash}/diff
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_commit_hash_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Full commit hash.

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
||

_repo_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
|#{.json-schema-properties}

## Responses

<div class="openapi__response__code__200">

## 200 OK

A successful response.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "link": "example",
  "expires_at": "2025-01-01T00:00:00Z"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_expires_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Expiration time for a signed link. Omitted when the link does not expire.

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_link_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Link for downloading the complete Git-compatible unified diff from the first parent to the requested commit.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__default">

## default

Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error_code": "example",
  "message": "example",
  "request_id": "example",
  "details": null
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: unknown

_Example:_{.json-schema-reset .json-schema-example} `null`
{.table-cell}
||
||

_error_code_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_request_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.