git.pulls.getShow a pull request with mergeability, checks and approvals
The diff is included only for a caller who also holds git:PullRepository; `canReadSource` in the response says which happened.
Without git:PullRepository the answer is reduced rather than refused.
Request syntax
GET /git/api/repositories/{repoId}/pulls/{prNumber}Path parameters
repoIdRequiredstring
Constraints: uuid
prNumberRequirednumber
Constraints: integer, min 1
Response
200 with the pull request, its mergeability recomputed (mergeStatus, sourceOid, targetOid, conflicts), `diff` (or null), `canReadSource`, `checks`, `approvals`, `codeOwners` and `mergeQueue`.
A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.
Fields of data
idAlwaysstring
The pull request idorgIdAlwaysstring
The organization that owns itrepoIdAlwaysstring
The repository it belongs tonumberAlwaysnumber
Its number in the repository, as in #12titleAlwaysstring
The titlebodyAlwaysstring, may be null
The description (Markdown); null when there is nonestateAlwaysone of open, closed, merged, draft
open, draft, closed (without merging) or mergedsourceBranchAlwaysstring
The branch with the changestargetBranchAlwaysstring
The branch it merges intosourceOidAlwaysstring, may be null
Head commit of the source branch when mergeability was last computedtargetOidAlwaysstring, may be null
Tip of the target branch when mergeability was last computedmergeStatusAlwaysone of unknown, mergeable, conflicted, up_to_date
Whether it merges cleanly: mergeable, conflicted, up_to_date (nothing to merge) or unknownmergeConflictsAlwaysarray of string, may be null
The conflicting paths when conflicted; null when not knownmergeCommitOidAlwaysstring, may be null
The commit the merge produced; null until mergedauthorIamUserIdAlwaysstring
The IAM user who opened it (for an imported one, who ran the import)isDraftAlwaysboolean
A draft, not yet ready for reviewmergedAtAlwaysstring, may be null
When it was merged; null unless mergedclosedAtAlwaysstring, may be null
When it was closed; null while openexternalAuthorAlwaysstring, may be null
For an imported pull request, who opened it at the source; null otherwiseexternalUrlAlwaysstring, may be null
For an imported pull request, its address at the source; null otherwiseautoMergeMethodAlwaysone of merge, squash, rebase, may be null
The method auto-merge will use; null when auto-merge is offautoMergeIamUserIdAlwaysstring, may be null
Who turned auto-merge on, and as whom it merges; null when offautoMergeEnabledAtAlwaysstring, may be null
When auto-merge was turned on; null when offautoMergeBlockedReasonAlwaysstring, may be null
Why the last auto-merge attempt did not merge; null when nothing blocks itcreatedAtAlwaysstring
When it was openedupdatedAtAlwaysstring
When it last changedconflictsAlwaysarray of string
The paths that conflict, recomputed now; empty when it merges cleanlydiffAlwaysobject, may be null
The changes; null without git:PullRepository or when a branch is gonediff.patchAlwaysstring
The unified diff of what the pull request proposesdiff.filesChangedAlwaysnumber
Files changeddiff.insertionsAlwaysnumber
Lines addeddiff.deletionsAlwaysnumber
Lines removeddiff.truncatedAlwaysboolean
True when the patch holds only the first files because the whole is too largecanReadSourceAlwaysboolean
False when the diff was withheld for lack of git:PullRepositorychecksAlwaysobject, may be null
Status checks on the head commit; null when the source branch is gonechecks.passedAlwaysboolean
Status checks allow the mergechecks.requiredAlwaysboolean
A protection rule on the target requires checkschecks.pendingAlwaysboolean
Checks are still running and may yet passchecks.checksAlwaysarray of object
Each check on the head commitchecks.checks[].workflowNameAlwaysstring
The workflow, job or commit status context checkedchecks.checks[].runIdAlwaysstring
The CI run; `status:<id>` for a reported commit status, empty while none has runchecks.checks[].runNumberAlwaysnumber
The run number; 0 for a commit status or a check with no run yetchecks.checks[].statusAlwaysone of queued, provisioning, running, succeeded, failed, cancelled, timed_out
Where the check standschecks.checks[].requiredWhen presentboolean
Whether the check gates the mergechecks.checks[].versionWhen presentone of protected, proposed
Whether the run used the workflow file of the target branch (protected) or the pull request's (proposed)checks.checks[].commitStatusWhen presentobject
Present when the check is a commit status an external tool reportedchecks.checks[].commitStatus.contextAlwaysstring
The context the external tool reportedchecks.checks[].commitStatus.descriptionAlwaysstring, may be null
Its short summary; null when none was givenchecks.checks[].commitStatus.targetUrlAlwaysstring, may be null
Link to the details; null when none was givenchecks.reasonWhen presentstring
Why the checks block the merge; absent when they passapprovalsAlwaysobject
Where the required approvals standapprovals.passedAlwaysboolean
Approvals allow the mergeapprovals.requiredAlwaysnumber
Approvals the target branch requires; 0 when noneapprovals.countedAlwaysnumber
Approvals that count toward the requirementapprovals.dismissedAlwaysnumber
Approvals not counted because the branch moved after themapprovals.reasonWhen presentstring
Why approvals block the merge; absent when they passcodeOwnersAlwaysobject
Where code owner review standscodeOwners.requiredAlwaysboolean
The target branch requires code owner reviewcodeOwners.passedAlwaysboolean
Code owner review allows the mergecodeOwners.missingAlwaysarray of object
Changed files still waiting for an approval by an ownercodeOwners.missing[].pathAlwaysstring
A changed filecodeOwners.missing[].ownersAlwaysarray of string
Its owners, as CODEOWNERS names themcodeOwners.reasonWhen presentstring
Why code owners block the merge; absent when they passmergeQueueAlwaysobject
Where it stands in the merge queue of its targetmergeQueue.requiredAlwaysboolean
The target branch requires the merge queuemergeQueue.configAlwaysobject, may be null
The queue settings; null when no queuemergeQueue.config.ruleIdAlwaysstring
The branch protection rule that requires the queuemergeQueue.config.methodAlwaysone of merge, squash, rebase
How queued pull requests are mergedmergeQueue.config.buildConcurrencyAlwaysnumber
Builds that may run at oncemergeQueue.config.minGroupSizeAlwaysnumber
Fewest pull requests merged togethermergeQueue.config.maxGroupSizeAlwaysnumber
Most pull requests merged togethermergeQueue.config.waitMinutesAlwaysnumber
Minutes to wait for the minimum group to fillmergeQueue.config.checkTimeoutMinutesAlwaysnumber
Minutes a build may take before it counts as failedmergeQueue.config.onlyNonFailingAlwaysboolean
A failed build removes its pull request at once, rather than waiting on later buildsmergeQueue.entryAlwaysobject, may be null
Its live queue entry, or how the last attempt ended; null when never queuedmergeQueue.entry.idAlwaysstring
The queue entry idmergeQueue.entry.orgIdAlwaysstring
The organization that owns itmergeQueue.entry.repoIdAlwaysstring
The repositorymergeQueue.entry.prIdAlwaysstring
The pull request queuedmergeQueue.entry.baseBranchAlwaysstring
The protected branch the queue merges intomergeQueue.entry.stateAlwaysone of waiting, queued, building, passed, failed, merged, removed
waiting (for approvals and checks), queued, building, passed, failed, merged or removedmergeQueue.entry.positionAlwaysnumber
Sort key in the queue: a larger one is further backmergeQueue.entry.headOidAlwaysstring, may be null
Pull request head when it joined the line; null while waitingmergeQueue.entry.baseOidAlwaysstring, may be null
The commit its build sits on; null until builtmergeQueue.entry.groupOidAlwaysstring, may be null
The commit built: the base, every entry ahead, and this one; null until builtmergeQueue.entry.tempRefAlwaysstring, may be null
The temporary branch built; null until builtmergeQueue.entry.mergeMethodAlwaysone of merge, squash, rebase, may be null
How it will be mergedmergeQueue.entry.enqueuedByIamUserIdAlwaysstring, may be null
Who added it; null when that IAM user is gonemergeQueue.entry.removalReasonAlwaysstring, may be null
Why it left the queue; null unless removedmergeQueue.entry.queuedAtAlwaysstring, may be null
When it joined the line; null while waitingmergeQueue.entry.buildStartedAtAlwaysstring, may be null
When its build started; null until thenmergeQueue.entry.finishedAtAlwaysstring, may be null
When it merged or left; null while in the queuemergeQueue.entry.createdAtAlwaysstring
When it was addedmergeQueue.entry.updatedAtAlwaysstring
When it last changedmergeQueue.positionAlwaysnumber, may be null
1-based place in line; null while waiting or once finishedmergeQueue.eventsAlwaysarray of object
Its last 30 queue events, newest firstmergeQueue.events[].idAlwaysstring
The event idmergeQueue.events[].orgIdAlwaysstring
The organizationmergeQueue.events[].repoIdAlwaysstring
The repositorymergeQueue.events[].baseBranchAlwaysstring
The queue, by its branchmergeQueue.events[].entryIdAlwaysstring, may be null
The queue entry concerned; null for the queue as a wholemergeQueue.events[].prIdAlwaysstring, may be null
The pull request concerned; null for the queue as a wholemergeQueue.events[].kindAlwaysone of waiting, queued, build_started, checks_passed, checks_failed, conflict, rebuild, merged, removed
What happenedmergeQueue.events[].detailAlwaysstring, may be null
A sentence on what happened and whymergeQueue.events[].actorIamUserIdAlwaysstring, may be null
Who acted; null when the queue itself didmergeQueue.events[].commitOidAlwaysstring, may be null
The commit concerned, if anymergeQueue.events[].createdAtAlwaysstring
When it happenedmergeQueue.events[].prNumberAlwaysnumber, may be null
The pull request number; null when nonemergeQueue.events[].actorAlwaysstring, may be null
The actor's username; null when the queue acted
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:GetPullRequest 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 pulls get repoId prNumbercurl -X GET "https://console.platform-development.deutschecloud.app/git/api/repositories/repoId/pulls/prNumber" \
-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_pulls_get.