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

# Get context graph

> Get the knowledge graph of the workspace context repository: nodes for markdown files and edges for links between them.



## OpenAPI

````yaml https://api.getcargo.io/openapi.json get /context/graph
openapi: 3.1.0
info:
  title: Cargo API
  version: 1.0.0
  description: Cargo Platform API v1
servers:
  - url: https://api.getcargo.io/v1
    description: Cargo API
security:
  - bearerAuth: []
paths:
  /context/graph:
    get:
      tags:
        - Context - Graph
      summary: Get context graph
      description: >-
        Get the knowledge graph of the workspace context repository: nodes for
        markdown files and edges for links between them.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  graph:
                    type: object
                    properties:
                      nodes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              title: Node id (file path)
                            title:
                              type: string
                              title: Title
                            summary:
                              title: Summary
                              type: string
                            cluster:
                              type: string
                              title: Cluster (top-level folder)
                          required:
                            - id
                            - title
                            - cluster
                          additionalProperties: false
                          title: Graph node
                        title: Nodes
                      edges:
                        type: array
                        items:
                          type: object
                          properties:
                            source:
                              type: string
                              title: Source node id
                            target:
                              type: string
                              title: Target node id
                            origin:
                              type: string
                              enum:
                                - frontmatter
                                - wikilink
                                - mdlink
                              title: Edge origin
                          required:
                            - source
                            - target
                            - origin
                          additionalProperties: false
                          title: Graph edge
                        title: Edges
                      broken:
                        type: array
                        items:
                          type: object
                          properties:
                            source:
                              type: string
                              title: Source node id
                            target:
                              type: string
                              title: Unresolved target
                            origin:
                              type: string
                              enum:
                                - frontmatter
                                - wikilink
                                - mdlink
                              title: Edge origin
                          required:
                            - source
                            - target
                            - origin
                          additionalProperties: false
                          title: Broken edge
                        title: Broken edges
                      computedAt:
                        type: string
                        title: Computed at (ISO)
                    required:
                      - nodes
                      - edges
                      - broken
                      - computedAt
                    additionalProperties: false
                    title: Graph
                required:
                  - graph
                additionalProperties: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````