curl -X POST https://api.example.com/api/knowledge/validate-vectorstore \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"vectorstoreProvider": "pinecone",
"vectorStoreConfig": {
"apiKey": "pc-xxxxxxxxxxxxx",
"environment": "us-east-1",
"indexName": "my-index"
}
}'
const response = await fetch('https://api.example.com/api/knowledge/validate-vectorstore', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
vectorstoreProvider: 'pinecone',
vectorStoreConfig: {
apiKey: 'pc-xxxxxxxxxxxxx',
environment: 'us-east-1',
indexName: 'my-index'
}
})
});
const data = await response.json();
import requests
response = requests.post(
'https://api.example.com/api/knowledge/validate-vectorstore',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'vectorstoreProvider': 'pinecone',
'vectorStoreConfig': {
'apiKey': 'pc-xxxxxxxxxxxxx',
'environment': 'us-east-1',
'indexName': 'my-index'
}
}
)
data = response.json()
{
"isValid": true,
"message": "Connection successful. Vector store is ready to use."
}
{
"isValid": false,
"message": "Authentication failed: Invalid API key"
}
{
"isValid": false,
"message": "Failed to connect to vector store: Index 'my-index' does not exist"
}
Configuration
Validate Vectorstore Configuration
Validates vector store API key and configuration before saving
POST
/
api
/
knowledge
/
validate-vectorstore
curl -X POST https://api.example.com/api/knowledge/validate-vectorstore \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"vectorstoreProvider": "pinecone",
"vectorStoreConfig": {
"apiKey": "pc-xxxxxxxxxxxxx",
"environment": "us-east-1",
"indexName": "my-index"
}
}'
const response = await fetch('https://api.example.com/api/knowledge/validate-vectorstore', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
vectorstoreProvider: 'pinecone',
vectorStoreConfig: {
apiKey: 'pc-xxxxxxxxxxxxx',
environment: 'us-east-1',
indexName: 'my-index'
}
})
});
const data = await response.json();
import requests
response = requests.post(
'https://api.example.com/api/knowledge/validate-vectorstore',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'vectorstoreProvider': 'pinecone',
'vectorStoreConfig': {
'apiKey': 'pc-xxxxxxxxxxxxx',
'environment': 'us-east-1',
'indexName': 'my-index'
}
}
)
data = response.json()
{
"isValid": true,
"message": "Connection successful. Vector store is ready to use."
}
{
"isValid": false,
"message": "Authentication failed: Invalid API key"
}
{
"isValid": false,
"message": "Failed to connect to vector store: Index 'my-index' does not exist"
}
Request Body
string
required
Vector store provider name (e.g.,
pinecone, weaviate, qdrant, chroma)object
required
Response
boolean
Whether the configuration is valid and connection successful
string
Validation result message or error details
curl -X POST https://api.example.com/api/knowledge/validate-vectorstore \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"vectorstoreProvider": "pinecone",
"vectorStoreConfig": {
"apiKey": "pc-xxxxxxxxxxxxx",
"environment": "us-east-1",
"indexName": "my-index"
}
}'
const response = await fetch('https://api.example.com/api/knowledge/validate-vectorstore', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
vectorstoreProvider: 'pinecone',
vectorStoreConfig: {
apiKey: 'pc-xxxxxxxxxxxxx',
environment: 'us-east-1',
indexName: 'my-index'
}
})
});
const data = await response.json();
import requests
response = requests.post(
'https://api.example.com/api/knowledge/validate-vectorstore',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'vectorstoreProvider': 'pinecone',
'vectorStoreConfig': {
'apiKey': 'pc-xxxxxxxxxxxxx',
'environment': 'us-east-1',
'indexName': 'my-index'
}
}
)
data = response.json()
{
"isValid": true,
"message": "Connection successful. Vector store is ready to use."
}
{
"isValid": false,
"message": "Authentication failed: Invalid API key"
}
{
"isValid": false,
"message": "Failed to connect to vector store: Index 'my-index' does not exist"
}
⌘I

