symbol
Finds occurrences of an identifier by name in a file
Given a file path and identifier name, returns:
- Without position: All matching identifiers in the file
- With position: The exact identifier with that name at that position, or 3 closest identifiers with that name
Example finding all occurrences of “user_name”:
let user_name = "John"; // First occurrence
println!("{}", user_name); // Second occurrence
When a position is provided, it searches for an exact match at that location. If no exact match exists, returns the 3 identifiers closest to the position based on line and character distance, prioritizing lines.
POST
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
The name of the identifier to search for.
The path to the file to search for identifiers.
The position hint to search for identifiers. If not provided.
Response
200 - application/json