Browse the API reference

Validate Schema

post/v1/graphs/schema/validate

Part 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-Key header.
  • Bearer token in the Authorization header.

Request body

Required, application/json.

FieldTypeDescription
schema_definitionrequiredobject | string

Schema definition as JSON dict or JSON/YAML string

formatoptionalstring

Schema format: json, yaml, or dict

Default: json

check_compatibilityoptionalstring[]

List of existing schema extensions to check compatibility with

Example request

curl
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

FieldTypeDescription
validrequiredboolean

Whether the schema is valid

messagerequiredstring

Validation message

errorsoptionalstring[]

List of validation errors (only present when valid=false)

warningsoptionalstring[]

List of validation warnings (schema is still valid but has potential issues)

statsoptionalobject

Schema statistics (only present when valid=true)

compatibilityoptionalobject

Compatibility check results (only when check_compatibility specified)

StatusMeaning
400Invalid request
401Authentication required
403Access denied
404Resource not found
422Schema fails validation rules
429Rate limit exceeded
500Internal server error
504Validation timed out