Retrieve ID/label information for multiple classes at once.
Request Body schema: application/jsonrequired
a map of ontology ID to lookup requests.
required | object | ||||||
|
Responses
Request samples
- Payload
{- "ontologies": {
- "some_ontology_id": {
- "class_keys": [
- "id1",
- "id2"
]
}
}
}
Response samples
- 200
{- "ontologies": {
- "some_ontology_id": [
- {
- "id": "id1",
- "labels": [
- "Bagel"
]
}, - {
- "id": "id2",
- "labels": [
- "Donut"
]
}
]
}
}
Upload an OWL spec to create or update an ontology
Upload an OWL file to create or update an ontology. The new or updated ontology will be in a draft state until published.
header Parameters
Version required | string^\d{1,3}\.\d{1,3}\.\d{1,3}$ Example: 1.12.4 The semantic version number of the ontology you wish to upload. |
Version-Message | string <= 1000 characters Example: Added new classes 'Car' and 'Truck'. A brief message describing the changes in this ontology version. |
Request Body schema: application/octet-streamrequired
Responses
Response samples
- 200
{- "created_at": "2019-08-24T14:15:22Z",
- "e_tag": "\"68276c217d52d1cefa5ed9685190c7e5\"",
- "format": "ttl",
- "is_draft": true,
- "message": "Added new classes 'Ice Cream' and 'Snow Cone'.",
- "num_classes": 42,
- "ontology_id": "string",
- "ontology_name": "Dessert",
- "prev_version": "string",
- "size": 1234567,
- "version": "1.0.12"
}
Query an ontology
Performs a breadth-first search from the root or an alternative node specified by start
. The results of the search are returned as a list.
path Parameters
id required | string The ID of an ontology |
query Parameters
start_id | string The ID of a class at which to base the search. Overrides start_label. By default, the search will start at the root. |
start_label | string The label of a class at which to base the search. Class labels are non-case-sensitive and treat space, hyphen, and underscore as the same character. |
direction | string Default: "descendants" Enum: "descendants" "ancestors" Specifies the direction of the query: descendants or ancestors. |
depth | integer >= -1 Default: 0 Specifies the depth of the query, which is a breadth-first search. Defaults to 0, which returns the specified node only. Use -1 for unlimited depth. |
version | string Default: "latest" Example: version=draft Specifies a version of an ontology using either a semantic version number or a keyword. The keyword 'draft' specifies the draft version, and the keyword 'latest' specifies the latest active version. |
Responses
Response samples
- 200
[- {
- "children": [
- "string"
], - "comment": "string",
- "id": "string",
- "labels": [
- "Donut"
], - "parents": [
- "string"
], - "search_depth": 0
}
]
Get a list of changes between two versions of an ontology
path Parameters
id required | string The ID of an ontology |
query Parameters
version | string Default: "latest" Example: version=draft Specifies a version of an ontology using either a semantic version number or a keyword. The keyword 'draft' specifies the draft version, and the keyword 'latest' specifies the latest active version. |
compare_version | string Default: "draft" Example: compare_version=1.12.4 Specifies a second version of an ontology to compare against, in the same format as |
Responses
Response samples
- 200
[- {
- "aliases": [
- "alias1"
], - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "parents": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "status": "created",
- "version": "1.12.3"
}
]
Response samples
- 200
[- {
- "created_at": "2019-08-24T14:15:22Z",
- "e_tag": "\"68276c217d52d1cefa5ed9685190c7e5\"",
- "format": "ttl",
- "is_draft": true,
- "message": "Added new classes 'Ice Cream' and 'Snow Cone'.",
- "num_classes": 42,
- "ontology_id": "string",
- "ontology_name": "Dessert",
- "prev_version": "string",
- "size": 1234567,
- "version": "1.0.12"
}
]
Publish an ontology version
Promotes the draft version of the specified ontology to become the current latest version. Also creates a copy of this version as the new draft. Once a version is published, it can no longer be changed.
path Parameters
id required | string The ID of an ontology |
header Parameters
If-Match required | string^(?:"[a-zA-Z0-9_\-]+"|[a-zA-Z0-9_\-]+)$ The entity tag (e_tag) of the draft you wish to publish. |
Responses
Response samples
- 201
{- "created_at": "2019-08-24T14:15:22Z",
- "e_tag": "\"68276c217d52d1cefa5ed9685190c7e5\"",
- "format": "ttl",
- "is_draft": true,
- "message": "Added new classes 'Ice Cream' and 'Snow Cone'.",
- "num_classes": 42,
- "ontology_id": "string",
- "ontology_name": "Dessert",
- "prev_version": "string",
- "size": 1234567,
- "version": "1.0.12"
}