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

# Get Pattern Graph

> GET /patterns/graph
Workspace pattern relationship graph: nodes + edges for force-directed visualization.
Registered BEFORE /{pattern_id} so the literal segment wins.



## OpenAPI

````yaml /openapi.json get /v1/patterns/graph
openapi: 3.1.0
info:
  description: Causeloop Platform Backend
  title: Causeloop API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/patterns/graph:
    get:
      tags:
        - patterns
      summary: Get Pattern Graph
      description: >-
        GET /patterns/graph

        Workspace pattern relationship graph: nodes + edges for force-directed
        visualization.

        Registered BEFORE /{pattern_id} so the literal segment wins.
      operationId: get_pattern_graph_v1_patterns_graph_get
      parameters:
        - in: query
          name: max_nodes
          required: false
          schema:
            default: 12
            maximum: 50
            minimum: 1
            title: Max Nodes
            type: integer
        - in: query
          name: min_edge_weight
          required: false
          schema:
            default: 0.3
            maximum: 1
            minimum: 0
            title: Min Edge Weight
            type: number
        - in: query
          name: layout
          required: false
          schema:
            default: force
            title: Layout
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatternGraphResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    PatternGraphResponse:
      properties:
        computed_at:
          title: Computed At
          type: string
        edges:
          items:
            $ref: '#/components/schemas/PatternGraphEdge'
          title: Edges
          type: array
        legend:
          items:
            $ref: '#/components/schemas/GraphLegendBand'
          title: Legend
          type: array
        nodes:
          items:
            $ref: '#/components/schemas/PatternGraphNode'
          title: Nodes
          type: array
      required:
        - nodes
        - edges
        - legend
        - computed_at
      title: PatternGraphResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    PatternGraphEdge:
      properties:
        shared_factors:
          items:
            type: string
          title: Shared Factors
          type: array
        source:
          title: Source
          type: string
        target:
          title: Target
          type: string
        weight:
          title: Weight
          type: number
      required:
        - source
        - target
        - weight
      title: PatternGraphEdge
      type: object
    GraphLegendBand:
      properties:
        band:
          title: Band
          type: string
        color_token:
          title: Color Token
          type: string
        label:
          title: Label
          type: string
      required:
        - band
        - label
        - color_token
      title: GraphLegendBand
      type: object
    PatternGraphNode:
      properties:
        cluster_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Cluster Id
        cx:
          title: Cx
          type: number
        cy:
          title: Cy
          type: number
        dashed:
          title: Dashed
          type: boolean
        href:
          title: Href
          type: string
        id:
          title: Id
          type: string
        issue_count:
          default: 0
          title: Issue Count
          type: integer
        label:
          title: Label
          type: string
        ring_radius:
          title: Ring Radius
          type: number
        risk_band:
          title: Risk Band
          type: string
        score:
          title: Score
          type: integer
        status:
          $ref: '#/components/schemas/PatternStatus'
      required:
        - id
        - label
        - score
        - risk_band
        - status
        - dashed
        - ring_radius
        - cx
        - cy
        - href
      title: PatternGraphNode
      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
    PatternStatus:
      enum:
        - emerging
        - active
        - mitigating
        - resolved
      title: PatternStatus
      type: string
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````