Skip to main content

Edges

List inter-class edges (relationships) between schema graph classes with relationship type and weight information.

Edges represent relationships between schema graph classes, computed using cosine similarity between field embeddings. Each edge captures a directional relationship (e.g. an Invoice class references a Purchase Order class) with a weight indicating the strength of the relationship. Use edges to understand how document types relate to each other across your workspace.

Edge weights range from 0 to 1. Higher weights indicate stronger field overlap between classes. Edges below a minimum weight threshold are automatically pruned and will not appear in results.
GET/v1/schema-graph/edges

Response

Response fields

dataarrayArray of edge objects.
data[].idstringEdge UUID.
data[].source_schema_idstringUUID of the source schema class.
data[].target_schema_idstringUUID of the target schema class.
data[].edge_typestringRelationship type (e.g. references, extends).
data[].weightnumberEdge weight between 0 and 1 indicating relationship strength.
data[].computed_atstringISO 8601 timestamp when the edge was computed.

Response

{
  "data": [
    {
      "id": "edge-uuid-1",
      "source_schema_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "target_schema_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "edge_type": "references",
      "weight": 0.87,
      "computed_at": "2024-09-14T00:00:00.000Z"
    }
  ]
}

Errors

Error responses

401unauthorizedMissing or invalid API key.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.

Pair this with GET /v1/schema-graph/classes to build relationship maps between document types. High-weight edges (e.g. weight > 0.7) indicate strong field overlap -- useful for identifying document types that should share user schema fields or be linked in cases. Feed the results directly into GET /v1/schema-graph/visualize for a D3-ready graph payload.