EigenDB provides a robust REST API to perform various actions.
Last updated 6 months ago
Perform a health check on the database.
curl -L \ --url '/health'
{ "status": "healthy" }
Inserts a vector into the database.
Components of vector to be inserted
curl -L \ --request PUT \ --url '/vector/insert' \ --header 'Content-Type: application/json' \ --data '{ "components": [ 1 ] }'
Vector successfully inserted.
Insert many vectors at once into the database.
Array of vectors, each represented by their components (float32[][])
curl -L \ --request PUT \ --url '/vector/bulk-insert' \ --header 'Content-Type: application/json' \ --data '{ "setOfComponents": [ [ 1 ] ] }'
10/10 vectors successfully inserted.
Perform similarity search on a query vector.
ID of the query vector
K-nearest vectors desired
curl -L \ --url '/vector/search' \ --header 'Content-Type: application/json' \ --data '{ "queryVectorId": 1, "k": 1 }'
[ 4, 7, 2, 8, 5 ]
Modify the time interval at which vectors in memory are persisted on disk.
The new time interval in seconds
curl -L \ --request POST \ --url '/update-config/persistence/time-interval' \ --header 'Content-Type: application/json' \ --data '{ "updatedValueSecs": 1 }'
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
curl -L \ --request POST \ --url '/update-config/api/port' \ --header 'Content-Type: application/json' \ --data '{ "updatedPort": 1 }'
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
curl -L \ --request POST \ --url '/update-config/api/address' \ --header 'Content-Type: application/json' \ --data '{ "updatedAddress": "text" }'
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)
curl -L \ --request POST \ --url '/update-config/hnsw-params/similarity-metric' \ --header 'Content-Type: application/json' \ --data '{ "updatedMetric": "text" }'
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
curl -L \ --request POST \ --url '/update-config/hnsw-params/vector-space-size' \ --header 'Content-Type: application/json' \ --data '{ "updatedSize": "text" }'
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
curl -L \ --request POST \ --url '/update-config/hnsw-params/m' \ --header 'Content-Type: application/json' \ --data '{ "updatedM": "text" }'
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
curl -L \ --request POST \ --url '/update-config/hnsw-params/ef-construction' \ --header 'Content-Type: application/json' \ --data '{ "updatedEfConst": "text" }'
EF Construction paramater updated. Please restart the database for it to take effect.