---
title: "Get diagnostics for a given file URI"
method: POST
path: "/v1/devboxes/{id}/lsp/diagnostics"
tags: ["ts-ls"]
---

# Get diagnostics for a given file URI

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

Get diagnostics for a given file URI from the language server

## Path parameters

- `id` string, required

## Request body

- FileRequestBody — Requesting a file parameter with a URI with absolute or relative path example with absolute uri: file://Users/user/project/src/index.ts
  - `uri` string, required

## Response `200`

The URI of the file and the diagnostics for that file

- DiagnosticsResponse
  - `diagnostics` BaseDiagnostic[], required
    - `code` union
      - number, double
      - string
    - `source` string
    - `message` string, required
    - `severity` 1 | 2 | 3 | 4 — The diagnostic's severity.
    - `range` BaseRange, required
      - `end` object, required
        - `character` number, double, required
        - `line` number, double, required
      - `start` object, required
        - `character` number, double, required
        - `line` number, double, required
  - `uri` 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)
