EigenDB's REST API

EigenDB provides a robust REST API to perform various actions.

Database health check

get

Perform a health check on the database.

Responses
chevron-right
200

Database is healthy.

application/json
get
/health

Insert a vector

put

Inserts a vector into the database.

Body
componentsnumber · float[]Required

Components of vector to be inserted

Responses
chevron-right
200

Vector inserted.

text/plain
ResponsestringExample: Vector successfully inserted.
put
/vector/insert

Insert many vectors

put

Insert many vectors at once into the database.

Body
Responses
chevron-right
200

Vectors inserted.

text/plain
ResponsestringExample: 10/10 vectors successfully inserted.
put
/vector/bulk-insert
200

Vectors inserted.

get

Perform similarity search on a query vector.

Body
queryVectorIdnumber · intRequired

ID of the query vector

knumber · intRequired

K-nearest vectors desired

Responses
chevron-right
200

The k-nearest vectors returned in a array.

text/plain
ResponsearrayExample: [4,7,2,8,5]
get
/vector/search
200

The k-nearest vectors returned in a array.

Update persistence time interval

post

Modify the time interval at which vectors in memory are persisted on disk.

Body
updatedValueSecsnumber · floatRequired

The new time interval in seconds

Responses
chevron-right
200

Time interval successfully updated.

text/plain
ResponsestringExample: Time interval updated.
post
/update-config/persistence/time-interval
200

Time interval successfully updated.

Update the API port

post

Update the port on which the API runs (default = 8080). EigenDB must be restarted this to take effect.

Body
updatedPortnumber · intRequired

The new port number

Responses
chevron-right
200

API port successfully updated.

text/plain
ResponsestringExample: API port updated. Please restart the database for it to take effect.
post
/update-config/api/port
200

API port successfully updated.

Update the API address

post

Update the address on which the API runs (default = 0.0.0.0). EigenDB must be restarted this to take effect.

Body
updatedAddressstringRequired

The new API address

Responses
chevron-right
200

API address successfully updated.

text/plain
ResponsestringExample: API address updated. Please restart the database for it to take effect.
post
/update-config/api/address
200

API address successfully updated.

Update the similarity metric

post

Update the similarity metric used in similarity search (default = euclidean). EigenDB must be restarted this to take effect.

Body
updatedMetricstringRequired

The new similarity metric (cosine, euclidean, ip)

Responses
chevron-right
200

Similarity metric successfully updated.

text/plain
ResponsestringExample: Vector similarity metric updated. Please restart the database for it to take effect.
post
/update-config/hnsw-params/similarity-metric
200

Similarity metric successfully updated.

Update the vector space size

post

Update the vector storage capacity. EigenDB must be restarted this to take effect.

Body
updatedSizestringRequired

The new vector space size

Responses
chevron-right
200

Vector space size successfully updated.

text/plain
ResponsestringExample: Vector space size updated. Please restart the database for it to take effect.
post
/update-config/hnsw-params/vector-space-size
200

Vector space size successfully updated.

Update the M parameter

post

Update M parameter in the HNSW algorithm used for similarity search. EigenDB must be restarted this to take effect.

Body
updatedMstringRequired

The new M parameter

Responses
chevron-right
200

M parameter successfully updated.

text/plain
ResponsestringExample: M paramater updated. Please restart the database for it to take effect.
post
/update-config/hnsw-params/m
200

M parameter successfully updated.

Update the efConstruction parameter

post

Update efConstruction parameter in the HNSW algorithm used for similarity search. EigenDB must be restarted this to take effect.

Body
updatedEfConststringRequired

The new efConstruction parameter

Responses
chevron-right
200

efConstruction parameter successfully updated.

text/plain
ResponsestringExample: EF Construction paramater updated. Please restart the database for it to take effect.
post
/update-config/hnsw-params/ef-construction
200

efConstruction parameter successfully updated.

Last updated