sessions

Read one file from an associated pull request base-to-head diff

Changed on
get/api/v1/sessions/{sessionId}/pr/{prNumber}/file

Request

Path parameters

sessionIdstring required

Session identifier, e.g. project-1.

prNumberinteger required

Associated pull request number.

Query parameters

pathstring required

Repository-relative file path.

previousPathstring

Previous repository-relative path supplied by the selected PR file summary for rename detection.

sourceUrlstring

Stable URL of the selected associated pull request.

commitShastring

Exact SHA of one of the pull request's commits; reads that commit's change instead of the whole pull request.

Response

OK

additionsinteger required
binaryboolean required
compareBaseRefstring
compareBaseShastring
compareMode'base' | 'head_fallback'
contentstring required
contentTruncatedboolean required
deletedboolean required
deletionsinteger required
diffstring required
diffTruncatedboolean required
editableboolean required
fileFingerprintstring required
historicalboolean

True only for a read-only revision, never a live worktree file.

imageMediaTypestring
pathstring required
previousPathstring
sessionIdstring required
sizeinteger required
status'unmodified' | 'modified' | 'added' | 'deleted' | 'renamed' required
workspaceVersionstring required

Changes

    • info

      removed the agent_switch_saga enum value from the response property for the response status

    • info

      removed the agent_switch_saga enum value from the response property for the response status

    • info

      removed the agent_switch_saga enum value from the response property for the response status

    • info

      added the optional property to the response with the status