Factories
Search the indexed codebase
Returns up to limit chunks of the deployment’s indexed codebase whose text matches query, a text match over chunk text. Requires permission factories:read, held at the deployment root.
GET
Search the indexed codebase
The reference panel describes the current v3 operation. The notes below describe its v2 compatibility API. Follow the v3 request schema for current calls: v3 can move identifiers from the body or query into the URL. Keep the v2 method, path, and payload together when using the compatibility API.
v2 compatibility notes
GET /api/v2/factories/searchCodebase?query=&limit= returns up to limit chunks of the deployment’s indexed codebase whose text matches query, as CodebaseSearchHit objects. The match is a text search over chunk text. Each hit carries the file path, the matching chunk, and its chunkIndex and language (null when not recorded). The read is not paged.
query is required and must be 1 to 500 characters. limit is an integer from 1 to 50 and defaults to 20. A missing, empty, or longer query, a limit outside that range, or a repeated parameter is 400 bad_request.
Deployment-root read. The indexed codebase has no home org unit, so your role grants must hold factories:read at the deployment root. Holding it only below the root, or at a partner organization’s root, is refused with 403 and requiredPermission: "factories:read".Authorizations
Query Parameters
Response
Matching chunks

