> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oktolabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Kg Metrics

> Provenance metrics for the KG v0.2.0 pipeline — grouped by `layer`.

Returns:
- edge_count_by_layer: {deterministic, cognitive, fallback, legacy} → int
- deterministic_edge_ratio, cognitive_edge_ratio, fallback_edge_ratio: float 0-1
- node_count_by_type: histogram by KG NODE_TYPES
- edges_total / nodes_total

Health targets (spec c48a5c33 Analysis section):
- deterministic_edge_ratio ≥ 0.70
- fallback_edge_ratio ≤ 0.15
- cognitive_edge_ratio 0.15 – 0.30 in mature boards



## OpenAPI

````yaml /openapi.json get /api/v1/kg/boards/{board_id}/metrics
openapi: 3.1.0
info:
  description: >-
    Okto Pulse REST API schema generated from okto-pulse-core 0.2.0 source for
    docs.oktolabs.ai.
  title: Okto Pulse
  version: 0.2.0
servers: []
security: []
paths:
  /api/v1/kg/boards/{board_id}/metrics:
    get:
      tags:
        - knowledge-graph
        - knowledge-graph
      summary: Get Kg Metrics
      description: >-
        Provenance metrics for the KG v0.2.0 pipeline — grouped by `layer`.


        Returns:

        - edge_count_by_layer: {deterministic, cognitive, fallback, legacy} →
        int

        - deterministic_edge_ratio, cognitive_edge_ratio, fallback_edge_ratio:
        float 0-1

        - node_count_by_type: histogram by KG NODE_TYPES

        - edges_total / nodes_total


        Health targets (spec c48a5c33 Analysis section):

        - deterministic_edge_ratio ≥ 0.70

        - fallback_edge_ratio ≤ 0.15

        - cognitive_edge_ratio 0.15 – 0.30 in mature boards
      operationId: get_kg_metrics_api_v1_kg_boards__board_id__metrics_get
      parameters:
        - in: path
          name: board_id
          required: true
          schema:
            title: Board Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````