API Keys
API keys are used to authenticate requests to the OramaCore API
As explained in the introduction, OramaCore is split in two sides: the reader side and the writer side.
Therefore, depending on the operation you want to perform, you will need to use different API keys.
In total, OramaCore will give you access to three different kinds API keys:
Master API Key
Not safe to share. Never share the master API key publicly. Treat it as a password.
The master API key is an essential key that allows you to configure the OramaCore instance and create or delete new collections.
It's configurable via the config.yaml
file under the writer_side
section:
You will need this API key to:
- Create a new collection
- Delete a collection
- Update the configuration of a collection
In all the cases above, you will need to pass the master API key in the Authorization
header of the request as a Bearer
token.
Example:
As you can see, when creating a new collection, you will need to create the read_api_key
and write_api_key
as well. You will them use them to perform read and write operations on the collection.
Write API Key
Not safe to share. Never share the write API key publicly. Treat it as a password.
The write API key is used to insert, update, or delete documents in a collection, as well as creating new hooks and actions.
Every collection has its own write API key, which is generated when you create the collection.
You will need this API key to:
- Insert one or more documents into a collection
- Update one or more documents in a collection
- Delete one or more documents from a collection
- Create a new hook or action
In all the cases above, you will need to pass the write API key in the Authorization
header of the request as a Bearer
token.
Example:
Read API Key
Safe to share. This API key performs read operations only. You can share it publicly.
The read API key is used to perform read operations on a collection.
Every collection has its own read API key, which is generated when you create the collection.
You will need this API key to:
- Perform full-text, hybrid, or vector search
- Read the documents in a collection
- Perform answer sessions
In all the cases above, you will need to pass the read API key as a query parameter in the request.
Example: