This endpoint allows the users to list all the Public Engines existing within Sepana via any private API key belonging to them.
Header:
Request Example:
Public Engines: Response
Insert Data
POST/v1/engine/insert_data
This endpoint is responsible for ingesting the data within a Sepana Engine. The data is provided in the form of JSON documents. Upon successful call to this endpoint, an internal data indexing job is created which is responsible for persisting the data. A maximum of 500 records can be inserted at a time.
Note: While ingesting the data, users can send unique _id along with each record. This acts as an identifier for that row in the dataset. If not specified explicitly by the user, Sepana automatically assigns one to each row.
Example below:
RfEFzoQBxqv6fmT099iM and RvELzoQBxqv6fmT0odgB are system generated identifiers (_id) for the two records present within <engine-id-1>. If the user wants to update the data within these two data points in future, they can simply create an ingestion request with new data while adding _id identifier to it. This will overwrite the older data present with _id.
Header:
Parameters:
Request Example:
Insert Data: Response
Delete Data
DELETE /v1/engine/data/delete
This endpoint is responsible for deleting data from a Sepana Engine. The users can delete the data providing delete_query and engine_id as inputs. Users can initially perform search with a query and delete those records using the same query as delete_query. To perform deletion, the user must own an API key for an Engine with a minimum of Admin access.
Header:
Parameters:
Request Example:
Delete the records from Engine "a88d58e6-15bf-409c-a09d-84603894c56e" where user_name is Louis Pearson
Delete Data: Response
Engine Remapping
POST/v1/engine/remap_fields
This endpoint allows users to reconfigure Engines for which they have admin access. It allows users to redefine and update the field data types. Upon calling this endpoint, an asynchronous pipeline is created which updates the data mapping of the engines based on the past configurations. The example mentioned updates the Engine mapping from previous endpoint (/engine/insert_data). Changes field "age" from "float" to "integer" and adds another field "expense" with data type "integer"
Header:
Parameters:
Request Example:
Engine Remmaping: Response
Job Status
GET/v1/job/status/{job_id}
Both Data Ingestion and Engine Reconfiguration are long running tasks. The system, therefore, creates asynchronous pipelines to execute those tasks. Every task is assigned a Job ID. You can track and update Job IDs using this endpoint.
Header:
Parameters:
Request Example:
Job Status: Response
Search
POST/v1/search
This endpoint allows users to search through data in a single or multiple Engines. There are various filters and options to choose from.
x-api-key: api key with a minimum of Read-Write access
docs: data documents in JSON format
engine_id: The id of the Engine where data is to be inserted
e.g.
{
"engine_id": "string",
"docs": [
{.....},
.......,
{.....}
]
}
engine_id: The id of the Engine whose data is to be deleted
delete_query: query to selective delete data points from an Engine
Eg.:
{
"engine_id": "string",
"delete_query": {
.....
}
}
{
"detail": "Deleted 5 records from <engine_id>",
"query": {
"query": {
"match": {
"user_name": "Louis Pearson"
}
}
}
}
x-api-key: api key with a minimum of Admin access
properties: new data schema of the Engine
engine_id: The id of the engine whose mapping is to be updated
e.g.
{
"engine_id": "string",
"properties": {}
}