mcp

Mcp Ingest Code Occurrences

Post ONE batch of a key-usage run: where each key is referenced in the code.

MCP twin of POST /v1/projects/{id}/code-occurrences. Lifecycle: omit scan_id to OPEN a run (the response mints + echoes it), echo it on follow-up batches, send final=true on the last to CLOSE (reconcile gone + mass-gone guard). Each ref is resolved server-side to the BASE-version key_uuid; refs matching no live base key are counted unresolved and echoed, never stored.

IMPORTANT: the response ALWAYS carries scan_id when supported. Treat its ABSENCE as a backend that predates this contract and do NOT drop occurrences silently.

post/v1/mcp/projects/{project_id}/code-occurrences

Request

  • Base URL: https://api.sonenta.dev
  • URL: https://api.sonenta.dev/v1/mcp/projects/{project_id}/code-occurrences
  • Auth: none declared

Path parameters

project_idstring required

Request body

scan_idstring nullable

Omit on the FIRST batch to open a run (the response mints + echoes the id); echo it on every follow-up batch.

finalboolean

Set true on the LAST batch to close the run: reconcile gone + mass-gone guard.

metaobject nullable

Run context (tool, version, sha).

confirm_mass_goneboolean

Only set when a final that retires most live occurrences is intended; else 422.

Response

Successful Response

object required

Changes

No recorded changes to this operation across all 1 revision of this API.