Vectors

All operations related to vectors

Get vector count

Get the total count of vectors in a collection.

Get Vector count

get
Path parameters
collectionIdstring · min: 1Required
Responses
get
/collections/{collectionId}/vectors/count
GET /collections/{collectionId}/vectors/count HTTP/1.1
Host: 
Accept: */*
{
  "count": 1
}

Get all vectors

Get all vectors in a collection.

Get all Vectors

post
Path parameters
collectionIdstring · min: 1Required
Body
idsstring[]Optional
includeVectorValuesbooleanOptional
Responses
post
/collections/{collectionId}/vectors/getAll
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 a vector

Get specific vectors in a collection using their ids.

Get specific Vectors

post
Path parameters
collectionIdstring · min: 1Required
Body
idsstring[] · min: 1Required
includeVectorValuesbooleanOptional
Responses
post
/collections/{collectionId}/vectors/get
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"
  }
]

Create a vector

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

Save Vectors

post
Path parameters
collectionIdstring · min: 1Required
Bodyobject[]
valuesnumber[]Required
metadataany | nullableOptional
contentstring · min: 1Required
Responses
post
/collections/{collectionId}/vectors/create
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 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.

Create Vectors from Text

post
Path parameters
collectionIdstring · min: 1Required
Bodyobject[]
metadataany | nullableOptional
contentstring · min: 1Required
Responses
post
/collections/{collectionId}/vectors/create/text
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 a vector

Update a vector in a collection.

Update Vectors

post
Path parameters
collectionIdstring · min: 1Required
Bodyobject[]
valuesnumber[]Optional
metadataany | nullableOptional
contentstringOptional
idstring | nullableOptional
Responses
post
/collections/{collectionId}/vectors/update
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 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.

Delete Vectors

post
Path parameters
collectionIdstring · min: 1Required
Body
idsstring[]Optional
deleteAllbooleanOptional
Responses
post
/collections/{collectionId}/vectors/delete
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"
    }
  ]
}

Last updated