Skip to main content

ontology (1.0)

Download OpenAPI specification:Download

Model-Prime ontology label management service

Retrieve ID/label information for multiple classes at once.

Request Body schema: application/json
required

a map of ontology ID to lookup requests.

required
object
additional property
object (OntologyLookupRequest)
class_keys
required
Array of strings

an array of class IDs or labels (interchangeably) to look up.

Responses

Request samples

Content type
application/json
{
  • "ontologies": {
    }
}

Response samples

Content type
application/json
{
  • "ontologies": {
    }
}

List all ontologies

Responses

Response samples

Content type
application/json
[
  • {
    }
]

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-stream
required
string <binary>

Responses

Response samples

Content type
application/json
{
  • "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

Content type
application/json
[
  • {
    }
]

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 version.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List the versions of an ontology

path Parameters
id
required
string

The ID of an ontology

Responses

Response samples

Content type
application/json
[
  • {
    }
]

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

Content type
application/json
{
  • "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"
}