Bulk-index code entities and relations into the knowledge graph.
Deletes all existing Code nodes for the given repo (within the
caller's workspace) before inserting the new set, ensuring a clean
re-index on every call.
Enforces the tier max_repos cap before any write so the user gets a
402 with upgrade copy instead of a partial index when they exceed it.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Bulk index request for code entities and relations.
Response Body
application/json
application/json
curl -X POST "https://example.com/memory/code/index" \ -H "Content-Type: application/json" \ -d '{ "repo": "string", "entities": [ { "name": "string", "entity_type": "string", "file_path": "string", "line_number": 0 } ] }'null{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}