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
200
Database is healthy.
application/json
get
GET /health HTTP/1.1
Host: 
Accept: */*
{
  "status": "healthy"
}

Insert a vector

put

Inserts a vector into the database.

Body
componentsnumber · float[]Required

Components of vector to be inserted

Responses
200
Vector inserted.
text/plain
ResponsestringExample: Vector successfully inserted.
put
PUT /vector/insert HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "components": [
    1
  ]
}
Vector successfully inserted.

Insert many vectors

put

Insert many vectors at once into the database.

Body
Responses
200
Vectors inserted.
text/plain
ResponsestringExample: 10/10 vectors successfully inserted.
put
PUT /vector/bulk-insert HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 25

{
  "setOfComponents": [
    [
      1
    ]
  ]
}
200

Vectors inserted.

10/10 vectors successfully inserted.
get

Perform similarity search on a query vector.

Body
queryVectorIdnumber · intRequired

ID of the query vector

knumber · intRequired

K-nearest vectors desired

Responses
200
The k-nearest vectors returned in a array.
text/plain
ResponsearrayExample: [4,7,2,8,5]
get
GET /vector/search HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 25

{
  "queryVectorId": 1,
  "k": 1
}
200

The k-nearest vectors returned in a array.

[
  4,
  7,
  2,
  8,
  5
]

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
200
Time interval successfully updated.
text/plain
ResponsestringExample: Time interval updated.
post
POST /update-config/persistence/time-interval HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 22

{
  "updatedValueSecs": 1
}
200

Time interval successfully updated.

Time interval 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
200
API port successfully updated.
text/plain
ResponsestringExample: API port updated. Please restart the database for it to take effect.
post
POST /update-config/api/port HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "updatedPort": 1
}
200

API port successfully updated.

API port updated. Please restart the database for it to take effect.

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
200
API address successfully updated.
text/plain
ResponsestringExample: API address updated. Please restart the database for it to take effect.
post
POST /update-config/api/address HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 25

{
  "updatedAddress": "text"
}
200

API address successfully updated.

API address updated. Please restart the database for it to take effect.

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
200
Similarity metric successfully updated.
text/plain
ResponsestringExample: Vector similarity metric updated. Please restart the database for it to take effect.
post
POST /update-config/hnsw-params/similarity-metric HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "updatedMetric": "text"
}
200

Similarity metric successfully updated.

Vector similarity metric updated. Please restart the database for it to take effect.

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
200
Vector space size successfully updated.
text/plain
ResponsestringExample: Vector space size updated. Please restart the database for it to take effect.
post
POST /update-config/hnsw-params/vector-space-size HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 22

{
  "updatedSize": "text"
}
200

Vector space size successfully updated.

Vector space size updated. Please restart the database for it to take effect.

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
200
M parameter successfully updated.
text/plain
ResponsestringExample: M paramater updated. Please restart the database for it to take effect.
post
POST /update-config/hnsw-params/m HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "updatedM": "text"
}
200

M parameter successfully updated.

M paramater updated. Please restart the database for it to take effect.

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
200
efConstruction parameter successfully updated.
text/plain
ResponsestringExample: EF Construction paramater updated. Please restart the database for it to take effect.
post
POST /update-config/hnsw-params/ef-construction HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 25

{
  "updatedEfConst": "text"
}
200

efConstruction parameter successfully updated.

EF Construction paramater updated. Please restart the database for it to take effect.

Last updated