---
title: "Get constitution axioms with their edges and connected facts"
method: GET
path: "/pots/{pot_id}/constitution/with-edges"
tags: ["pots"]
---

# Get constitution axioms with their edges and connected facts

`GET /pots/{pot_id}/constitution/with-edges`

Get constitution axioms enriched with edges and connected facts.

M18: Uses single-query + in-memory filter strategy (3 DynamoDB ops).

Strategy:
1. get_constitution() — 1 query
2. get_all_edges() — 1 query
3. get_facts(batch) — 1 query for connected facts

## Path parameters

- `pot_id` string, uuid, required

## Response `200`

Constitution with edges retrieved successfully

- ConstitutionWithEdgesResponse — Response for constitution with edges endpoint (M18).
  - `pot_id` string, uuid, required
  - `axioms` AxiomWithEdges[], required
    - `axiom` ConstitutionAxiom, required — Constitution axiom - foundational truth in a POT. M7: Added for DynamoDB persistence. Constitution axioms are immutable facts with pot_score=1.0.
      - `id` string, required — Unique axiom identifier (e.g., CONST#001)
      - `pot_id` string, uuid, required — POT this axiom belongs to
      - `workspace_id` string, uuid, required — Multi-tenant isolation
      - `content` string, required — The axiom statement
      - `pot_score` number — Always 1.0 for constitution
      - `level` 'CONSTITUTION' | 'VERIFIED' | 'SUPPORTED' | 'INFERRED' | 'HYPOTHESIS' | 'SPECULATION' — POT Index levels matching score ranges.
      - `created_by` string, required — User who created this axiom
      - `approved_by` string, required — User who approved this axiom
      - `rationale` string, nullable — Why this axiom is foundational
      - `domain` string, nullable — Domain category
      - `tags` string[] — Tags for search
      - `created_at` string, date-time — When axiom was created
      - `updated_at` string, date-time — When axiom was last updated
    - `edges_out` Edge[]
      - `id` string, required — Unique edge identifier
      - `pot_id` string, uuid, required — POT this edge belongs to
      - `workspace_id` string, uuid, required — Workspace this edge belongs to
      - `from_id` string, uuid, required — Source fact ID (A in A → B)
      - `to_id` string, uuid, required — Target fact ID (B in A → B)
      - `type` 'supports' | 'contradicts' | 'resolved_contradiction' | 'refines' | 'derives_from' | 'is_part_of' | 'extends' | 'cites' | 'related_to', required — Types of semantic relationships between facts. M7 uses a simplified subset. Full taxonomy in edge-types.md will be implemented in M8+ when GraphRAG is introduced.
      - `weight` number, required — Confidence in relationship (0.0-1.0)
      - `rationale` string — Brief explanation of why this relationship exists
      - `detected_by` string — Detector/model that identified this edge
      - `confidence` number — Detection confidence (0.0-1.0)
      - `validation_status` string — Validation status (auto-approved, pending, validated, rejected)
      - `resolution_type` string, nullable — Resolution type (confirmed_a, confirmed_b, both_valid, needs_update, dismissed)
      - `resolved_by_name` string, nullable — Name of the person who resolved the contradiction
      - `resolved_by_role` string, nullable — Role of the person who resolved the contradiction
      - `resolved_by_contributor_id` string, uuid, nullable — Contributor registry ID of the person who resolved the contradiction
      - `resolved_at` string, date-time, nullable — When the contradiction was resolved
      - `resolution_notes` string, nullable — Notes about the resolution
      - `created_at` string, date-time, nullable
      - `updated_at` string, date-time, nullable
    - `edges_in` Edge[]
      - `id` string, required — Unique edge identifier
      - `pot_id` string, uuid, required — POT this edge belongs to
      - `workspace_id` string, uuid, required — Workspace this edge belongs to
      - `from_id` string, uuid, required — Source fact ID (A in A → B)
      - `to_id` string, uuid, required — Target fact ID (B in A → B)
      - `type` 'supports' | 'contradicts' | 'resolved_contradiction' | 'refines' | 'derives_from' | 'is_part_of' | 'extends' | 'cites' | 'related_to', required — Types of semantic relationships between facts. M7 uses a simplified subset. Full taxonomy in edge-types.md will be implemented in M8+ when GraphRAG is introduced.
      - `weight` number, required — Confidence in relationship (0.0-1.0)
      - `rationale` string — Brief explanation of why this relationship exists
      - `detected_by` string — Detector/model that identified this edge
      - `confidence` number — Detection confidence (0.0-1.0)
      - `validation_status` string — Validation status (auto-approved, pending, validated, rejected)
      - `resolution_type` string, nullable — Resolution type (confirmed_a, confirmed_b, both_valid, needs_update, dismissed)
      - `resolved_by_name` string, nullable — Name of the person who resolved the contradiction
      - `resolved_by_role` string, nullable — Role of the person who resolved the contradiction
      - `resolved_by_contributor_id` string, uuid, nullable — Contributor registry ID of the person who resolved the contradiction
      - `resolved_at` string, date-time, nullable — When the contradiction was resolved
      - `resolution_notes` string, nullable — Notes about the resolution
      - `created_at` string, date-time, nullable
      - `updated_at` string, date-time, nullable
    - `connected_facts` FactExtended[]
      - `id` string, uuid, required — Unique identifier (UUID)
      - `pot_id` string, uuid, required — POT this fact belongs to
      - `workspace_id` string, uuid, nullable — Multi-tenant isolation. Defaults to DEV_WORKSPACE_ID if None.
      - `content` string, required — The actual claim or statement
      - `title` string, nullable — Short title (max 50 chars, hard limit 80) for graph node labels. Generated by LLM during extraction. None for legacy facts.
      - `content_hash` string, nullable — SHA-256 hash of content for deduplication
      - `pot_score` number, required — Certainty score (0.0-1.0, where 1.0 = CONSTITUTION)
      - `original_pot_score` number, nullable — Pre-propagation POT Score. None if propagation hasn't run.
      - `level` 'CONSTITUTION' | 'VERIFIED' | 'SUPPORTED' | 'INFERRED' | 'HYPOTHESIS' | 'SPECULATION', required — POT Index levels matching score ranges.
      - `embedding_model` string, nullable — Embedding model used, e.g. text-embedding-3-small
      - `provenance` Provenance, required — Provenance information for a fact.
        - `type` string, required — Type of provenance (extracted, manual, inferred, imported)
        - `sources` object[] — Source documents or references
        - `derivation` object, nullable — Derivation info for inferred facts
      - `classification` Classification — Classification metadata for a fact.
        - `domain` string — Domain category
        - `subdomain` string, nullable — Subdomain category
        - `tags` string[] — Tags for search (max 20). Inherited from SourceMetadata.tags during ingestion.
        - `entity_mentions` string[] — Entities mentioned
      - `status` string — Processing status (processing, ready, error)
      - `validation_status` string — Validation status (pending, validated, disputed, rejected)
      - `created_at` string, date-time — When fact was created
      - `updated_at` string, date-time — When fact was last updated
      - `valid_from` string, date-time, nullable — When the fact started being true
      - `valid_until` string, date-time, nullable — When the fact stopped being true
      - `decay_rate` number, nullable — Temporal decay rate per month (null if no decay)
      - `document_id` string, uuid, nullable — Document UUID this fact was extracted from. None for constitution facts and inline ingestion.
      - `language` string, nullable — ISO 639-1 language code of the fact content (e.g. 'es', 'en'). Inherited from document language detection during extraction.
      - `location` DocumentLocation — Location metadata tracing a fact back to its source in the document. Populated during ingestion when document_index_enabled=True. Available fields depend on document format: - PDF: page_number, section_path, source_text - DOCX: section_path, source_text (no page_number without LibreOffice) - PPTX: page_number (slide), section_path, source_text - XLSX: sheet_name, row_number, cell_ref, source_text - MD/TXT: section_path, source_text
        - `page_number` integer, nullable — Page number (1-indexed). PDF: page. PPTX: slide number.
        - `section_path` string, nullable — Heading breadcrumb, e.g. '## Resultados > ### Q3 2024'.
        - `source_text` string, nullable — Verbatim text excerpt from the document this fact was derived from.
        - `sheet_name` string, nullable — XLSX sheet (tab) name where the fact was found.
        - `row_number` integer, nullable — XLSX row number (1-indexed).
        - `cell_ref` string, nullable — XLSX cell reference, e.g. 'B7' or 'B7:D7'.
      - `scope_inferred` 'own' | 'third_party' | 'mixed_context' | 'unknown', nullable — Per-fact scope classification from scope-aware extraction. 'own' = describes the operating organization's data; 'third_party' = describes external entities (case studies, customers); 'mixed_context' = blends first- and third-party content; 'unknown' = LLM could not determine. None = legacy fact, extraction predates scope-aware prompt.
      - `scope_confidence` number, nullable — LLM-reported confidence (0.0-1.0) on the scope_inferred classification. ≥0.7 = trust; 0.4-0.7 = hint; <0.4 = manually verify. None when scope_inferred is None.
      - `scope_reason` string, nullable — Short LLM-generated explanation of the scope_inferred classification (why this scope, what signal the LLM used). Used by KB2B tooltip to explain confidence to admins. None when scope_inferred is None.
      - `context_attachment_ids_used` string[], nullable — Snapshot of context_attachment_ids in scope at extraction time. Empty list = extraction ran under M21+ with zero attachments. None = legacy fact (pre-M21) or non-extraction-pipeline fact.
      - `version` integer — Version number (increments on update)
      - `flags` string[] — Special flags (needs_review, deprecated, etc.)
      - `notes` string, nullable — Internal notes
      - `edge_summary` EdgeSummary — Denormalized edge count summary stored on each fact. Enables KB2B to display edge counts per fact without extra API calls. Updated atomically when edges are created or deleted.
        - `total_in` integer — Total incoming edges
        - `total_out` integer — Total outgoing edges
        - `by_type` object — Edge counts broken down by type (e.g. supports, contradicts)
    - `total_edges` integer
  - `total_axioms` integer, required
  - `total_edges` integer, required
  - `total_edges_in_pot` integer — Total edges in the POT (before axiom filtering). If > 0 but total_edges == 0, edges exist but don't reference axioms.

## Other responses

- `404` — POT not found
- `422` — Validation Error

---

[API](https://skmtc.dev/scipot/apis/scipot-core-api.md) · [All operations](https://skmtc.dev/scipot/apis/scipot-core-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/scipot/scipot-core-api/revisions/e8712e9ffeae/schema)
