sessions

Read one session workspace file and its git diff

get/api/v1/sessions/{sessionId}/workspace/file

Path parameters

sessionIdstring required

Session identifier, e.g. project-1.

Session identifier, e.g. project-1.

Query parameters

pathstring

Session-worktree-relative file path.

Session-worktree-relative file path.

section'committed' | 'staged' | 'unstaged' | 'untracked'

Git-state section the file was opened from (see WorkspaceFileSections). staged diffs the index against HEAD; unstaged diffs the worktree against the index; omitted/committed/untracked diff the worktree against the compare base.

Git-state section the file was opened from (see WorkspaceFileSections). staged diffs the index against HEAD; unstaged diffs the worktree against the index; omitted/committed/untracked diff the worktree against the compare base.

Response

OK

additionsinteger required
binaryboolean required
compareBaseRefstring
compareBaseShastring
compareMode'base' | 'head_fallback'
contentstring required
contentTruncatedboolean required
deletedboolean required
deletionsinteger required
diffstring required
diffTruncatedboolean required
imageMediaTypestring
pathstring required
previousPathstring
sessionIdstring required
sizeinteger required
status'unmodified' | 'modified' | 'added' | 'deleted' | 'renamed' required

Changes

Changed in 5 of the 117 revisions of this API.11

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the new optional query request parameter section

      new-optional-request-parameter

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • endpoint added

      endpoint-added