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

Vectors

All operations related to vectors

PreviousCollections

Last updated 1 year ago

Get vector count

Get the total count of vectors in a collection.

Get all vectors

Get all vectors in a collection.

Get a vector

Get specific vectors in a collection using their ids.

Create a vector

Create a new vector in a collection by passing it's values.

Create a vector for a text

Create a new vector in a collection by passing the vector text. emno will use the collection configuration to convert the text to the vector values and save the vector.

Update a vector

Update a vector in a collection.

Delete a vector

Deletes specific vectors in a collection by using their ids. If you pass "deleteAll" as true, you can delete all vectors in collection with a single API call.

Get Vector count

get
Path parameters
collectionIdstring · min: 1Required
Responses
200
Returns the total count of active Vectors in a given Collection.
application/json
400
Returns a bad request error.
application/json
get
GET /collections/{collectionId}/vectors/count HTTP/1.1
Host: 
Accept: */*
{
  "count": 1
}
  • Get vector count
  • GETGet Vector count
  • Get all vectors
  • POSTGet all Vectors
  • Get a vector
  • POSTGet specific Vectors
  • Create a vector
  • POSTSave Vectors
  • Create a vector for a text
  • POSTCreate Vectors from Text
  • Update a vector
  • POSTUpdate Vectors
  • Delete a vector
  • POSTDelete Vectors

Get all Vectors

post
Path parameters
collectionIdstring · min: 1Required
Body
idsstring[]Optional
includeVectorValuesbooleanOptional
Responses
200
Returns a list of all the Vectors in a Collection.
application/json
400
Returns a bad request error.
application/json
post
POST /collections/{collectionId}/vectors/getAll HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "ids": [
    "text"
  ],
  "includeVectorValues": true
}
[
  {
    "value": [
      1
    ],
    "metadata": null,
    "content": "text",
    "id": "text"
  }
]

Get specific Vectors

post
Path parameters
collectionIdstring · min: 1Required
Body
idsstring[] · min: 1Required
includeVectorValuesbooleanOptional
Responses
200
Returns the Vectors.
application/json
400
Returns a bad request error.
application/json
post
POST /collections/{collectionId}/vectors/get HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "ids": [
    "text"
  ],
  "includeVectorValues": true
}
[
  {
    "value": [
      1
    ],
    "metadata": null,
    "content": "text",
    "id": "text"
  }
]

Save Vectors

post
Path parameters
collectionIdstring · min: 1Required
Body
valuesnumber[]Required
metadataany | nullableOptional
contentstring · min: 1Required
Responses
200
Returns the list of Vectors saved.
application/json
400
Returns a bad request error.
application/json
post
POST /collections/{collectionId}/vectors/create HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 49

[
  {
    "values": [
      1
    ],
    "metadata": null,
    "content": "text"
  }
]
[
  {
    "value": [
      1
    ],
    "metadata": null,
    "content": "text",
    "id": "text"
  }
]

Create Vectors from Text

post
Path parameters
collectionIdstring · min: 1Required
Body
metadataany | nullableOptional
contentstring · min: 1Required
Responses
200
Returns the list of Vectors created.
application/json
400
Returns a bad request error.
application/json
post
POST /collections/{collectionId}/vectors/create/text HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 36

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

Update Vectors

post
Path parameters
collectionIdstring · min: 1Required
Body
valuesnumber[]Optional
metadataany | nullableOptional
contentstringOptional
idstring | nullableOptional
Responses
200
Returns a list of Vectors updated.
application/json
400
Returns a bad request error.
application/json
post
POST /collections/{collectionId}/vectors/update HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 61

[
  {
    "values": [
      1
    ],
    "metadata": null,
    "content": "text",
    "id": "text"
  }
]
{
  "created": [
    {
      "values": [
        1
      ],
      "metadata": null,
      "content": "text",
      "id": "text"
    }
  ],
  "updated": [
    {
      "values": [
        1
      ],
      "metadata": null,
      "content": "text",
      "id": "text"
    }
  ],
  "errored": []
}

Delete Vectors

post
Path parameters
collectionIdstring · min: 1Required
Body
idsstring[]Optional
deleteAllbooleanOptional
Responses
200
Returns the list of Vectors deleted.
application/json
400
Returns a bad request error
application/json
post
POST /collections/{collectionId}/vectors/delete HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "ids": [
    "text"
  ],
  "deleteAll": true
}
{
  "deleted": [
    {
      "value": [
        1
      ],
      "metadata": null,
      "content": "text",
      "id": "text"
    }
  ]
}