---
title: "Get graph schema"
method: GET
path: "/api/schema"
---

# Get graph schema

`GET /api/schema`

Returns the full schema of the graph database including node types with
property keys/types, edge types with source/target labels, indexes,
constraints, and basic statistics.

## Response `200`

Graph schema

- SchemaResponse
  - `node_types` object[]
    - `label` string
    - `count` integer
    - `properties` object
  - `edge_types` object[]
    - `type` string
    - `count` integer
    - `source_labels` string[]
    - `target_labels` string[]
    - `properties` object
  - `indexes` object[]
    - `label` string
    - `property` string
    - `type` string
  - `constraints` object[]
    - `label` string
    - `property` string
    - `type` string
  - `statistics` object
    - `total_nodes` integer
    - `total_edges` integer
    - `avg_out_degree` number

---

[API](https://skmtc.net/samyama-ai/apis/samyama-graph-database-api.md) · [All operations](https://skmtc.net/samyama-ai/apis/samyama-graph-database-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/samyama-ai/samyama-graph-database-api/versions/047a40292bc8/schema)
