Validate Schema
/v1/graphs/schema/validatePart of Schema.
Validates a custom schema definition before deployment — checks structure, types, constraints, and relationship references. Returns errors and warnings without applying changes. Supports JSON, YAML, and dict formats.
Authentication
Authenticate in any one of these ways — not all of them:
- API key in the
X-API-Keyheader. - Bearer token in the
Authorizationheader.
Request body
Required, application/json.
| Field | Type | Description |
|---|---|---|
schema_definitionrequired | object | string | Schema definition as JSON dict or JSON/YAML string |
formatoptional | string | Schema format: json, yaml, or dict Default: |
check_compatibilityoptional | string[] | List of existing schema extensions to check compatibility with |
Example request
curl -X POST "https://api.robosystems.ai/v1/graphs/schema/validate" \
-H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"schema_definition": {
"description": "Schema for financial data with companies and filings",
"name": "financial_analysis",
"nodes": [
{
"name": "Company",
"properties": [
{
"name": "cik",
"type": "STRING",
"is_primary_key": true
},
{
"name": "name",
"type": "STRING",
"is_required": true
},
{
"name": "ticker",
"type": "STRING"
},
{
"name": "market_cap",
"type": "INT64"
}
]
},
{
"name": "Filing",
"properties": [
{
"name": "accession_number",
"type": "STRING",
"is_primary_key": true
},
{
"name": "form_type",
"type": "STRING",
"is_required": true
},
{
"name": "filing_date",
"type": "DATE"
}
]
}
],
"relationships": [
{
"from_node": "Company",
"name": "FILED",
"properties": [
{
"name": "filing_count",
"type": "INT32"
}
],
"to_node": "Filing"
}
],
"version": "1.0.0"
}
}'Responses
200 Successful Response
| Field | Type | Description |
|---|---|---|
validrequired | boolean | Whether the schema is valid |
messagerequired | string | Validation message |
errorsoptional | string[] | List of validation errors (only present when valid=false) |
warningsoptional | string[] | List of validation warnings (schema is still valid but has potential issues) |
statsoptional | object | Schema statistics (only present when valid=true) |
compatibilityoptional | object | Compatibility check results (only when check_compatibility specified) |
| Status | Meaning |
|---|---|
| 400 | Invalid request |
| 401 | Authentication required |
| 403 | Access denied |
| 404 | Resource not found |
| 422 | Schema fails validation rules |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
| 504 | Validation timed out |