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

# Get the dependency graph (full org or subgraph anchored at a repo).

> Return the dependency graph for a connected org.

Without ``root``: full graph for the org.

With ``root=<repo_id>``: subgraph anchored at that repo, including up to
``depth`` hops in both directions (upstream + downstream). Designed for AI
coding agents that want a focused neighbourhood instead of the whole org.

Nodes are repositories; edges are resolved dependencies from the most
recent completed scan. Format is G6-compatible.

**Confidence differs between the two modes, deliberately.** With ``root``,
``min_confidence`` (default 0.4) governs both the traversal and the edges
returned, and the response echoes it as ``applied_min_confidence``. Without
``root``, no floor is applied — the full-org graph returns every ``manifest``
edge so clients can filter for themselves, and ``applied_min_confidence`` is
``null``. That asymmetry is why the org and workspace dependency counters
match this endpoint exactly: browsing is a different question from asking what
breaks.



## OpenAPI

````yaml /openapi.json get /api/v1/connected-orgs/{connected_org_id}/graph
openapi: 3.1.0
info:
  description: Change Impact Engine for multi-repo systems
  title: Riftmap
  version: 1.25.2
servers: []
security: []
paths:
  /api/v1/connected-orgs/{connected_org_id}/graph:
    get:
      tags:
        - graph
      summary: Get the dependency graph (full org or subgraph anchored at a repo).
      description: >-
        Return the dependency graph for a connected org.


        Without ``root``: full graph for the org.


        With ``root=<repo_id>``: subgraph anchored at that repo, including up to

        ``depth`` hops in both directions (upstream + downstream). Designed for
        AI

        coding agents that want a focused neighbourhood instead of the whole
        org.


        Nodes are repositories; edges are resolved dependencies from the most

        recent completed scan. Format is G6-compatible.


        **Confidence differs between the two modes, deliberately.** With
        ``root``,

        ``min_confidence`` (default 0.4) governs both the traversal and the
        edges

        returned, and the response echoes it as ``applied_min_confidence``.
        Without

        ``root``, no floor is applied — the full-org graph returns every
        ``manifest``

        edge so clients can filter for themselves, and
        ``applied_min_confidence`` is

        ``null``. That asymmetry is why the org and workspace dependency
        counters

        match this endpoint exactly: browsing is a different question from
        asking what

        breaks.
      operationId: get_graph_api_v1_connected_orgs__connected_org_id__graph_get
      parameters:
        - in: path
          name: connected_org_id
          required: true
          schema:
            format: uuid
            title: Connected Org Id
            type: string
        - description: >-
            Optional repository ID to anchor a subgraph view. When set, the
            response is limited to the root plus its upstream and downstream
            neighbours within ``depth`` hops. Omit for the full org graph.
          in: query
          name: root
          required: false
          schema:
            anyOf:
              - format: uuid
                type: string
              - type: 'null'
            description: >-
              Optional repository ID to anchor a subgraph view. When set, the
              response is limited to the root plus its upstream and downstream
              neighbours within ``depth`` hops. Omit for the full org graph.
            title: Root
        - description: >-
            BFS depth from ``root`` in each direction. Ignored when ``root`` is
            omitted.
          in: query
          name: depth
          required: false
          schema:
            default: 2
            description: >-
              BFS depth from ``root`` in each direction. Ignored when ``root``
              is omitted.
            maximum: 10
            minimum: 1
            title: Depth
            type: integer
        - description: >-
            Minimum edge confidence to traverse, between 0.0 and 1.0. The
            default 0.4 admits every reference a machine could act on —
            deterministic parser edges (0.9–1.0), resolver matches (0.65–0.95),
            heuristic references in build and CI files, package manifests and
            fetch commands (0.85), and references in files the classifier does
            not recognise (0.6–0.7), which mean 'unclassified', not 'unlikely'.
            It excludes only references a human reads rather than a machine
            executes: prose, HTML templates, generated blobs and ignore files
            (0.3). Pass 0.8 to restrict the answer to deterministic and
            build-file evidence only, or 0.0 to include everything. The value
            actually applied is echoed in the response, and each affected
            repository carries the confidence of the weakest edge on the
            strongest path that reached it, so a stricter answer can be
            recovered by filtering the response without a second request.
            Ignored when ``root`` is omitted: the full-org graph applies no
            floor at all and returns every ``manifest`` edge, in which case
            ``applied_min_confidence`` in the response is ``null``.
          in: query
          name: min_confidence
          required: false
          schema:
            default: 0.4
            description: >-
              Minimum edge confidence to traverse, between 0.0 and 1.0. The
              default 0.4 admits every reference a machine could act on —
              deterministic parser edges (0.9–1.0), resolver matches
              (0.65–0.95), heuristic references in build and CI files, package
              manifests and fetch commands (0.85), and references in files the
              classifier does not recognise (0.6–0.7), which mean
              'unclassified', not 'unlikely'. It excludes only references a
              human reads rather than a machine executes: prose, HTML templates,
              generated blobs and ignore files (0.3). Pass 0.8 to restrict the
              answer to deterministic and build-file evidence only, or 0.0 to
              include everything. The value actually applied is echoed in the
              response, and each affected repository carries the confidence of
              the weakest edge on the strongest path that reached it, so a
              stricter answer can be recovered by filtering the response without
              a second request. Ignored when ``root`` is omitted: the full-org
              graph applies no floor at all and returns every ``manifest`` edge,
              in which case ``applied_min_confidence`` in the response is
              ``null``.
            maximum: 1
            minimum: 0
            title: Min Confidence
            type: number
        - in: header
          name: X-Workspace-Id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Workspace-Id
        - in: cookie
          name: riftmap_access
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Riftmap Access
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    GraphResponse:
      description: Full dependency graph for an organization (G6 compatible).
      properties:
        applied_min_confidence:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            The confidence floor used for the subgraph traversal, or `null` when
            `root` was omitted. `null` is the honest answer for the full-org
            graph, which applies no floor at all and returns every `manifest`
            edge for clients to filter themselves — so a number here would
            misreport it.
          title: Applied Min Confidence
        edges:
          items:
            $ref: '#/components/schemas/GraphEdge'
          title: Edges
          type: array
        nodes:
          items:
            $ref: '#/components/schemas/GraphNode'
          title: Nodes
          type: array
      required:
        - nodes
        - edges
      title: GraphResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    GraphEdge:
      description: A directed dependency edge between two repos.
      properties:
        confidence:
          title: Confidence
          type: number
        dependency_type:
          title: Dependency Type
          type: string
        id:
          title: Id
          type: string
        source:
          title: Source
          type: string
        target:
          title: Target
          type: string
        version_constraint:
          anyOf:
            - type: string
            - type: 'null'
          title: Version Constraint
      required:
        - id
        - source
        - target
        - dependency_type
        - version_constraint
        - confidence
      title: GraphEdge
      type: object
    GraphNode:
      description: A repository node in the dependency graph.
      properties:
        id:
          title: Id
          type: string
        label:
          title: Label
          type: string
        metadata:
          additionalProperties: true
          default: {}
          title: Metadata
          type: object
        type:
          default: repository
          title: Type
          type: string
      required:
        - id
        - label
      title: GraphNode
      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
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-Key
      type: apiKey
    HTTPBearer:
      description: API key as Bearer token (rfm_live_... prefix)
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.