Health check
Returns dashboard and data-layer readiness.
curl -s http://127.0.0.1:5180/api/health
REST APIs for the AnythingGraph open-source stack. Use the Data Injection API to ingest records, the Data Cache API for data capsules and SPARQL, and the Data layer for entities, rows, and graph relationships.
The platform lets you:
Default local URLs when running ./start-all.sh:
http://127.0.0.1:8183
http://127.0.0.1:8181
http://127.0.0.1:8182
All requests use Content-Type: application/json unless the response is Turtle (text/turtle).
Local OSS deployments do not require API keys. Services bind to localhost by default.
For playbooks with enforced relationship access, pass ReBAC context on data-layer row and relationship reads:
| Header | Query (alt.) | Description |
|---|---|---|
X-Ontox-Subject-Id |
subject_id |
Subject identifier (e.g. employee email) |
X-Ontox-Playbook-Id |
playbook_id |
Installed playbook id |
/sparql/query requires a real
playbook_id. The global slot __global__ is rejected for governed agent queries.
Base: http://127.0.0.1:8183. Structured ingest with connector context for playbook-scoped payloads.
curl -s http://127.0.0.1:8183/health
Body: { "context": IngestContext, "payload": ... }. Returns row and relationship create results plus landing zone count.
curl -s -X POST http://127.0.0.1:8183/ingest \
-H 'Content-Type: application/json' \
-d '{
"context": {
"playbook_id": "organizational-graph",
"source_label": "hr-export",
"entity_name": "employee",
"field_mappings": []
},
"payload": {
"records": [
{ "full_name": "Sam Lee", "email": "sam@acme.example" }
]
}
}'
curl -s http://127.0.0.1:8183/landing-zone
curl -s -X POST http://127.0.0.1:8183/landing-zone/12/approve \
-H 'Content-Type: application/json' \
-d '{
"entity_name": "employee",
"corrected_values": { "full_name": "Sam Lee" },
"field_mappings": [
{ "from_field": "name", "to_field": "full_name", "entity_name": "employee" }
]
}'
curl -s -X DELETE http://127.0.0.1:8183/landing-zone/12
Base: http://127.0.0.1:8181. In-memory Turtle cache and SPARQL. Omit playbook_id for __global__ (load only).
curl -s http://127.0.0.1:8181/health
| Field | Type | Description |
|---|---|---|
turtle | string | Turtle RDF text |
replace | boolean | true overwrite; false append |
playbook_id | string | Cache slot (optional → __global__) |
curl -s -X POST http://127.0.0.1:8181/cache/load \
-H 'Content-Type: application/json' \
-d '{
"turtle": "@prefix ex: <http://example.com/> . ex:a ex:knows ex:b .",
"replace": true,
"playbook_id": "organizational-graph"
}'
curl -s 'http://127.0.0.1:8181/cache/get?playbook_id=organizational-graph'
Returns version, turtle_bytes, updated_at_ms.
curl -s 'http://127.0.0.1:8181/cache/meta?playbook_id=organizational-graph'
curl -s http://127.0.0.1:8181/cache/list
Pass playbook_id for one slot, or "clear_all": true for all.
curl -s -X POST http://127.0.0.1:8181/cache/clear \
-H 'Content-Type: application/json' \
-d '{"playbook_id": "organizational-graph"}'
SELECT queries only. Optional subject_id applies ReBAC filtering.
curl -s -X POST http://127.0.0.1:8181/sparql/query \
-H 'Content-Type: application/json' \
-d '{
"query": "SELECT ?row ?name WHERE { ?row a <http://example.com/context#Employee> ; <http://example.com/context#fullName> ?name }",
"playbook_id": "organizational-graph",
"subject_id": "sam@acme.example"
}'
Row ids a subject may read. Omit entity_name for all entities in playbook rules.
curl -s -X POST http://127.0.0.1:8181/rebac/allowed-rows \
-H 'Content-Type: application/json' \
-d '{
"playbook_id": "crm-relationship-access",
"subject_id": "alex.ae",
"entity_name": "crm_account"
}'
Base: http://127.0.0.1:8182. Entity, row, and relationship storage with Turtle export.
curl -s http://127.0.0.1:8182/health
curl -s http://127.0.0.1:8182/entities
curl -s http://127.0.0.1:8182/entities/1
curl -s -X POST http://127.0.0.1:8182/entities \
-H 'Content-Type: application/json' \
-d '{"name":"person","fields":[{"field_name":"email","field_type":"TEXT"}]}'
curl -s -X PUT http://127.0.0.1:8182/entities/1 \
-H 'Content-Type: application/json' \
-d '{"display_name":"Person"}'
curl -s -X DELETE http://127.0.0.1:8182/entities/1
Supports X-Ontox-Subject-Id, X-Ontox-Playbook-Id, or query params.
curl -s 'http://127.0.0.1:8182/entities/1/data?subject_id=alex.ae&playbook_id=crm-relationship-access'
curl -s -X POST http://127.0.0.1:8182/entities/1/data \
-H 'Content-Type: application/json' \
-d '{"values":{"email":"a@example.com"}}'
curl -s -X PUT http://127.0.0.1:8182/entities/1/data/5 \
-H 'Content-Type: application/json' \
-d '{"values":{"email":"b@example.com"}}'
curl -s -X DELETE http://127.0.0.1:8182/entities/1/data/5
curl -s http://127.0.0.1:8182/entity-relationships
Fetch one schema relationship by id.
curl -s http://127.0.0.1:8182/entity-relationships/3
curl -s -X POST http://127.0.0.1:8182/entity-relationships \
-H 'Content-Type: application/json' \
-d '{"relationship_name":"works_at","subject_entity_id":1,"object_entity_id":2}'
curl -s -X PUT http://127.0.0.1:8182/entity-relationships/3 \
-H 'Content-Type: application/json' \
-d '{"relationship_name":"employed_by"}'
curl -s -X DELETE http://127.0.0.1:8182/entity-relationships/3
curl -s http://127.0.0.1:8182/relationships
curl -s -X POST http://127.0.0.1:8182/relationships \
-H 'Content-Type: application/json' \
-d '{"relationship_name":"works_at","subject_entity_id":1,"object_entity_id":2,"subject_row_id":1,"object_row_id":1}'
curl -s -X PUT http://127.0.0.1:8182/relationships/10 \
-H 'Content-Type: application/json' \
-d '{"object_row_id":2}'
curl -s -X DELETE http://127.0.0.1:8182/relationships/10
Returns text/turtle. Use /rdf/turtle without a trailing slash.
curl -s -X POST http://127.0.0.1:8182/rdf/turtle \
-H 'Content-Type: application/json' \
-d '{"entity_ids":"*"}'
curl -s -X POST http://127.0.0.1:8182/rdf/turtle \
-H 'Content-Type: application/json' \
-d '{"entity_names":["corporation"]}'
Read-only built-in OSS roles. Response: { ok, edition, roles }.
curl -s http://127.0.0.1:8182/policy/roles