curl -X POST https://api.intellibase.dev/api/v1/ontologies \
-H "Authorization: Bearer ib-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "Software Engineering",
"schema": {
"ontology": {
"hierarchy": [
{
"level": 0,
"node_types": {
"Developer": {
"properties": ["name", "role", "team"],
"description": "Software developer"
},
"Feature": {
"properties": ["name", "status", "deadline"],
"description": "Software feature"
}
}
}
],
"edge_types": [
{
"name": "WORKS_ON",
"source_types": ["Developer"],
"target_types": ["Feature"],
"properties": ["role"],
"temporal": true,
"description": "Developer works on feature"
}
]
}
}
}'
import requests
ontology_schema = {
"name": "Software Engineering",
"schema": {
"ontology": {
"hierarchy": [
{
"level": 0,
"node_types": {
"Developer": {
"properties": ["name", "role", "team"],
"description": "Software developer"
},
"Feature": {
"properties": ["name", "status", "deadline"],
"description": "Software feature"
}
}
}
],
"edge_types": [
{
"name": "WORKS_ON",
"source_types": ["Developer"],
"target_types": ["Feature"],
"properties": ["role"],
"temporal": True,
"description": "Developer works on feature"
}
]
}
}
}
response = requests.post(
"https://api.intellibase.dev/api/v1/ontologies",
headers={
"Authorization": "Bearer ib-your-api-key",
"Content-Type": "application/json"
},
json=ontology_schema
)
ontology = response.json()
print(f"Created ontology: {ontology['id']}")
const ontologySchema = {
name: "Software Engineering",
schema: {
ontology: {
hierarchy: [
{
level: 0,
node_types: {
Developer: {
properties: ["name", "role", "team"],
description: "Software developer"
},
Feature: {
properties: ["name", "status", "deadline"],
description: "Software feature"
}
}
}
],
edge_types: [
{
name: "WORKS_ON",
source_types: ["Developer"],
target_types: ["Feature"],
properties: ["role"],
temporal: true,
description: "Developer works on feature"
}
]
}
}
};
const response = await fetch(
"https://api.intellibase.dev/api/v1/ontologies",
{
method: "POST",
headers: {
"Authorization": "Bearer ib-your-api-key",
"Content-Type": "application/json"
},
body: JSON.stringify(ontologySchema)
}
);
const ontology = await response.json();
console.log(`Created ontology: ${ontology.id}`);
{
"id": "ont-abc123",
"name": "Software Engineering",
"created_at": "2024-01-15T10:30:00Z",
"schema": {
"ontology": {
"hierarchy": [ ... ],
"edge_types": [ ... ]
}
}
}
{
"detail": "Invalid ontology schema: missing hierarchy definition"
}
{
"detail": "Invalid API key"
}
Ontologies
Create Ontology
Save an ontology in Intellibase and generate an ontology ID which can then be used to create a project with this ontology
POST
/
api
/
v1
/
ontologies
curl -X POST https://api.intellibase.dev/api/v1/ontologies \
-H "Authorization: Bearer ib-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "Software Engineering",
"schema": {
"ontology": {
"hierarchy": [
{
"level": 0,
"node_types": {
"Developer": {
"properties": ["name", "role", "team"],
"description": "Software developer"
},
"Feature": {
"properties": ["name", "status", "deadline"],
"description": "Software feature"
}
}
}
],
"edge_types": [
{
"name": "WORKS_ON",
"source_types": ["Developer"],
"target_types": ["Feature"],
"properties": ["role"],
"temporal": true,
"description": "Developer works on feature"
}
]
}
}
}'
import requests
ontology_schema = {
"name": "Software Engineering",
"schema": {
"ontology": {
"hierarchy": [
{
"level": 0,
"node_types": {
"Developer": {
"properties": ["name", "role", "team"],
"description": "Software developer"
},
"Feature": {
"properties": ["name", "status", "deadline"],
"description": "Software feature"
}
}
}
],
"edge_types": [
{
"name": "WORKS_ON",
"source_types": ["Developer"],
"target_types": ["Feature"],
"properties": ["role"],
"temporal": True,
"description": "Developer works on feature"
}
]
}
}
}
response = requests.post(
"https://api.intellibase.dev/api/v1/ontologies",
headers={
"Authorization": "Bearer ib-your-api-key",
"Content-Type": "application/json"
},
json=ontology_schema
)
ontology = response.json()
print(f"Created ontology: {ontology['id']}")
const ontologySchema = {
name: "Software Engineering",
schema: {
ontology: {
hierarchy: [
{
level: 0,
node_types: {
Developer: {
properties: ["name", "role", "team"],
description: "Software developer"
},
Feature: {
properties: ["name", "status", "deadline"],
description: "Software feature"
}
}
}
],
edge_types: [
{
name: "WORKS_ON",
source_types: ["Developer"],
target_types: ["Feature"],
properties: ["role"],
temporal: true,
description: "Developer works on feature"
}
]
}
}
};
const response = await fetch(
"https://api.intellibase.dev/api/v1/ontologies",
{
method: "POST",
headers: {
"Authorization": "Bearer ib-your-api-key",
"Content-Type": "application/json"
},
body: JSON.stringify(ontologySchema)
}
);
const ontology = await response.json();
console.log(`Created ontology: ${ontology.id}`);
{
"id": "ont-abc123",
"name": "Software Engineering",
"created_at": "2024-01-15T10:30:00Z",
"schema": {
"ontology": {
"hierarchy": [ ... ],
"edge_types": [ ... ]
}
}
}
{
"detail": "Invalid ontology schema: missing hierarchy definition"
}
{
"detail": "Invalid API key"
}
Endpoint
POST https://api.intellibase.dev/api/v1/ontologies
Authentication
Requires a valid API key.Request Body
string
required
Descriptive name for the ontology (e.g., “Software Engineering”, “Customer Support”)
object
required
Response
string
Unique identifier for the ontology
string
The ontology name
string
When the ontology was created
object
The complete ontology schema
curl -X POST https://api.intellibase.dev/api/v1/ontologies \
-H "Authorization: Bearer ib-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "Software Engineering",
"schema": {
"ontology": {
"hierarchy": [
{
"level": 0,
"node_types": {
"Developer": {
"properties": ["name", "role", "team"],
"description": "Software developer"
},
"Feature": {
"properties": ["name", "status", "deadline"],
"description": "Software feature"
}
}
}
],
"edge_types": [
{
"name": "WORKS_ON",
"source_types": ["Developer"],
"target_types": ["Feature"],
"properties": ["role"],
"temporal": true,
"description": "Developer works on feature"
}
]
}
}
}'
import requests
ontology_schema = {
"name": "Software Engineering",
"schema": {
"ontology": {
"hierarchy": [
{
"level": 0,
"node_types": {
"Developer": {
"properties": ["name", "role", "team"],
"description": "Software developer"
},
"Feature": {
"properties": ["name", "status", "deadline"],
"description": "Software feature"
}
}
}
],
"edge_types": [
{
"name": "WORKS_ON",
"source_types": ["Developer"],
"target_types": ["Feature"],
"properties": ["role"],
"temporal": True,
"description": "Developer works on feature"
}
]
}
}
}
response = requests.post(
"https://api.intellibase.dev/api/v1/ontologies",
headers={
"Authorization": "Bearer ib-your-api-key",
"Content-Type": "application/json"
},
json=ontology_schema
)
ontology = response.json()
print(f"Created ontology: {ontology['id']}")
const ontologySchema = {
name: "Software Engineering",
schema: {
ontology: {
hierarchy: [
{
level: 0,
node_types: {
Developer: {
properties: ["name", "role", "team"],
description: "Software developer"
},
Feature: {
properties: ["name", "status", "deadline"],
description: "Software feature"
}
}
}
],
edge_types: [
{
name: "WORKS_ON",
source_types: ["Developer"],
target_types: ["Feature"],
properties: ["role"],
temporal: true,
description: "Developer works on feature"
}
]
}
}
};
const response = await fetch(
"https://api.intellibase.dev/api/v1/ontologies",
{
method: "POST",
headers: {
"Authorization": "Bearer ib-your-api-key",
"Content-Type": "application/json"
},
body: JSON.stringify(ontologySchema)
}
);
const ontology = await response.json();
console.log(`Created ontology: ${ontology.id}`);
{
"id": "ont-abc123",
"name": "Software Engineering",
"created_at": "2024-01-15T10:30:00Z",
"schema": {
"ontology": {
"hierarchy": [ ... ],
"edge_types": [ ... ]
}
}
}
{
"detail": "Invalid ontology schema: missing hierarchy definition"
}
{
"detail": "Invalid API key"
}
Use the Suggest Ontology endpoint to get an AI-generated starting point!
⌘I