POST
/
symbol
/
find-referenced-symbols
curl --request POST \
  --url http://localhost:4444/v1/symbol/find-referenced-symbols \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "full_scan": false,
  "identifier_position": {
    "path": "src/main.py",
    "position": {
      "character": 5,
      "line": 10
    }
  }
}'
{
  "external_symbols": [
    {
      "file_range": {
        "path": "src/main.py",
        "range": {
          "end": {
            "character": 5,
            "line": 10
          },
          "start": {
            "character": 5,
            "line": 10
          }
        }
      },
      "kind": "<string>",
      "name": "<string>"
    }
  ],
  "not_found": [
    {
      "file_range": {
        "path": "src/main.py",
        "range": {
          "end": {
            "character": 5,
            "line": 10
          },
          "start": {
            "character": 5,
            "line": 10
          }
        }
      },
      "kind": "<string>",
      "name": "<string>"
    }
  ],
  "workspace_symbols": [
    {
      "definitions": [
        {
          "file_range": {
            "path": "src/main.py",
            "range": {
              "end": {
                "character": 5,
                "line": 10
              },
              "start": {
                "character": 5,
                "line": 10
              }
            }
          },
          "identifier_position": {
            "path": "src/main.py",
            "position": {
              "character": 5,
              "line": 10
            }
          },
          "kind": "class",
          "name": "User"
        }
      ],
      "reference": {
        "file_range": {
          "path": "src/main.py",
          "range": {
            "end": {
              "character": 5,
              "line": 10
            },
            "start": {
              "character": 5,
              "line": 10
            }
          }
        },
        "kind": "<string>",
        "name": "<string>"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json

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

200
application/json

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