---
title: "Get the contents of a file at a given path"
method: POST
path: "/v1/devboxes/{id}/lsp/file"
tags: ["utility"]
---

# Get the contents of a file at a given path

`POST /v1/devboxes/{id}/lsp/file`

Get the contents of a file at a given path relative to the root directory

## Path parameters

- `id` string, required

## Request body

- object
  - `path` string, required

## Response `200`

The contents of the file and the full path to the file

- FileContentsResponse
  - `fullPath` string, required
  - `path` string, required
  - `contents` string, required

---

[API](https://skmtc.dev/runloopai/apis/runloop-api.md) · [All operations](https://skmtc.dev/runloopai/apis/runloop-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/runloopai/runloop-api/revisions/0cb966ca566f/schema)
