Skip to content

Streaming API

Cosdata’s streaming data ingestion is designed for scenarios where individual records must become immediately searchable upon insertion. This is ideal for real-time monitoring systems, live content feeds, and streaming analytics.

Streaming ingestion uses a simplified fire-and-forget API that abstracts away transactional complexity. Each operation is atomic at the record level and immediately available for querying.

Streaming Data: Upsert Vectors

This API provides a simplified fire-and-forget way to upsert vectors, abstracting away the complexity of atomic operations. The entire workflow is handled in a single request.

Endpoint: POST /vectordb/collections/{collection_id}/streaming/upsert

URL Parameters:

ParameterTypeRequiredDescription
collection_idstringYesID (name) of the collection.

Request Body:

{
"vectors": [
{
"id": "vector_id_1",
"dense_values": [0.1, 0.2, 0.3, ...]
},
{
"id": "vector_id_2",
"text": "Document text content"
}
]
}

Status Codes:

CodeDescription
200Success. Vectors upserted successfully.
404Not Found. Collection not found.
500Server Error. Failed to upsert vectors.

Streaming Data: Delete a Vector

This API provides a simplified fire-and-forget way to delete a vector, abstracting away the complexity of atomic operations. The entire workflow is handled in a single request.

Endpoint: DELETE /vectordb/collections/{collection_id}/streaming/delete/{vector_id}

URL Parameters:

ParameterTypeRequiredDescription
collection_idstringYesID (name) of the collection.
vector_idstringYesID of the vector to delete.

Status Codes:

CodeDescription
204No Content. Vector deleted successfully.
404Not Found. Collection or vector not found.
500Server Error. Failed to delete vector.