Comprehensive guide to View's vector repository management system, including vector database configuration, embedding storage, and AI-powered search capabilities for semantic data processing.
Overview
The View Vector Repository management system provides comprehensive configuration for vector database storage and AI-powered semantic search capabilities. Vector repositories define the properties and connections by which vector embeddings are stored, enabling advanced search, similarity matching, and AI-driven data processing within the View platform.
Key Features
- Vector Database Integration: Seamless integration with PostgreSQL with pgvector extension
- Embedding Storage: Efficient storage and retrieval of high-dimensional vector embeddings
- Model Configuration: Support for various language models and embedding dimensions
- Database Management: Complete database connection and configuration management
- Schema Support: Flexible schema and table configuration for vector storage
- Security: Secure database credentials and connection management
- Scalability: Support for high-dimensional vectors and large-scale embedding storage
- AI Integration: Foundation for AI-powered search and semantic data processing
Supported Operations
- Create: Create new vector repository configurations with database connections
- Read: Retrieve individual vector repository configurations and metadata
- Enumerate: List all vector repositories with pagination support
- Update: Modify existing vector repository configurations and settings
- Delete: Remove vector repository configurations and associated data
- Existence Check: Verify vector repository presence without retrieving details
API Endpoints
Vector repositories are managed via the Configuration server API at [http|https]://[hostname]:[port]/v1.0/tenants/[tenant-guid]/vectorrepositories
Supported HTTP Methods: GET, HEAD, PUT, DELETE
Important: All vector repository operations require appropriate authentication tokens.
Vector Repository Object Structure
Vector repository objects contain comprehensive configuration for vector database connections and embedding storage. Here's the complete structure:
{
"GUID": "example-vector-repository",
"TenantGUID": "default",
"Name": "My knowledgebase",
"RepositoryType": "Pgvector",
"Model": "all-MiniLM-L6-v2",
"Dimensionality": 384,
"DatabaseHostname": "pgvector",
"DatabaseName": "vectordb",
"DatabaseTable": "minilm",
"DatabasePort": 5432,
"DatabaseUser": "postgres",
"DatabasePassword": "password",
"SchemaName": "public",
"CreatedUtc": "2024-07-10T05:09:32.000000Z"
}Field Descriptions
- GUID (GUID): Globally unique identifier for the vector repository object
- TenantGUID (GUID): Globally unique identifier for the tenant
- Name (string): Display name for the vector repository
- RepositoryType (string): Type of vector repository (currently only "Pgvector")
- Model (string): Name of the language model used to generate embeddings stored in this repository
- Dimensionality (integer): Dimensionality of the embeddings (number of array elements)
- DatabaseHostname (string): Hostname of the vector database server
- DatabaseName (string): Name of the database containing vector data
- DatabaseTable (string): Table name where vector data is stored
- DatabasePort (integer): Port number for database connection
- DatabaseUser (string): Username for database authentication
- DatabasePassword (string): Password for database authentication
- SchemaName (string): Database schema name for vector storage
- CreatedUtc (datetime): UTC timestamp when the repository was created
Create Vector Repository
Creates a new vector repository configuration using PUT /v1.0/tenants/[tenant-guid]/vectorrepositories. This endpoint allows you to configure vector database connections for storing and retrieving high-dimensional embeddings.
Request Parameters
Required Parameters
- Name (string, Body, Required): Display name for the vector repository
- RepositoryType (string, Body, Required): Type of vector repository (currently only "Pgvector")
- Model (string, Body, Required): Name of the language model used to generate embeddings
- Dimensionality (integer, Body, Required): Dimensionality of the embeddings (number of array elements)
- DatabaseHostname (string, Body, Required): Hostname of the vector database server
- DatabaseName (string, Body, Required): Name of the database containing vector data
- DatabaseTable (string, Body, Required): Table name where vector data is stored
- DatabasePort (integer, Body, Required): Port number for database connection
- DatabaseUser (string, Body, Required): Username for database authentication
- DatabasePassword (string, Body, Required): Password for database authentication
Optional Parameters
- SchemaName (string, Body, Optional): Database schema name for vector storage (defaults to "public")
Important Notes
- Database Compatibility: Ensure the target database has pgvector extension installed
- Model Consistency: Use consistent model names across related vector repositories
- Dimensionality Matching: Ensure dimensionality matches the embedding model output
- Connection Testing: Verify database connectivity before creating the repository
curl --location --request PUT 'http://localhost:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/vectorrepositories' \
--header 'content-type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"Name": "My vector repository",
"RepositoryType": "Pgvector",
"Model": "all-MiniLM-L6-v2",
"Dimensionality": 384,
"DatabaseHostname": "localhost",
"DatabaseName": "vectordb",
"SchemaName": "public",
"DatabaseTable": "minilm",
"DatabasePort": 5432,
"DatabaseUser": "postgres",
"DatabasePassword": "password"
}'
import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access key
);
const createVectorRepository = async () => {
try {
const response = await api.VectorRepository.create({
Name: "My vector repository",
RepositoryType: "Pgvector",
Model: "all-MiniLM-L6-v2",
Dimensionality: 384,
DatabaseHostname: "localhost",
DatabaseName: "vectordb",
SchemaName: "public",
DatabaseTable: "minilm",
DatabasePort: 5432,
DatabaseUser: "postgres",
DatabasePassword: "*****rd",
});
console.log(response, "Vector repository created successfully");
} catch (err) {
console.log("Error creating Vector repository:", err);
}
};
createVectorRepository();import view_sdk
from view_sdk import configuration
from view_sdk.sdk_configuration import Service
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def createVectorRepository():
vectorRepository = configuration.VectorRepository.create(
Name="My vector repository",
RepositoryType="Pgvector",
Model="all-MiniLM-L6-v2",
Dimensionality=384,
DatabaseHostname="localhost",
DatabaseName="vectordb",
SchemaName="public",
DatabaseTable="minilm",
DatabasePort=5432,
DatabaseUser="postgres",
DatabasePassword="******rd"
)
print(vectorRepository)
createVectorRepository()using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://locahost:8000/");
VectorRepository request = new VectorRepository
{
Name = "My vector repository",
RepositoryType = VectorRepositoryTypeEnum.Pgvector,
Model = "all-MiniLM-L6-v2",
Dimensionality = 384,
DatabaseHostname = "localhost",
DatabaseName = "vectordb",
SchemaName = "public",
DatabaseTable = "minilm",
DatabasePort = 5432,
DatabaseUser = "postgres",
DatabasePassword = "*****rd",
};
VectorRepository response = await sdk.VectorRepository.Create(request);Response
Returns the created vector repository object with all configuration details:
{
"GUID": "example-vector-repository",
"TenantGUID": "default",
"Name": "My vector repository",
"RepositoryType": "Pgvector",
"Model": "all-MiniLM-L6-v2",
"Dimensionality": 384,
"DatabaseHostname": "localhost",
"DatabaseName": "vectordb",
"DatabaseTable": "minilm",
"DatabasePort": 5432,
"DatabaseUser": "postgres",
"DatabasePassword": "***word",
"SchemaName": "public",
"CreatedUtc": "2024-07-10T05:09:32.000000Z"
}Enumerate Vector Repositories
Retrieves a paginated list of all vector repository objects in the tenant using GET /v2.0/tenants/[tenant-guid]/vectorrepositories. This endpoint provides comprehensive enumer
ation with pagination support for managing multiple vector repository configurations.
Request Parameters
No additional parameters required beyond authentication.
curl --location 'http://localhost:8000/v2.0/tenants/00000000-0000-0000-0000-000000000000/vectorrepositories/' \
--header 'Authorization: ••••••'
import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access key
);
const enumerateVectorRepositories = async () => {
try {
const response = await api.VectorRepository.enumerate();
console.log(response, "Vector repositories fetched successfully");
} catch (err) {
console.log("Error fetching Vector repositories:", err);
}
};
enumerateVectorRepositories();
import view_sdk
from view_sdk import configuration
from view_sdk.sdk_configuration import Service
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def enumerateVectorRepositories():
vectorRepositories = configuration.VectorRepository.enumerate()
print(vectorRepositories)
enumerateVectorRepositories()using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
EnumerationResult<VectorRepository> response = await sdk.VectorRepository.Enumerate();Response
Returns a paginated list of vector repository objects:
{
"Success": true,
"Timestamp": {
"Start": "2024-10-21T02:36:37.677751Z",
"TotalMs": 23.58,
"Messages": {}
},
"MaxResults": 10,
"IterationsRequired": 1,
"EndOfResults": true,
"RecordsRemaining": 0,
"Objects": [
{
"GUID": "example-vector-repository",
"TenantGUID": "default",
"Name": "My vector repository",
"RepositoryType": "Pgvector",
"Model": "all-MiniLM-L6-v2",
"Dimensionality": 384,
"DatabaseHostname": "localhost",
"DatabaseName": "vectordb",
"DatabaseTable": "minilm",
"DatabasePort": 5432,
"DatabaseUser": "postgres",
"DatabasePassword": "***word",
"SchemaName": "public",
"CreatedUtc": "2024-07-10T05:09:32.000000Z"
}
],
"ContinuationToken": null
}Read Vector Repository
Retrieves vector repository configuration and metadata by GUID using GET /v1.0/tenants/[tenant-guid]/vectorrepositories/[vectorrepository-guid]. Returns the complete vector repository configuration including all database connection details and metadata. If the repository doesn't exist, a 404 error is returned.
Request Parameters
- vectorrepository-guid (string, Path, Required): GUID of the vector repository object to retrieve
curl --location 'http://localhost:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/vectorrepositories/00000000-0000-0000-0000-000000000000' \
--header 'Authorization: ••••••'import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access key
);
const getVectorRepository = async () => {
try {
const response = await api.VectorRepository.read(
"<embeddingsrule-guid>"
);
console.log(response, "Vector repository fetched successfully");
} catch (err) {
console.log("Error fetching Vector repository:", err);
}
};
getVectorRepository();import view_sdk
from view_sdk import configuration
from view_sdk.sdk_configuration import Service
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def readVectorRepository():
vectorRepository = configuration.VectorRepository.retrieve("<embeddingsrule-guid>")
print(vectorRepository)
readVectorRepository()using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
VectorRepository response = await sdk.VectorRepository.Retrieve(Guid.Parse("<vectorrepository-guid>"));Response
Returns the complete vector repository configuration:
{
"GUID": "example-vector-repository",
"TenantGUID": "default",
"Name": "My vector repository",
"RepositoryType": "Pgvector",
"Model": "all-MiniLM-L6-v2",
"Dimensionality": 384,
"DatabaseHostname": "localhost",
"DatabaseName": "vectordb",
"DatabaseTable": "minilm",
"DatabasePort": 5432,
"DatabaseUser": "postgres",
"DatabasePassword": "***word",
"SchemaName": "public",
"CreatedUtc": "2024-07-10T05:09:32.000000Z"
}Note: the HEAD method can be used as an alternative to get to simply check the existence of the object. HEAD requests return either a 200/OK in the event the object exists, or a 404/Not Found if not. No response body is returned with a HEAD request.
Read All Vector Repositories
Retrieves all vector repository objects in the tenant using GET /v1.0/tenants/[tenant-guid]/vectorrepositories/. Returns an array of vector repository objects with complete configuration details for all repositories in the tenant.
Request Parameters
No additional parameters required beyond authentication.
curl --location 'http://localhost:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/vectorrepositories/' \
--header 'Authorization: ••••••'import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access key
);
const getAllVectorRepositories = async () => {
try {
const response = await api.VectorRepository.readAll();
console.log(response, "All vector repositories fetched successfully");
} catch (err) {
console.log("Error fetching Vector repositories:", err);
}
};
getAllVectorRepositories();import view_sdk
from view_sdk import configuration
from view_sdk.sdk_configuration import Service
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def readAllVectorRepositories():
vectorRepositories = configuration.VectorRepository.retrieve_all()
print(vectorRepositories)
readAllVectorRepositories()using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
List<VectorRepository> response = await sdk.VectorRepository.RetrieveMany();Response
Returns an array of all vector repository objects:
[
{
"GUID": "example-vector-repository",
"TenantGUID": "default",
"Name": "My vector repository",
"RepositoryType": "Pgvector",
"Model": "all-MiniLM-L6-v2",
"Dimensionality": 384,
"DatabaseHostname": "localhost",
"DatabaseName": "vectordb",
"DatabaseTable": "minilm",
"DatabasePort": 5432,
"DatabaseUser": "postgres",
"DatabasePassword": "***word",
"SchemaName": "public",
"CreatedUtc": "2024-07-10T05:09:32.000000Z"
},
{
"GUID": "another-vector-repository",
"TenantGUID": "default",
"Name": "Production vector repository",
"RepositoryType": "Pgvector",
"Model": "sentence-transformers/all-mpnet-base-v2",
"Dimensionality": 768,
"DatabaseHostname": "prod-db.example.com",
"DatabaseName": "production_vectordb",
"DatabaseTable": "mpnet_embeddings",
"DatabasePort": 5432,
"DatabaseUser": "vector_user",
"DatabasePassword": "***word",
"SchemaName": "public",
"CreatedUtc": "2024-07-11T10:15:30.123456Z"
}
]Update Vector Repository
Updates an existing vector repository configuration using PUT /v1.0/tenants/[tenant-guid]/vectorrepositories/[vectorrepository-guid]. This endpoint allows you to modify vector repository parameters while preserving certain immutable fields.
Request Parameters
- vectorrepository-guid (string, Path, Required): GUID of the vector repository object to update
Updateable Fields
All configuration parameters can be updated except for:
- GUID: Immutable identifier
- TenantGUID: Immutable tenant association
- CreatedUtc: Immutable creation timestamp
Important Notes
- Field Preservation: Certain fields cannot be modified and will be preserved across updates
- Complete Object: Provide a fully populated object in the request body
- Database Validation: All database connection parameters will be validated before applying changes
- Connection Testing: Updated connections should be tested to ensure proper functionality
Request body:
curl --location --request PUT 'http://localhost:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/vectorrepositories/00000000-0000-0000-0000-000000000000' \
--header 'content-type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"Name": "My updated vector repository",
"RepositoryType": "Pgvector",
"Model": "all-MiniLM-L6-v2",
"Dimensionality": 384,
"DatabaseHostname": "localhost",
"DatabaseName": "vectordb",
"SchemaName": "public",
"DatabaseTable": "minilm",
"DatabasePort": 5432,
"DatabaseUser": "postgres",
"DatabasePassword": "password"
}'import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access key
);
const updateVectorRepository = async () => {
try {
const response = await api.VectorRepository.update({
GUID: "<vectorrepository-guid>",
TenantGUID: "<tenant-guid>",
Name: "My vector repository ash updated",
RepositoryType: "Pgvector",
Model: "all-MiniLM-L6-v2",
Dimensionality: 384,
DatabaseHostname: "localhost",
DatabaseName: "vectordb",
SchemaName: "public",
DatabaseTable: "minilm",
DatabasePort: 5432,
DatabaseUser: "postgres",
DatabasePassword: "******rd",
CreatedUtc: "2025-03-26T10:00:43.978210Z",
});
console.log(response, "Vector repository updated successfully");
} catch (err) {
console.log("Error updating Vector repository:", err);
}
};
updateVectorRepository();import view_sdk
from view_sdk import configuration
from view_sdk.sdk_configuration import Service
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def updateVectorRepository():
vectorRepository = configuration.VectorRepository.update("<vectorrepository-guid>",
Name="My vector repository [updated]",
RepositoryType="Pgvector",
Model="all-MiniLM-L6-v2",
Dimensionality=384,
DatabaseHostname="localhost",
DatabaseName="vectordb",
SchemaName="public",
DatabaseTable="minilm",
DatabasePort=5432,
DatabaseUser="postgres",
DatabasePassword="******rd"
)
print(vectorRepository)
updateVectorRepository()using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
var request = new VectorRepository
{
GUID = Guid.Parse("<vectorrepository-guid>"),
TenantGUID = Guid.Parse("<tenant-guid>"),
Name = "My vector repository updated",
RepositoryType = VectorRepositoryTypeEnum.Pgvector,
Model = "all-MiniLM-L6-v2",
Dimensionality = 384,
DatabaseHostname = "localhost",
DatabaseName = "vectordb",
SchemaName = "public",
DatabaseTable = "minilm",
DatabasePort = 5432,
DatabaseUser = "postgres",
DatabasePassword = "******rd",
};
VectorRepository response = await sdk.VectorRepository.Update(request);Response
Returns the updated vector repository object with all configuration details:
{
"GUID": "example-vector-repository",
"TenantGUID": "default",
"Name": "My updated vector repository",
"RepositoryType": "Pgvector",
"Model": "all-MiniLM-L6-v2",
"Dimensionality": 384,
"DatabaseHostname": "localhost",
"DatabaseName": "vectordb",
"DatabaseTable": "minilm",
"DatabasePort": 5432,
"DatabaseUser": "postgres",
"DatabasePassword": "***word",
"SchemaName": "public",
"CreatedUtc": "2024-07-10T05:09:32.000000Z"
}Delete Vector Repository
Deletes a vector repository object by GUID using DELETE /v1.0/tenants/[tenant-guid]/vectorrepositories/[vectorrepository-guid]. This operation permanently removes the vector repository configuration from the system. Use with caution as this action cannot be undone.
Important Note: Ensure no active embeddings or AI processes are using this repository before deletion.
Request Parameters
- vectorrepository-guid (string, Path, Required): GUID of the vector repository object to delete
curl --location --request DELETE 'http://localhost:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/vectorrepositories/00000000-0000-0000-0000-000000000000' \
--header 'Authorization: ••••••' \import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access key
);
const deleteVectorRepository = async () => {
try {
const response = await api.VectorRepository.delete(
"<vectorrepository-guid>"
);
console.log(response, "Vector repository deleted successfully");
} catch (err) {
console.log("Error deleting Vector repository:", err);
}
};
deleteVectorRepository();
import view_sdk
from view_sdk import configuration
from view_sdk.sdk_configuration import Service
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def deleteVectorRepository():
vectorRepository = configuration.VectorRepository.delete("<vectorrepository-guid>")
print(vectorRepository)
deleteVectorRepository()using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
bool deleted = await sdk.VectorRepository.Delete(Guid.Parse("<vectorrepository-guid>"));Response
Returns 204 No Content on successful deletion. No response body is returned.
Check Vector Repository Existence
Verifies if a vector repository object exists without retrieving its configuration using HEAD /v1.0/tenants/[tenant-guid]/vectorrepositories/[vectorrepository-guid]. This is an efficient way to check repository presence before performing operations.
Request Parameters
- vectorrepository-guid (string, Path, Required): GUID of the vector repository object to check
curl --location --head 'http://localhost:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/vectorrepositories/00000000-0000-0000-0000-000000000000' \
--header 'Authorization: ••••••'import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access key
);
const vectorRepositoryExists = async () => {
try {
const response = await api.VectorRepository.exists(
"<vectorrepository-guid>"
);
console.log(response, "Vector repository exists");
} catch (err) {
console.log("Error checking Vector repository:", err);
}
};
vectorRepositoryExists();import view_sdk
from view_sdk import configuration
from view_sdk.sdk_configuration import Service
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def existsVectorRepository():
vectorRepository = configuration.VectorRepository.exists("<vectorrepository-guid>")
print(vectorRepository)
existsVectorRepository()using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
bool exists = await sdk.VectorRepository.Exists(Guid.Parse("<vectorrepository-guid>"));Response
- 200 No Content: Vector repository exists
- 404 Not Found: Vector repository does not exist
- No response body: Only HTTP status code is returned
Note: HEAD requests do not return a response body, only the HTTP status code indicating whether the vector repository exists.
Best Practices
When managing vector repositories in the View platform, consider the following recommendations for optimal vector database configuration and AI integration:
- Database Security: Use secure database connections (SSL/TLS) and regularly rotate database credentials
- Model Consistency: Maintain consistent embedding models and dimensionality across related repositories
- Connection Testing: Always test database connectivity before creating or updating vector repositories
- Resource Planning: Plan for appropriate database resources based on expected vector storage and query loads
- Backup Strategy: Implement proper backup and recovery procedures for vector database data
Next Steps
After successfully configuring vector repositories, you can:
- Embeddings Rules: Create embeddings rules to automatically generate and store vector embeddings
- AI Search: Implement semantic search capabilities using the configured vector repositories
- Data Processing: Set up automated data processing pipelines for vector generation
- Performance Optimization: Monitor and optimize vector database performance for large-scale operations
- Integration: Integrate vector repositories with other View platform services for comprehensive AI workflows