Introduction
An introduction to the OramaCore REST APIs and SDKs.
With OramaCore we aim to provide a set of APIs that are backward compatible - or at least, as similar as possible - to those exposed by Orama Cloud.
At the time of writing, with OramaCore being in beta, we are still working on the APIs and SDKs. We are also working on the documentation, so please bear with us.
APIs & SDKs
We will provide both REST APIs and SDKs for OramaCore.
We will always recommend to use the SDKs, as they will provide a more idiomatic way to interact with OramaCore.
Also, they'll abstract away a lot of the complexity that comes with server-side events, retries, and other things that are not directly related to the business logic of your application.
However, we understand that sometimes you might want to use the REST APIs directly, and we will provide them for you.
SDKs
At the time of writing, the official SDKs are not yet available. We are working on them, and we will release them as soon as possible.
We plan to provide SDKs for the following languages:
- JavaScript (✅ Available)
- Python (🚧 In progress)
- Swift (🚧 In progress)
- Kotlin (🚧 In progress)
JavaScript SDK
Pay attention to your API keys!
When using JavaScript on the browser, you're exposing your API keys.
While the read API key is safe to expose, the master and write API keys are not.
The OramaCoreManager
class is not safe to use on the browser, as it exposes your master API key.
We recommend using the CollectionManager
class on the browser, as it can work by passing the read API key only to the constructor.
The JavaScript SDK will be available as an NPM package. You will be able to install it with:
Once installed, you can start using as a regular JavaScript or TypeScript module:
As you can see in the example above, the SDK will provide you with two main classes: CollectionManager
and OramaCoreManager
.
The OramaCoreManager
class is used to manage your whole OramaCore database. It allows you to create, update, and delete collections, as well as manage your API keys.
The CollectionManager
class is used to manage a single collection. It allows you to perform searches, add, update, and delete documents, as well as perform answer engine sessions.