Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

API endpoints

The API is part of the web service and needs the [server] extra (pip install "oc-lode[server]", see Getting started).

Interactive docs available at /docs (Swagger) and /redoc (ReDoc) when the server is running.

GET /

Web input form.

GET /health

Liveness probe. Returns {"status": "ok"}. Used by Docker and Kubernetes health checks.

GET /extract

Render an artefact as HTML or RDF.

ParameterTypeRequiredDescription
read_asstringyesThe name of an enabled format: owl or skos. Formats added by plugins are accepted too. An unknown name returns an error page (HTTP 400)
urlstringone ofPublic http(s) URL
upload_idstringone ofToken from a previous upload
resourcestringnoIRI of a single resource
langstringnoLanguage tag, e.g. en
importedboolnoLoad owl:imports depth 1
closureboolnoLoad full owl:imports closure
formatstringnoForce serialization: ttl, rdf, jsonld, nt
warningsboolnoInclude reader warnings
cacheboolnoUse URL cache (default true)

Returns HTML by default. Returns RDF when format is set or the Accept header requests a serialization MIME type.

POST /extract

Same as GET /extract but accepts a file upload (multipart/form-data).

GET /build

Generate a static documentation site as a ZIP archive. Same parameters as GET /extract minus resource and format.

POST /build

Same as GET /build but accepts a file upload.