Export Declared Graph Schema
get
/v1/graphs/{graph_id}/schema/exportPart of Schema.
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.
Authentication
Authenticate in any one of these ways — not all of them:
- API key in the
X-API-Keyheader. - Bearer token in the
Authorizationheader.
Path parameters
| Name | Type | Description |
|---|---|---|
graph_idrequired | string | Graph Id |
Query parameters
| Name | Type | Description |
|---|---|---|
formatoptional | string | Export format: json, yaml, or cypher Default: |
include_data_statsoptional | boolean | Include statistics about actual data in the graph (node counts, relationship counts) Default: |
Example request
curl
curl -X GET "https://api.robosystems.ai/v1/graphs/{graph_id}/schema/export" \
-H "X-API-Key: $ROBOSYSTEMS_API_KEY"Responses
200 Successful Response
| Field | Type | Description |
|---|---|---|
graph_idrequired | string | Graph ID |
schema_definitionrequired | object | string | Exported schema definition (format depends on 'format' parameter) |
formatrequired | string | Export format used |
exported_atrequired | string | Export timestamp |
data_statsoptional | object | Data statistics if requested (only when include_data_stats=true) |
| Status | Meaning |
|---|---|
| 400 | Invalid request |
| 401 | Authentication required |
| 403 | Access denied |
| 404 | Resource not found |
| 422 | Validation Error |
| 429 | Rate limit exceeded |
| 500 | Internal server error |