git.commits.list-filesList the files a commit changes, in pages
Paged: a large change is read a page of files and a page of rows at a time, never as one payload. A file with more than 1,500 changed lines, or a lock file or build output, has `collapsed` set (the console folds it until asked); a file whose patch is over 16 MiB answers `state: too-large`. Lines longer than 10,000 characters are cut, with the number left out in `cut`.
Request syntax
GET /git/api/repositories/{repoId}/commits/{sha}/filesPath parameters
repoIdRequiredstring
Constraints: uuid
shaRequiredstring
Constraints: 1-255 chars
Query parameters
cursorOptionalnumber
`nextCursor` of the previous page; the first page when absent
Constraints: integer, min 0
limitOptionalnumber
Files per page, at most 1000; 500 when absent
Constraints: integer, 1-1000
ignoreWhitespaceOptionalenum
`true` to count lines as if whitespace did not matter (`git diff -w`); false when absent
One of:
true,false
Response
200 with `files`, `nextCursor`, `total`, and the `base` (the first parent, or the empty tree for a root commit) and `head` compared. 404 for an unknown commit.
A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.
Fields of data
baseAlwaysstring
The commit the change is measured from (the merge base for a pull request)headAlwaysstring
The commit with the changefilesAlwaysarray of object
This page of the changed files, in path orderfiles[].pathAlwaysstring
The file's path after the change; for a deletion, before itfiles[].oldPathAlwaysstring, may be null
Where a renamed file came from; null otherwisefiles[].statusAlwaysone of added, modified, deleted, renamed
What the change did to the filefiles[].binaryAlwaysboolean
A binary file: counts are 0 and there are no rowsfiles[].additionsAlwaysnumber
Lines addedfiles[].deletionsAlwaysnumber
Lines removedfiles[].generatedAlwaysone of lock, generated, may be null
A lock file or build output, collapsed by default; null for ordinary sourcefiles[].collapsedAlwaysone of large, generated, may be null
Why the console folds the file until asked: `large` (more changed lines than the limit) or `generated`; null when shown at oncenextCursorAlwaysnumber, may be null
Pass as `cursor` for the next page; null on the lasttotalAlwaysobject
Totals over the whole change, the same on every pagetotal.filesAlwaysnumber
Changed files in the whole changetotal.additionsAlwaysnumber
Lines added in the whole changetotal.deletionsAlwaysnumber
Lines removed in the whole changetotal.listedAlwaysnumber
Files the index lists; fewer than `files` only past the listing limit
Checked against the handlers: every route test validates their answers against this schema.
Errors
- 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
- 401No credentials, or an access key that is unknown, revoked or expired.
- 403The caller's policies do not allow git:PullRepository on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
- 404The resource does not exist in your organization.
Examples
The required parameters only, with example values. Replace id and the other placeholders with your own.
dcloud git commits list-files repoId shacurl -X GET "https://console.platform.deutschecloud.app/git/api/repositories/repoId/commits/sha/files" \
-H "Authorization: EWS-ACCESS-KEY $ACCESS_KEY"import { DcloudClient } from '@dcloud/sdk';
const client = new DcloudClient();
const result = await client.git.commits.listFiles({ repoId: "repoId", sha: "sha" });from dcloud import Client
client = Client()
result = client.git.commits.list_files(repo_id="repoId", sha="sha")Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_git_commits_list-files.