emno docs
Dashboard
  • Getting Started
    • Quickstart
    • Examples
    • Bubble Plugin
  • Reference
    • API Reference
      • Collections
      • Vectors
Powered by GitBook
On this page
  1. Reference
  2. API Reference

Collections

All operations related to collections

PreviousAPI ReferenceNextVectors

Last updated 1 year ago

Get all collections

Get all collections and their configurations

Get a collection

Get a specific collection and it's configuration using it's id or name.

Create a collection

Delete a collection

Delete an existing collection using it's name or id.

Update a collection

Update details of an existing collection.

Query a collection for a vector value

Search a collection using a query vector. It retrieves the vectors that are most similar to the queried vector, along with their similarity scores.

Query a collection for a text

Search a collection using a text. It retrieves the vectors that are most similar to the queried text, along with their similarity scores.

Get all Collections

get
Responses
200
Returns a list of Collections along with their configurations.
application/json
400
Returns a bad request error.
application/json
get
GET /collections HTTP/1.1
Host: 
Accept: */*
[
  {
    "name": "text",
    "description": "text",
    "config": {
      "dim": 1,
      "m": 1,
      "efConstruction": 1,
      "ef": 1,
      "model": "text",
      "algo": "text",
      "allowReplace": true
    },
    "id": "text"
  }
]

Get a Collection

get
Path parameters
collectionIdOrNamestring · min: 1Required
Responses
200
Returns the Collection information.
application/json
400
Returns a bad request error.
application/json
get
GET /collections/{collectionIdOrName} HTTP/1.1
Host: 
Accept: */*
{
  "name": "text",
  "description": "text",
  "config": {
    "dim": 1,
    "m": 1,
    "efConstruction": 1,
    "ef": 1,
    "model": "text",
    "algo": "text",
    "allowReplace": true
  },
  "id": "text"
}

Delete a Collection

delete
Path parameters
collectionIdOrNamestring · min: 1Required
Responses
200
Returns the deleted Collection.
application/json
400
Returns a bad request error.
application/json
delete
DELETE /collections/{collectionIdOrName} HTTP/1.1
Host: 
Accept: */*
{
  "deleted": {
    "name": "text",
    "description": "text",
    "config": {
      "dim": 1,
      "m": 1,
      "efConstruction": 1,
      "ef": 1,
      "model": "text",
      "algo": "text",
      "allowReplace": true
    },
    "id": "text"
  }
}
  • Get all collections
  • GETGet all Collections
  • Get a collection
  • GETGet a Collection
  • Create a collection
  • POSTCreate Collection
  • Delete a collection
  • DELETEDelete a Collection
  • Update a collection
  • POSTUpdates a Collection
  • Query a collection for a vector value
  • POSTSemantic search over Vectors
  • Query a collection for a text
  • POSTSemantic search by text over Vectors

Create Collection

post
Body
namestringRequiredPattern: ^[a-zA-Z0-9_-]+$
descriptionstring | nullableOptional
Responses
200
Returns the created Collection information.
application/json
400
Returns a bad request error.
application/json
post
POST /collections HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 136

{
  "name": "text",
  "description": "text",
  "config": {
    "dim": 1,
    "m": 1,
    "efConstruction": 1,
    "ef": 1,
    "model": "text",
    "algo": "text",
    "allowReplace": true
  }
}
{
  "name": "text",
  "description": "text",
  "config": {
    "dim": 1,
    "m": 1,
    "efConstruction": 1,
    "ef": 1,
    "model": "text",
    "algo": "text",
    "allowReplace": true
  },
  "id": "text"
}

Updates a Collection

post
Path parameters
collectionIdstring · min: 1Required
Body
namestringOptionalPattern: ^[a-zA-Z0-9_-]+$
descriptionstringOptional
Responses
200
Returns the updated collection information.
application/json
400
Returns a bad request error.
application/json
post
POST /collections/{collectionId} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 36

{
  "name": "text",
  "description": "text"
}
{
  "name": "text",
  "description": "text",
  "config": {
    "dim": 1,
    "m": 1,
    "efConstruction": 1,
    "ef": 1,
    "model": "text",
    "algo": "text",
    "allowReplace": true
  },
  "id": "text"
}

Semantic search over Vectors

post
Path parameters
collectionIdstring · min: 1Required
Body
limitnumberOptional
Responses
200
Returns a list of the matching Vectors in a Collection.
application/json
400
Returns a bad request error.
application/json
post
POST /collections/{collectionId}/query HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 27

{
  "vectors": [
    [
      1
    ]
  ],
  "limit": 1
}
[
  [
    {
      "id": "text",
      "content": "text",
      "metadata": null,
      "distance": 1
    }
  ]
]

Semantic search by text over Vectors

post
Path parameters
collectionIdstring · min: 1Required
Body
contentstring[]Required
topKnumberOptional
Responses
200
Returns a list of the matching Vectors in a Collection.
application/json
400
Returns a bad request error.
application/json
post
POST /collections/{collectionId}/query/text HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 29

{
  "content": [
    "text"
  ],
  "topK": 1
}
[
  [
    {
      "id": "text",
      "content": "text",
      "metadata": null,
      "distance": 1
    }
  ]
]