git.commits.getShow one commit with its patch
Sensitive read — a patch is source code.
Request syntax
GET /git/api/repositories/{repoId}/commits/{sha}Path parameters
repoIdRequiredstring
Constraints: uuid
shaRequiredstring
Constraints: 1-255 chars
Response
200 with the commit's metadata (as in `list`), `files` (filename, status, additions, deletions, patch) and `stats` (additions, deletions).
A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.
Fields of data
oidAlwaysstring
The full 40-character commit idshortOidAlwaysstring
The abbreviated commit idsubjectAlwaysstring
The first line of the commit messagebodyAlwaysstring
The rest of the commit message; empty when there is noneauthorNameAlwaysstring
Who wrote the commitauthorEmailAlwaysstring
The author's email addressauthoredAtAlwaysstring
When the commit was authored (ISO 8601)parentsAlwaysarray of string
Ids of the parent commits: none for the first commit, two or more for a mergefilesAlwaysarray of object
Every file the commit changedfiles[].filenameAlwaysstring
The file's path after the commit (the new path of a rename)files[].statusAlwaysone of added, modified, deleted, renamed
What the commit did to the filefiles[].additionsAlwaysnumber
Lines added (0 for a binary file)files[].deletionsAlwaysnumber
Lines removed (0 for a binary file)files[].patchWhen presentstring
The file's unified diff; absent when there is none to show (e.g. too large)statsAlwaysobject
Totals over the changed filesstats.additionsAlwaysnumber
Lines added across all filesstats.deletionsAlwaysnumber
Lines removed across all files
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 get repoId shacurl -X GET "https://console.platform-development.deutschecloud.app/git/api/repositories/repoId/commits/sha" \
-H "Authorization: EWS-ACCESS-KEY $ACCESS_KEY"Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_git_commits_get.