Get an ontology
curl --request GET \
--url https://api.swapnice.com/v1/ontologies/{ontology_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.swapnice.com/v1/ontologies/{ontology_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.swapnice.com/v1/ontologies/{ontology_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"version": "<string>",
"fields": [
{
"name": "<string>",
"type": "string",
"required": true,
"label": "<string>",
"internal_slot": "<string>"
}
],
"identity_fields": [
"<string>"
],
"internal_storage": {
"compact_slot_family": "c*",
"persistence_boundary": "Descriptive API names are translated to compact storage keys internally."
}
}{
"error": {
"code": "consent_denied",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}Entries and ontologies
Get an ontology
Read the field map, types, and identity fields for one ontology.
GET
/
v1
/
ontologies
/
{ontology_id}
Get an ontology
curl --request GET \
--url https://api.swapnice.com/v1/ontologies/{ontology_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.swapnice.com/v1/ontologies/{ontology_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.swapnice.com/v1/ontologies/{ontology_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"version": "<string>",
"fields": [
{
"name": "<string>",
"type": "string",
"required": true,
"label": "<string>",
"internal_slot": "<string>"
}
],
"identity_fields": [
"<string>"
],
"internal_storage": {
"compact_slot_family": "c*",
"persistence_boundary": "Descriptive API names are translated to compact storage keys internally."
}
}{
"error": {
"code": "consent_denied",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}Read the field map, types, and identity fields for one ontology.
You send readable field names from this map. Compact storage keys are not part of the public API.
Authorizations
OAuth 2.1 authorization code with PKCE. Implicit and password flows are unsupported.
Path Parameters
⌘I