symbol
Find all symbols that are referenced from a given position
Returns references categorized into:
- Workspace symbols (with their definitions)
- External symbols (built-in functions like ‘len’, ‘print’ or from external libraries)
- Symbols that couldn’t be found
e.g. for a function in main.py
:
@log_execution_time # Reference to decorator
def process_user():
user = User() # Reference to User class
print("Done") # Reference to built-in function
This would return:
- Workspace symbols: log_execution_time (with definition from decorators.py)
- Workspace symbols: User (with definition from models.py)
- External symbols: print (Python built-in)
POST
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Request to get the symbols that are referenced from the symbol at the given position Request to get all symbols that are referenced from a given position
The input position should point to a location in code where symbols are referenced. For example, inside a function body to find all symbols used by that function.
A position within a specific file in the workspace
Response
200 - application/json
Response containing symbols referenced from the requested position
The symbols are categorized into:
- workspace_symbols: References to symbols that were found and have definitions in the workspace
- external_symbols: References to symbols from outside the workspace (built-in functions, external libraries)
- not_found: References where the symbol definition could not be found