---
title: "Export Declared Graph Schema"
method: GET
path: "/v1/graphs/{graph_id}/schema/export"
tags: ["Schema"]
---

# Export Declared Graph Schema

`GET /v1/graphs/{graph_id}/schema/export`

## Request

- Base URL: `https://api.robosystems.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.robosystems.ai/v1/graphs/{graph_id}/schema/export`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Returns the original schema definition from graph creation, not the runtime state. Set `include_data_stats=true` to add live node/relationship counts. Use `/schema` to inspect what's actually in the database.

## Path parameters

- `graph_id` string, required

## Query parameters

- `format` string: Export format: json, yaml, or cypher
- `include_data_stats` boolean: Include statistics about actual data in the graph (node counts, relationship counts)

## Response `200`

Successful Response

- SchemaExportResponse: Response model for schema export.
  - `graph_id` string, required: Graph ID
  - `schema_definition` union, required: Exported schema definition (format depends on 'format' parameter)
    - object
    - string
  - `format` string, required: Export format used
  - `exported_at` string, required: Export timestamp
  - `data_stats` object, nullable: Data statistics if requested (only when include_data_stats=true)

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `403`: Access denied
- `404`: Resource not found
- `422`: Validation Error
- `429`: Rate limit exceeded
- `500`: Internal server error

---

[API](https://skmtc.dev/robosystems/apis/robosystems-api.md) · [All operations](https://skmtc.dev/robosystems/apis/robosystems-api/llms.txt) · [OpenAPI document](https://skmtc.dev/robosystems/apis/robosystems-api/revisions/e661e2d5ca6a?raw)
