Query current repository code evidence

POST
/v1/scopes/{scope_id}/code/query

Read a bounded native Git code index for the authorized Scope. Use symbols or explore before relation or read operations, then pass the returned fingerprint. Results are static evidence with explicit limitations. Queries never build indexes, execute repository code, or persist history. code_changed requires local sync before retry.

Authorization

BearerAuth
AuthorizationBearer <token>

Bearer credential resolved to an opaque authenticated Principal by the Server deployment.

In: header

Path Parameters

scope_id*string
Match.*\S.*
Length1 <= length <= 256

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

callers, callees, impact, affected_tests, impact_changes and read require expected_fingerprint. impact_changes also requires before_fingerprint; other operations must omit it or set it to null.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/scopes/string/code/query" \  -H "Content-Type: application/json" \  -d '{    "operation": {      "kind": "status"    }  }'
{  "schema": "powercontext.code-query.v1",  "scope_id": "string",  "fingerprint": "string",  "before_fingerprint": "string",  "commit": "string",  "git_object_format": "sha1",  "dirty": true,  "checked_at": "string",  "operation": "string",  "status": "ok",  "items": [    {      "property1": null,      "property2": null    }  ],  "coverage": {    "property1": null,    "property2": null  },  "limitations": [    "string"  ]}