> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs-beta.getzep.com/v4/sdk-reference/graph/get-ontology/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-beta.getzep.com/_mcp/server. # Get graph ontology GET https://api.getzep.com/api/v4/graphs/{graph_uuid}/ontology Reference: https://docs-beta.getzep.com/sdk-reference/graph/get-ontology ## Authentication - `Authorization` header (required) (prefixed with ` Api-Key `) — Type "Api-Key" followed by a space and the project API key. ## Request ### Path parameters - `graph_uuid` (string, required) — Graph UUID ## Response ### 200 OK - `edge_types` (list of v4.EdgeType, optional) — The edge types defined in the ontology in effect at this scope. - `entity_type_hierarchy` (V4OntologyEntityTypeHierarchy, optional) — The entity type hierarchy (spec ontology-1). Omitted when the ontology is flat. - `entity_types` (list of v4.EntityType, optional) — The entity types defined in the ontology in effect at this scope. - `inherited` (boolean, optional) — Whether this is the project's default value rather than an override set on this graph. ## Errors ### 400 Bad Request Error Bad Request - `error` (v4.ErrorBody, optional) ### 401 Unauthorized Error Unauthorized - `error` (v4.ErrorBody, optional) ### 404 Not Found Error Not Found - `error` (v4.ErrorBody, optional) ## Types ### v4.EdgeType - `description` (string, optional) — A description of the relationship this edge type represents, used to guide extraction. - `name` (string, optional) — The name of the edge type, in upper snake case. - `properties` (list of v4.EntityProperty, optional) — The custom properties defined on edges of this type. - `source_targets` (list of v4.EdgeSourceTarget, optional) — The allowed source and target entity type pairs for edges of this type. ### V4OntologyEntityTypeHierarchy The entity type hierarchy (spec ontology-1). Omitted when the ontology is flat. ### v4.EntityType - `description` (string, optional) — A description of the entity type, used to guide extraction. - `identity_properties` (list of string, optional) — The property names that determine whether two nodes of this type are the same entity. - `name` (string, optional) — The name of the entity type. - `properties` (list of v4.EntityProperty, optional) — The custom properties defined on nodes of this type. ### v4.ErrorBody - `code` (string, optional) - `details` (map from string to any, optional) - `message` (string, optional) - `param` (string, optional) - `request_id` (string, optional) ### v4.EntityProperty - `description` (string, optional) — A description of the property, used to guide extraction. - `name` (string, optional) — The name of the property. - `type` (enum, optional) — The value type of the property: text, int, float, or boolean. - Allowed values: `text`, `int`, `float`, `boolean` ### v4.EdgeSourceTarget - `source` (string, optional) — The entity type an edge of this type originates from. - `target` (string, optional) — The entity type an edge of this type points to. ## Examples **Response** ```json { "edge_types": [ { "description": "string", "name": "string", "properties": [ { "description": "string", "name": "string", "type": "text" } ], "source_targets": [ { "source": "string", "target": "string" } ] } ], "entity_type_hierarchy": {}, "entity_types": [ { "description": "string", "identity_properties": [ "string" ], "name": "string", "properties": [ { "description": "string", "name": "string", "type": "text" } ] } ], "inherited": true } ```