Skip to content

OntoCast API guide

Turn documents into RDF knowledge graphs. Submit a file; OntoCast builds or extends an ontology and extracts facts against it in the background; you download the graphs when the job finishes.

Base URL https://api.growgraph.dev/ontocast

Everything here can also be done in the web console, which calls this same API. The API reference lists every route with its parameters and responses, and lets you try them; openapi.json describes the same routes for client generators.

  • Quick start

    Submit a document, follow its job and download the graphs, with curl or Python.

  • Concepts

    Jobs, projects, ontologies and their versions, results and share links.

  • API reference

    Every route, with its parameters and responses, to read and to try.

  • Errors

    Every status the API answers, and the codes a client can act on.

Authentication

Every request except GET /health carries Authorization: Bearer <token>, where the token is one of:

  • An API key, {user-id}.{secret}, for scripts and services. Create one in the console's settings (POST /me/api-key). It is shown once; replace or revoke it there.
  • A console sign-in token, which the console sends for you.
export ONTOCAST_API=https://api.growgraph.dev/ontocast
export ONTOCAST_KEY=550e8400-e29b-41d4-a716-446655440000.your-secret
curl -H "Authorization: Bearer $ONTOCAST_KEY" $ONTOCAST_API/me

A new account opens once its email is confirmed, unless new accounts are being held; a held account is pending until it is approved. Until then /me works, and submitting answers 403 pending_approval.

Terms of service

GET /me carries terms: version, the published version of the terms of service (null while none is published); accepted_version and accepted_at, what your account last accepted and when; and required, true while you have not accepted the published version. While it is true, the routes that start work, store content or publish answer 403 terms_not_accepted: submitting, importing and re-running (POST /process, /process_unit, /import, /jobs/{id}/rerun), creating a project, uploading an ontology, a version of one or shapes, adding a gallery ontology or a sample, and creating a share link. Reading, exporting and deleting stay open, as do renaming a project or a job, a project's keep-documents setting, feedback, credit requests and your own settings and API key.

Accept the version you read with POST /me/terms and {"version": "…"}; it returns the same terms object, and accepting a version again changes nothing. It answers 409 terms_version_stale when another version was published since (read that one and accept it), and terms_not_published when none is. A pending account may accept.