Daytona lsp API

The lsp API from Daytona — 7 operation(s) for lsp.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

daytona-io-lsp-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Daytona admin lsp API
  description: Daytona Admin API — admin, audit, config, runners, docker-registry, regions, object-storage, jobs operations on the Daytona AI platform.
  version: '1.0'
  contact:
    name: Daytona Platforms Inc.
    url: https://www.daytona.io
    email: support@daytona.com
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://app.daytona.io/api
  description: Daytona Cloud production API
tags:
- name: lsp
paths:
  /lsp/completions:
    post:
      description: Get code completion suggestions from the LSP server
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - lsp
      summary: Get code completions
      operationId: Completions
      parameters:
      - description: Completion request
        name: request
        in: body
        required: true
        schema:
          $ref: '#/definitions/LspCompletionParams'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/CompletionList'
  /lsp/did-close:
    post:
      description: Notify the LSP server that a document has been closed
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - lsp
      summary: Notify document closed
      operationId: DidClose
      parameters:
      - description: Document request
        name: request
        in: body
        required: true
        schema:
          $ref: '#/definitions/LspDocumentRequest'
      responses:
        '200':
          description: OK
  /lsp/did-open:
    post:
      description: Notify the LSP server that a document has been opened
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - lsp
      summary: Notify document opened
      operationId: DidOpen
      parameters:
      - description: Document request
        name: request
        in: body
        required: true
        schema:
          $ref: '#/definitions/LspDocumentRequest'
      responses:
        '200':
          description: OK
  /lsp/document-symbols:
    get:
      description: Get symbols (functions, classes, etc.) from a document
      produces:
      - application/json
      tags:
      - lsp
      summary: Get document symbols
      operationId: DocumentSymbols
      parameters:
      - type: string
        description: Language ID (e.g., python, typescript)
        name: languageId
        in: query
        required: true
      - type: string
        description: Path to project
        name: pathToProject
        in: query
        required: true
      - type: string
        description: Document URI
        name: uri
        in: query
        required: true
      responses:
        '200':
          description: OK
          schema:
            type: array
            items:
              $ref: '#/definitions/LspSymbol'
  /lsp/start:
    post:
      description: Start a Language Server Protocol server for the specified language
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - lsp
      summary: Start LSP server
      operationId: Start
      parameters:
      - description: LSP server request
        name: request
        in: body
        required: true
        schema:
          $ref: '#/definitions/LspServerRequest'
      responses:
        '200':
          description: OK
  /lsp/stop:
    post:
      description: Stop a Language Server Protocol server
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - lsp
      summary: Stop LSP server
      operationId: Stop
      parameters:
      - description: LSP server request
        name: request
        in: body
        required: true
        schema:
          $ref: '#/definitions/LspServerRequest'
      responses:
        '200':
          description: OK
  /lsp/workspacesymbols:
    get:
      description: Search for symbols across the entire workspace
      produces:
      - application/json
      tags:
      - lsp
      summary: Get workspace symbols
      operationId: WorkspaceSymbols
      parameters:
      - type: string
        description: Search query
        name: query
        in: query
        required: true
      - type: string
        description: Language ID (e.g., python, typescript)
        name: languageId
        in: query
        required: true
      - type: string
        description: Path to project
        name: pathToProject
        in: query
        required: true
      responses:
        '200':
          description: OK
          schema:
            type: array
            items:
              $ref: '#/definitions/LspSymbol'
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: API Key access
    oauth2:
      type: openIdConnect
      openIdConnectUrl: http://localhost:3000/.well-known/openid-configuration
definitions:
  LspServerRequest:
    type: object
    required:
    - languageId
    - pathToProject
    properties:
      languageId:
        type: string
      pathToProject:
        type: string
  LspPosition:
    type: object
    required:
    - character
    - line
    properties:
      character:
        type: integer
      line:
        type: integer
  CompletionItem:
    type: object
    required:
    - label
    properties:
      detail:
        type: string
      documentation: {}
      filterText:
        type: string
      insertText:
        type: string
      kind:
        type: integer
      label:
        type: string
      sortText:
        type: string
  LspRange:
    type: object
    required:
    - end
    - start
    properties:
      end:
        $ref: '#/definitions/LspPosition'
      start:
        $ref: '#/definitions/LspPosition'
  LspLocation:
    type: object
    required:
    - range
    - uri
    properties:
      range:
        $ref: '#/definitions/LspRange'
      uri:
        type: string
  LspCompletionParams:
    type: object
    required:
    - languageId
    - pathToProject
    - position
    - uri
    properties:
      context:
        $ref: '#/definitions/CompletionContext'
      languageId:
        type: string
      pathToProject:
        type: string
      position:
        $ref: '#/definitions/LspPosition'
      uri:
        type: string
  CompletionContext:
    type: object
    required:
    - triggerKind
    properties:
      triggerCharacter:
        type: string
      triggerKind:
        type: integer
  LspDocumentRequest:
    type: object
    required:
    - languageId
    - pathToProject
    - uri
    properties:
      languageId:
        type: string
      pathToProject:
        type: string
      uri:
        type: string
  LspSymbol:
    type: object
    required:
    - kind
    - location
    - name
    properties:
      kind:
        type: integer
      location:
        $ref: '#/definitions/LspLocation'
      name:
        type: string
  CompletionList:
    type: object
    required:
    - isIncomplete
    - items
    properties:
      isIncomplete:
        type: boolean
      items:
        type: array
        items:
          $ref: '#/definitions/CompletionItem'