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

# Get graph viewport



## OpenAPI

````yaml https://api.crosmos.dev/openapi.json get /api/v1/graph
openapi: 3.1.0
info:
  title: Crosmos API
  version: 0.1.0
servers:
  - url: /
security: []
paths:
  /api/v1/graph:
    get:
      tags:
        - graph
      summary: Get graph viewport
      parameters:
        - schema:
            type: string
            format: uuid
          required: false
          name: space_uuid
          in: query
        - schema:
            type: string
            format: uuid
          required: false
          name: space_id
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 500
            default: 100
          required: false
          name: limit
          in: query
        - schema:
            type: integer
            nullable: true
            minimum: 0
            default: 0
          required: false
          name: offset
          in: query
      responses:
        '200':
          description: Graph viewport
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphViewportResponse'
        '404':
          description: Space not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    GraphViewportResponse:
      type: object
      properties:
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/GraphNode'
        edges:
          type: array
          items:
            $ref: '#/components/schemas/GraphEdge'
        total_nodes:
          type: integer
          minimum: 0
        total_edges:
          type: integer
          minimum: 0
      required:
        - nodes
        - edges
        - total_nodes
        - total_edges
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
        code:
          type: string
        request_id:
          type: string
        fields:
          nullable: true
      required:
        - detail
    GraphNode:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        entity_type:
          type: string
          nullable: true
        edge_count:
          type: integer
        created_at:
          type: string
          nullable: true
          format: date-time
        updated_at:
          type: string
          nullable: true
          format: date-time
      required:
        - id
        - name
        - entity_type
        - edge_count
        - created_at
        - updated_at
    GraphEdge:
      type: object
      properties:
        id:
          type: string
          format: uuid
        source_entity_id:
          type: string
          format: uuid
        target_entity_id:
          type: string
          format: uuid
        relation_type:
          type: string
        confidence:
          type: number
        valid_from:
          type: string
          nullable: true
          format: date-time
        recorded_at:
          type: string
          format: date-time
      required:
        - id
        - source_entity_id
        - target_entity_id
        - relation_type
        - confidence
        - valid_from
        - recorded_at
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT access token or API key (csk_...)

````

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