API Reference

Endpoints

All endpoints are read-only and require API key authentication. The base URL is $OWB_BASE_URL/api/v1 — set OWB_BASE_URL to your deployment URL (e.g. https://ontologyworkbench.com in production).

All responses use the envelope format: { "data": ... }. Errors use { "error": { "code": "...", "message": "..." } }.

Only published, non-archived models are accessible via the API.

Models

List models

GET /models

Returns all models the API key owner can access — personal models and org models for every org they belong to.

Response

{
  "data": [
    {
      "id": "uuid",
      "name": "E-commerce",
      "description": "Product catalog schema",
      "publishedAt": "2024-06-01T10:00:00Z",
      "entityTypeCount": 5,
      "relationshipCount": 4,
      "createdAt": "2024-05-01T08:00:00Z",
      "updatedAt": "2024-06-01T10:00:00Z"
    }
  ]
}

Get a model

GET /models/{modelId}

Returns the model's published snapshot data including all entity types and relationships.

Entity Types

List entity types

GET /models/{modelId}/entity-types

Returns all entity types in the published model. Each entity type includes its own properties. Inherited properties are resolved and included.

Get an entity type

GET /models/{modelId}/entity-types/{entityTypeId}

Returns a single entity type with its full property list (own + inherited).

Entity type object

{
  "id": "uuid",
  "name": "Product",
  "description": null,
  "isAbstract": false,
  "parentId": null,
  "properties": [
    {
      "id": "uuid",
      "name": "name",
      "dataType": "string",
      "required": true,
      "isEnum": false,
      "enumValues": null,
      "description": null
    }
  ]
}

Relationships

List relationships

GET /models/{modelId}/relationships

Returns all relationships in the published model.

Get a relationship

GET /models/{modelId}/relationships/{relationshipId}

Relationship object

{
  "id": "uuid",
  "name": "BELONGS_TO",
  "description": null,
  "cardinality": "N:1",
  "sourceEntityTypeId": "uuid",
  "targetEntityTypeId": "uuid",
  "properties": []
}

Export

Export model schema

GET /models/{modelId}/export/{format}

Returns the model exported in the requested format. The response Content-Type varies by format.

FormatContent-TypeOutput
prismatext/plainPrisma schema
drizzletext/plainDrizzle ORM TypeScript
sqlalchemytext/plainSQLAlchemy Python models
graphqltext/plainGraphQL SDL
json-schemaapplication/jsonJSON Schema Draft 7
neo4jtext/plainCypher statements
neptunetext/plainGremlin scripts
arangodbapplication/jsonArangoDB collection schema
dgraphtext/plainDQL schema
owlapplication/xmlOWL/RDF XML
docstext/htmlHTML reference document

OpenAPI Spec

GET /api/v1/openapi.json

Returns the full OpenAPI 3.1 specification as JSON. No authentication required. See OpenAPI / Swagger for a rendered view.