---
title: "Read one file from an associated pull request base-to-head diff"
method: GET
path: "/api/v1/sessions/{sessionId}/pr/{prNumber}/file"
tags: ["sessions"]
---

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

`GET /api/v1/sessions/{sessionId}/pr/{prNumber}/file`

## Path parameters

- `sessionId` string, required — Session identifier, e.g. project-1.
- `prNumber` integer, required — Associated pull request number.

## Query parameters

- `path` string, required — Repository-relative file path.
- `previousPath` string — Previous repository-relative path supplied by the selected PR file summary for rename detection.
- `sourceUrl` string — Stable URL of the selected associated pull request.

## Response `200`

OK

- WorkspaceFileResponse
  - `additions` integer, required
  - `binary` boolean, required
  - `compareBaseRef` string
  - `compareBaseSha` string
  - `compareMode` 'base' | 'head_fallback'
  - `content` string, required
  - `contentTruncated` boolean, required
  - `deleted` boolean, required
  - `deletions` integer, required
  - `diff` string, required
  - `diffTruncated` boolean, required
  - `editable` boolean, required
  - `fileFingerprint` string, required
  - `imageMediaType` string
  - `path` string, required
  - `previousPath` string
  - `sessionId` string, required
  - `size` integer, required
  - `status` 'unmodified' | 'modified' | 'added' | 'deleted' | 'renamed', required
  - `workspaceVersion` string, required

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `500` — Internal Server Error

## Changes

- **2026-09-21** `36b3a9d49c3e` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/changes/api/v1/sessions/:sessionId/pr/:prNumber/file/get.md)

---

[API](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon.md) · [All operations](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/llms.txt) · [OpenAPI document](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/revisions/371302977441?raw)
