---
title: "Get code actions for a diagnostic"
method: POST
path: "/v1/devboxes/{id}/lsp/get-code-actions-for-diagnostic"
tags: ["rl-language-service"]
---

# Get code actions for a diagnostic

`POST /v1/devboxes/{id}/lsp/get-code-actions-for-diagnostic`

Get a list of code actions for a given diagnostic

## Path parameters

- `id` string, required

## Request body

- CodeActionsForDiagnosticRequestBody
  - `diagnostic` 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

## Response `200`

A list of code actions for the diagnostic

- BaseCodeAction[]
  - `kind` string
  - `isPreferred` boolean
  - `command` BaseCommand
    - `arguments` unknown[]
      - unknown
    - `command` string, required
    - `title` string, required
  - `edit` BaseWorkspaceEdit
    - `changes` RecordStringTextEditArray — Construct a type with a set of properties K of type T
  - `title` 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)
