---
title: "Get Kg Node Debug"
method: GET
path: "/api/v1/kg/debug/node/{canonical_id}"
tags: ["v1", "KG Debug"]
---

# Get Kg Node Debug

`GET /api/v1/kg/debug/node/{canonical_id}`

## Request

- Base URL: `https://api.jeevyfabrication.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jeevyfabrication.com/api/v1/kg/debug/node/{canonical_id}`
- Auth: none declared

Return current_values, full history, and active edges for one KG node.

shop_id comes from the session via kg_read_shop_id (agents.md rule #7 —
never from a request argument).

All reads are non-mutating. Returns empty lists for unknown canonical_ids —
the node may exist in kg_nodes without shadow-writes yet.

History rows are annotated with deprecated=True when their (fact_type, value)
pair appears in entity_fact_deprecations, so callers can see which observations
are suppressed from the current_values() projection.

FINANCIAL GATE (kg-debugger-view task §0, 2026-07-02): unit_price facts are
dropped from both current_values and history unless
shop.security_class == 'financial' — the same gate
/internal/kg/node/{id} applies, shared via core.services.kg.read.security_gates
so this endpoint can't silently drift out of sync with it again.

node_type/display_name/observation_count (kg-debugger-view task,
2026-07-02): fetched from kg_nodes_repo and included ADDITIVELY so the
ported renderer's node inspector has a type/label/badge for its header —
this endpoint previously never looked up the node row at all, only its
facts and edges. None when the node isn't found (unchanged behavior).

## Path parameters

- `canonical_id` string, required

## Response `200`

Successful Response

- KgNodeDebugResponse: Standard response envelope for GET /kg/debug/node/{canonical_id}.
  - `data` KgNodeDebugData, required: KG data for one node, aggregated for field-map gap inspection. node_type / display_name / observation_count (kg-debugger-view task, 2026-07-02) are ADDITIVE — the ported renderer's node inspector needs a type/label/badge for its header, which this endpoint never carried before (only facts + edges). Optional so this stays backward compatible with the original JEEVY-586 consumer; None when the node row itself isn't found.
    - `canonical_id` string, required
    - `shop_id` integer, required
    - `node_type` string, nullable
    - `display_name` string, nullable
    - `observation_count` integer, nullable
    - `owner_user_id` integer, nullable
    - `owner_name` string, nullable
    - `current_values` KgObservationRow[], required
      - `fact_type` string, required
      - `value` unknown
      - `trust_tier` string, required
      - `source_of_change` string, nullable
      - `producer` string, nullable
      - `confidence` number, nullable
      - `observed_at` string, nullable
      - `deprecated` boolean
    - `history` KgObservationRow[], required
      - `fact_type` string, required
      - `value` unknown
      - `trust_tier` string, required
      - `source_of_change` string, nullable
      - `producer` string, nullable
      - `confidence` number, nullable
      - `observed_at` string, nullable
      - `deprecated` boolean
    - `active_edges_from` KgEdgeRow[], required
      - `id` string, nullable
      - `from_node` string, required
      - `to_node` string, required
      - `link_type` string, required
      - `link_source` string, required
      - `match_method` string, nullable
      - `confidence` number, nullable
      - `status` string, nullable
      - `origin_type` string, nullable
      - `origin_id` string, nullable
      - `owner_user_id` integer, nullable
    - `active_edges_to` KgEdgeRow[], required
      - `id` string, nullable
      - `from_node` string, required
      - `to_node` string, required
      - `link_type` string, required
      - `link_source` string, required
      - `match_method` string, nullable
      - `confidence` number, nullable
      - `status` string, nullable
      - `origin_type` string, nullable
      - `origin_id` string, nullable
      - `owner_user_id` integer, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api.md) - [All operations](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/revisions/ad9a01abeac9?raw)
