Approve the current draft ontology for use by graph ingestion
Approve the current draft, making it the ontology GraphService uses for this project.
Checked against the project's already-registered ontology before approval: a project that has
never ingested anything always succeeds; one that has fails with a 409 only if the draft
retypes a property FalkorDB's OntologyStore already froze for this project — that's the one
change that can leave previously ingested data inconsistent with the new schema. A new
entity/relation label, a new property, or a new relation pattern on an already-registered
label are all safe additive changes: they're applied right away as ontology changes, with a
new ontology version. Registered types the draft leaves out are returned as
proposed_changes (drops to review and apply separately). The stored draft is run through sanitize_ontology
before the check and before being persisted as approved_ontology, so a draft saved before
that sanitization existed doesn't get stuck reporting its own leftover
instance-value-shaped attributes as conflicts forever.
A prior draft save (PUT /v1/graph/ontology/draft) may already have overridden the active
ontology, through the same check, before this ever runs — approve is now more of a "lock in"
step than the sole activation point.
If the draft changes the registered ontology (new types, attributes, relation patterns or descriptions) while
an accepted ontology change of the project (e.g. a backfill) is still being applied after a short wait, nothing
is applied or saved and the request fails with 503; retry after Retry-After seconds.
AuthorizationBearer <token>OpenAI-Organization?|Organization Id from OpenAi compatible endpoint. Required to organization access or project access (with OpenAI-Project header) when logged as User or Admin User.
OpenAI-Project?|Project Id from OpenAi compatible endpoint. Required to project access for organization api key or User / Admin User access with OpenAI-Organization
Successful Response
application/json- response
API-facing view of a project's ontology-discovery/approval state.
id*stringproject_id*stringstate*OntologyStateLifecycle state of a project's discovered ontology.
"discovering""draft""approved""failed""cancelled"ontology?|nullapproved_ontology?|nullsource_file_ids?array<string>boundaries?string|nullpreset?|Starting ontology the current ontology was seeded from (the preset of the last successful discovery before the first save/approve); null until such a discovery succeeds, and for ontologies approved before presets existed.
last_error?string|nullwarnings?array<string>Discovery steps that soft-failed while producing the draft.
evolution_policy?EvolutionPolicyHow a project's ontology may change without a user reviewing each change.
auto_additive lets future drift-originated additive changes apply without review, for new
documents only (backfill=none); nothing reads it yet besides the policy endpoints.
"manual""manual""auto_additive"proposed_changes?array<>Changes this request proposed but did not apply, e.g. drops of registered types missing from the draft.
created_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://deepfellow-server-host/v1/graph/ontology/approve'{ "id": "string", "project_id": "string", "state": "discovering", "ontology": {}, "approved_ontology": {}, "source_file_ids": [ "string" ], "boundaries": "string", "preset": "general", "last_error": "string", "warnings": [ "string" ], "evolution_policy": "manual", "proposed_changes": [ { "id": "string", "project_id": "string", "op": "add_entity", "payload": { "op": "add_entity", "label": "string", "description": "string", "properties": [ { "name": "string", "type": "STRING", "description": "string" } ] }, "risk": "migrating", "origin": "discovery", "backfill": "none", "status": "proposed", "inverse_of": "string", "data_not_restored": false, "dry_run": { "chunks_in_scope": 0, "affected_nodes": 0, "affected_edges": 0 }, "result": { "llm_calls": 0, "failed_chunks": [ "string" ], "nodes_updated": 0, "edges_updated": 0 }, "error": "string", "applied_version": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.