---
title: "Read one file of a hosted project"
method: GET
path: "/api/v0/desk/projects/{project_id}/file"
tags: ["Desk"]
---

# Read one file of a hosted project

`GET /api/v0/desk/projects/{project_id}/file`

## Request

- Base URL: `https://api.outerport.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.outerport.com/api/v0/desk/projects/{project_id}/file`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/outerport/apis/outerport-api/docs/api/v0/desk/projects/:project_id/file/get.ts> (a function with typed inputs; its response is checked against the schema)

UTF-8 text and the hash of its bytes. A file that is not text answers ``error: binary``.

## Path parameters

- `project_id` string, uuid, required

## Query parameters

- `path` string, required: Path relative to the project root.

## Response `200`

Successful Response

- DeskFileResponse: One file as UTF-8 text, with the hash of its bytes: the ``expected_sha256`` a save of it sends. A file that is not text answers ``error: binary`` with no content.
  - `path` string, required
  - `content` string, nullable
  - `sha256` string, required
  - `size` integer
  - `truncated` boolean
  - `error` string, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-26** `07854361a13b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/outerport/apis/outerport-api/changes/api/v0/desk/projects/:project_id/file/get.md)

---

[API](https://skmtc.dev/outerport/apis/outerport-api.md) - [All operations](https://skmtc.dev/outerport/apis/outerport-api/llms.txt) - [OpenAPI document](https://skmtc.dev/outerport/apis/outerport-api/revisions/08b5bf6f7f18?raw)
