---
title: "Get workspace file content"
method: GET
path: "/api/projects/{projectId}/workspaces/{workspaceId}/git/file"
tags: ["Git"]
---

# Get workspace file content

`GET /api/projects/{projectId}/workspaces/{workspaceId}/git/file`

Get workspace file content. Returns the requested resource or collection for the authenticated caller.

## Path parameters

- `projectId` string, required
- `workspaceId` string, required

## Query parameters

- `path` string, required
- `ref` string

## Response `200`

File content

- FileContentResponse — file Content Response payload returned by the API.
  - `path` string — File system path or repository-relative path.
  - `content` string — Text content for a file or payload.
  - `encoding` string — encoding value for the file Content Response object.

---

[API](https://skmtc.dev/ibuildthecloud/apis/discobot-server-api.md) · [All operations](https://skmtc.dev/ibuildthecloud/apis/discobot-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ibuildthecloud/discobot-server-api/revisions/4de3fcd6be56/schema)
