EigenDB's REST API
EigenDB provides a robust REST API to perform various actions.
Inserts a vector into the database.
Components of vector to be inserted
Vector successfully inserted.
PUT /vector/insert HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"components": [
1
]
}
Vector successfully inserted.
Insert many vectors at once into the database.
10/10 vectors successfully inserted.
PUT /vector/bulk-insert HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 25
{
"setOfComponents": [
[
1
]
]
}
Vectors inserted.
10/10 vectors successfully inserted.
Perform similarity search on a query vector.
ID of the query vector
K-nearest vectors desired
[4,7,2,8,5]
GET /vector/search HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 25
{
"queryVectorId": 1,
"k": 1
}
The k-nearest vectors returned in a array.
[
4,
7,
2,
8,
5
]
Modify the time interval at which vectors in memory are persisted on disk.
The new time interval in seconds
Time interval updated.
POST /update-config/persistence/time-interval HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 22
{
"updatedValueSecs": 1
}
Time interval successfully updated.
Time interval updated.
Update the port on which the API runs (default = 8080). EigenDB must be restarted this to take effect.
The new port number
API port updated. Please restart the database for it to take effect.
POST /update-config/api/port HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 17
{
"updatedPort": 1
}
API port successfully updated.
API port updated. Please restart the database for it to take effect.
Update the address on which the API runs (default = 0.0.0.0). EigenDB must be restarted this to take effect.
The new API address
API address updated. Please restart the database for it to take effect.
POST /update-config/api/address HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 25
{
"updatedAddress": "text"
}
API address successfully updated.
API address updated. Please restart the database for it to take effect.
Update the similarity metric used in similarity search (default = euclidean). EigenDB must be restarted this to take effect.
The new similarity metric (cosine, euclidean, ip)
Vector similarity metric updated. Please restart the database for it to take effect.
POST /update-config/hnsw-params/similarity-metric HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 24
{
"updatedMetric": "text"
}
Similarity metric successfully updated.
Vector similarity metric updated. Please restart the database for it to take effect.
Update the vector storage capacity. EigenDB must be restarted this to take effect.
The new vector space size
Vector space size updated. Please restart the database for it to take effect.
POST /update-config/hnsw-params/vector-space-size HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 22
{
"updatedSize": "text"
}
Vector space size successfully updated.
Vector space size updated. Please restart the database for it to take effect.
Update M parameter in the HNSW algorithm used for similarity search. EigenDB must be restarted this to take effect.
The new M parameter
M paramater updated. Please restart the database for it to take effect.
POST /update-config/hnsw-params/m HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"updatedM": "text"
}
M parameter successfully updated.
M paramater updated. Please restart the database for it to take effect.
Update efConstruction parameter in the HNSW algorithm used for similarity search. EigenDB must be restarted this to take effect.
The new efConstruction parameter
EF Construction paramater updated. Please restart the database for it to take effect.
POST /update-config/hnsw-params/ef-construction HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 25
{
"updatedEfConst": "text"
}
efConstruction parameter successfully updated.
EF Construction paramater updated. Please restart the database for it to take effect.
Last updated