The Context Engine Studio is now open source.  View on GitHub →
Clinia

Overview

Client libraries for JavaScript, TypeScript and Python.

Clinia publishes a client for JavaScript and TypeScript, @clinia/context-engine-js, and a client for Python, clinia-context-engine. Both are generated from the API specification at every release, so each REST operation has a method in both clients and each client matches the API version it was released with.

Each client handles three parts of working with the API for you:

  • It gets an access token with your client credentials, keeps it and renews it before it expires, so your code never handles a token.
  • It gives each operation a method, grouped by area of the API: service info, patients, ingestion, sessions, the virtual file system and the graph.
  • It types every request and response, so your editor suggests field names and your type checker flags a wrong field before the request is sent.
JavaScript and TypeScriptPython
Runs onNode 20+ and modern browsersPython 3.10+
Calling styleEach method returns a promiseA synchronous client and an asynchronous client with the same methods
ErrorsReturned as values alongside the dataRaised as exceptions

In JavaScript, you check each result for an error before you use its data. In Python, you catch the exception where you want to handle the failure, as described in the JavaScript and Python client pages.

Without a client, your code calls the same operations over plain HTTP, as described in the API reference.

To start using a client, follow its page: JavaScript Client or Python Client.