Get ontology schema status
curl --request GET \
--url https://api.example.com/v1/ontology/statusimport requests
url = "https://api.example.com/v1/ontology/status"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/ontology/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/ontology/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/ontology/status"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/ontology/status")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/ontology/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"has_ontology": true,
"version": 123,
"node_types": [],
"relationship_types": [],
"applied_at": "<string>"
}ontology
Get ontology schema status
Returns whether an active ontology is configured and lists its node labels and relationship types. Useful for the UI to determine whether the Memory Worker has a valid schema to process entities against. (PRD-005 T4.4)
GET
/
v1
/
ontology
/
status
Get ontology schema status
curl --request GET \
--url https://api.example.com/v1/ontology/statusimport requests
url = "https://api.example.com/v1/ontology/status"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/ontology/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/ontology/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/ontology/status"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/ontology/status")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/ontology/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"has_ontology": true,
"version": 123,
"node_types": [],
"relationship_types": [],
"applied_at": "<string>"
}Response
200 - application/json
Successful Response
Schema status returned by GET /v1/ontology/status (PRD-005 T4.4).
Fields
has_ontology: True if an active ontology version exists. version: The ontology version number (== id in the DB), or None. node_types: List of node label strings defined in the active YAML. relationship_types: List of edge type strings defined in the active YAML. applied_at: ISO-8601 timestamp when the current version was applied, or None.