Skip to main content
POST
Get the definition of a symbol at a specific position in a file

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
position
object
required

A position within a specific file in the workspace

include_raw_response
boolean

Whether to include the raw response from the langserver in the response. Defaults to false.

Example:

false

include_source_code
boolean

Whether to include the source code around the symbol's identifier in the response. Defaults to false. TODO: Implement this

Example:

false

Response

Definition retrieved successfully

Response to a definition request.

The definition(s) of the symbol. Points to the start position of the symbol's identifier.

e.g. for the definition of User on line 5 of src/main.py with the code:

The definition(s) will be [{"path": "src/main.py", "line": 0, "character": 6}].

definitions
object[]
required
selected_identifier
object
required

The identifier that was "clicked-on" to get the definition.

source_code_context
object[] | null

The source code of symbol definitions.