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

# The raw dependency graph for a project

> Returns every node and edge in the project's dependency graph, optionally filtered to a subset of node kinds — the same graph `GET /v1/projects/{id}/blast-radius` traverses from a single root, but unfiltered by root. Sized for a future graph visualization; nothing in the dashboard renders it today.

Authenticated the same way as `GET /v1/projects/{id}/blast-radius` (dashboard session, `dashboard:read`).




## OpenAPI

````yaml /api-reference/openapi.yaml get /v1/projects/{id}/graph
openapi: 3.1.0
info:
  title: Zespan Public API
  version: 1.0.0
  description: >
    The Zespan Public API covers the endpoints that customers call directly or
    through the Zespan SDKs: trace ingestion (native and OpenTelemetry), prompt
    management, datasets and dataset runs, and the runtime guardrails check.

    All endpoints authenticate with a project API key sent in the `x-api-key`
    header. Create and manage API keys from the project settings in the Zespan
    dashboard.
servers:
  - url: https://api.zespan.com
    description: Zespan production API
security:
  - ApiKeyAuth: []
tags:
  - name: Ingestion
    description: Send traces and events to Zespan.
  - name: OpenTelemetry
    description: OTLP-compatible ingestion endpoints.
  - name: Prompts
    description: Manage versioned prompts and their labels, tags, and folders.
  - name: Datasets
    description: Read datasets and manage dataset runs used for experiments and scoring.
  - name: Guardrails
    description: Runtime guardrail evaluation.
  - name: SDK / CLI support
    description: >
      Small support endpoints consumed by the SDKs and @zespan/cli rather than
      called directly by application code.
  - name: Blast Radius
    description: >
      The prompt/agent/model/policy/evaluator/alert dependency graph backing the
      pre-release impact check and the evaluator-delete gate in the dashboard.
      Session-authenticated (dashboard cookie), not `x-api-key`.
  - name: Outcomes
    description: >
      Report business outcomes (a deflected ticket, an avoided refund, an SLA
      met) attributed to a trace, and read them back summarized by agent or
      model, joined to real trace cost. Backs the Value dashboard page. The
      ingest endpoint is `x-api-key`-authenticated like the rest of ingestion;
      the two read endpoints are session-authenticated (dashboard cookie) like
      Blast Radius.
  - name: Compliance
    description: >
      Generate audit-ready evidence documents (a per-agent Compliance Card, or
      SOC 2 control evidence) from recorded platform data, and re-verify a
      generated document's citations against live data. Session-authenticated
      (dashboard cookie), not `x-api-key`, gated by `compliance:read` /
      `compliance:generate` permissions and the Pro plan or above (the framework
      listing is the one exception — no project scope and no plan gate, since a
      customer deciding whether to upgrade needs to see what they'd get).
  - name: Models
    description: >
      Per-model usage, cost, latency, and error-rate rollups for a project,
      including the lifecycle overlay described under the Model Lifecycle tag.
      Session-authenticated (dashboard cookie), not `x-api-key`, gated by
      `dashboard:read`.
  - name: Model Lifecycle
    description: >
      Findings from the daily model deprecation scan, which matches models a
      project actually calls against a curated, bundled catalogue of
      provider-announced deprecation and retirement dates. Every figure on a
      finding (call volume, cost, affected agents/prompts, cost comparison
      against a named successor) is measured from real trace data — there is no
      quality-delta or regression-comparison endpoint, because nothing in this
      API invokes a model on the caller's behalf. Session-authenticated
      (dashboard cookie), not `x-api-key`: reading findings and the catalogue
      requires `dashboard:read`, dismissing a finding requires `alerts:manage`.
paths:
  /v1/projects/{id}/graph:
    get:
      tags:
        - Blast Radius
      summary: The raw dependency graph for a project
      description: >
        Returns every node and edge in the project's dependency graph,
        optionally filtered to a subset of node kinds — the same graph `GET
        /v1/projects/{id}/blast-radius` traverses from a single root, but
        unfiltered by root. Sized for a future graph visualization; nothing in
        the dashboard renders it today.


        Authenticated the same way as `GET /v1/projects/{id}/blast-radius`
        (dashboard session, `dashboard:read`).
      operationId: getBlastRadiusGraph
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Project id.
        - name: kinds
          in: query
          schema:
            type: string
          description: >
            Comma-separated node kinds to include (e.g. `prompt,agent`). Omit to
            return every kind.
          example: prompt,agent
        - name: windowDays
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 90
            default: 30
          description: Lookback window for observed (ClickHouse) call volume and cost.
      responses:
        '200':
          description: The full (optionally kind-filtered) graph.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlastRadiusGraphResponse'
        '403':
          description: >-
            Not authenticated with a dashboard session, or lacks
            `dashboard:read`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    BlastRadiusGraphResponse:
      type: object
      properties:
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/BlastRadiusGraphNode'
        edges:
          type: array
          items:
            $ref: '#/components/schemas/BlastRadiusGraphEdge'
        computedAt:
          type: string
          format: date-time
      required:
        - nodes
        - edges
        - computedAt
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
          example: Unauthorized
        code:
          type: string
          description: Machine-readable error code, when present.
          example: rate_limit_exceeded
      required:
        - error
    BlastRadiusGraphNode:
      type: object
      properties:
        id:
          type: string
          description: '`<kind>:<key>` — stable across rebuilds.'
          example: prompt:support-reply
        kind:
          $ref: '#/components/schemas/BlastRadiusNodeKind'
        name:
          type: string
          example: support-reply
        href:
          type: string
          description: Relative deep link into the dashboard.
          example: prompts/support-reply
        environments:
          type: array
          items:
            type: string
          description: >
            Environment slugs this node is known to be associated with. An empty
            array means genuinely unknown, never "not production."
          example:
            - prod
            - staging
      required:
        - id
        - kind
        - name
        - href
        - environments
    BlastRadiusGraphEdge:
      type: object
      properties:
        from:
          type: string
          description: The upstream node id. `to` depends on `from`.
        to:
          type: string
          description: The downstream node id — what would be affected if `from` changed.
        origin:
          type: string
          enum:
            - declared
            - observed
          description: >
            `declared` — configured in your project (Postgres). `observed` —
            actually called, from real ClickHouse trace data in the queried
            window.
        callVolume:
          type: number
          description: Call count over the window, for `observed` edges.
        costUsd:
          type: number
          description: Cost in USD over the window, for `observed` edges.
        lastSeenAt:
          type: string
          format: date-time
      required:
        - from
        - to
        - origin
    BlastRadiusNodeKind:
      type: string
      enum:
        - prompt
        - agent
        - policy
        - evaluator
        - dataset
        - model
        - tool
        - alert
      description: >
        `tool` is a reserved value in the type — no node of this kind is emitted
        yet (MCP tool calls aren't part of the graph today).
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Project API key. Manage keys in the Zespan dashboard under project
        settings.

````