Find all symbols that are referenced from a given symbol's definition
The input position must point to a symbol (e.g. function name, class name, variable name). Returns all symbols referenced within that symbol’s implementation, 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 definition in main.py
:
@log_execution_time # Reference to decorator
def process_user(): # <-- Input position here
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), User (with definition from models.py) ]
- External symbols: print (Python built-in)
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Request to get all symbols that are referenced from a symbol at the given position, either focusing on function calls, or more permissively finding all references
The input position must point to a symbol (e.g. function name, class name, variable name). The response will include all symbols that are referenced from that input symbol. For example, if the position points to a function name, the response will include all symbols referenced within that function's implementation.
Response
Referenced symbols retrieved successfully
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