Update VectorDB Connection
Endpoint
PUT /apiops/projects/{projectName}/vector-dbs/{vectorDbName}/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| vectorDbName | string | Yes | Vector DB connection name (must exist) |
Query Parameters
None
Request Body
Same shape as Create: the body must include "_class": "vector-db" and a nested transport object with its own "family" discriminator. If name is blank in the body it falls back to vectorDbName from the path; otherwise the two must match.
To preserve a stored secret, omit it or send it blank. To rotate a secret, send the new plaintext value.
Full JSON Body Example - JDBC transport, preserving the stored password
{
"_class": "vector-db",
"name": "pgvector-primary",
"description": "Primary pgvector store for RAG (updated)",
"enabled": true,
"dbType": "PGVECTOR",
"defaultCollectionName": "documents",
"embeddingDimension": 1536,
"distanceMetric": "COSINE",
"maxBatchSize": 100,
"transport": {
"family": "jdbc",
"connectTimeoutMs": 5000,
"requestTimeoutMs": 30000,
"jdbcUrl": "jdbc:postgresql://db.internal:5432/vectors",
"username": "apinizer",
"password": "",
"pool": {
"minimumIdle": 2,
"maximumPoolSize": 10
}
}
}
Full JSON Body Example - HTTP transport, rotating the apiKey
{
"_class": "vector-db",
"name": "qdrant-cloud",
"description": "Qdrant Cloud cluster",
"enabled": true,
"dbType": "QDRANT",
"defaultCollectionName": "documents",
"embeddingDimension": 1536,
"distanceMetric": "COSINE",
"maxBatchSize": 100,
"transport": {
"family": "http",
"endpoint": "https://xyz.eu-central.aws.cloud.qdrant.io:6333",
"apiVersion": "v1",
"authScheme": "API_KEY_HEADER",
"authHeaderName": "api-key",
"apiKey": "new-rotated-qdrant-key",
"regionCode": "eu-central"
}
}
Request Body Fields
The fields are identical to Create VectorDB Connection. The only behavioral difference is secret handling:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| _class | string | Yes | - | Connection subtype discriminator — must be "vector-db" |
| name | string | No | path value | Connection name — must match vectorDbName if provided; falls back to the path value when blank |
| description | string | No | - | Free-text description |
| enabled | boolean | No | true | Whether the connection is enabled |
| dbType | enum | Yes | - | Vector store type (PGVECTOR, QDRANT, WEAVIATE, MILVUS, CHROMA, PINECONE, REDIS, OTHER) |
| defaultCollectionName | string | No | - | Default collection / index / table name |
| embeddingDimension | integer | No | - | Embedding vector dimension |
| distanceMetric | enum | No | vendor default | COSINE, EUCLIDEAN, DOT_PRODUCT — filled from dbType when omitted |
| maxBatchSize | integer | No | vendor default | Maximum upsert/query batch size — filled from dbType when omitted |
| transport | object | Yes | - | Polymorphic transport sub-document (jdbc / http / redis) — see Create for full transport field tables |
| transport.password / transport.apiKey / transport.apiSecret | string | No | (preserved) | Secret fields — a blank/omitted value preserves the currently stored secret (INV-06); a non-blank value rotates it |
Notes
- The connection must already exist; updating a non-existent name returns
400 Bad Request. - Changing
dbTypeto a different transport family means the previously stored secret cannot be preserved (family mismatch) — supply the new credentials in full.
Response
Success Response (200 OK)
{
"status": "SUCCESS",
"deploymentResult": {
"success": true
}
}
Error Response (400 Bad Request)
{
"status": "FAILURE",
"resultMessage": "Vector DB connection (name: pgvector-primary) was not found!"
}
or
{
"status": "FAILURE",
"resultMessage": "Vector DB connection name in path (pgvector-primary) does not match name in body (pgvector-2)!"
}
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
curl -X PUT \
"https://demo.apinizer.com/apiops/projects/MyProject/vector-dbs/pgvector-primary/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"_class": "vector-db",
"name": "pgvector-primary",
"description": "Primary pgvector store for RAG (updated)",
"enabled": true,
"dbType": "PGVECTOR",
"defaultCollectionName": "documents",
"embeddingDimension": 1536,
"distanceMetric": "COSINE",
"maxBatchSize": 100,
"transport": {
"family": "jdbc",
"jdbcUrl": "jdbc:postgresql://db.internal:5432/vectors",
"username": "apinizer",
"password": ""
}
}'
Notes and Warnings
- Blank-secret Preserve (INV-06): Sending a blank or omitted secret (JDBC
password, HTTPapiKey/apiSecret, Redispassword) keeps the currently stored, encrypted value — the read response already masks these, so you never need to re-send them just to make an unrelated edit. - Rotate a Secret: Send the new plaintext value to replace the stored one.
- Family Change Loses Preservation: If you change
dbTypeto a different transport family, blank-secret preservation does not apply — provide the new credentials in full. - Discriminators: Keep
"_class": "vector-db"at the top level and the matchingtransport.familyvalue. - Save = encrypt + deploy: A successful update re-encrypts changed secrets and redeploys the connection to the workers.
Related Documentation
- Create VectorDB Connection - Create or upsert a connection (full transport field tables)
- Get VectorDB Connection - Read a connection (masked secrets)
- VectorDB Connections API - Resource overview
- AI Gateway API - Full AI Gateway APIops surface