This page covers configuration and management of View vector repository objects.
Object Overview
Vector repositories define the properties by which vector data is stored within View.
Endpoint, URL, and Supported Methods
Objects are managed via the configuration server API at [http|https]://[hostname]:[port]/v1.0/tenants/[tenant-guid]/vectorrepositories
Supported methods include: GET
HEAD
PUT
DELETE
Structure
Objects have the following 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",
"CreatedUtc": "2024-07-10T05:09:32.000000Z"
}
Properties:
GUID
GUID
globally unique identifier for the objectTenantGUID
GUID
globally unique identifier for the tenantName
string
name of the objectRepositoryType
string
the type of vector repository (currently onlyPgvector
Model
string
the name of the language model from which embeddings stored in this repository were generatorDimensionality
int
the dimensionality of the embeddings, i.e. the number of array elementsDatabaseHostname
string
the database hostnameDatabaseName
string
the name of the databaseDatabaseTable
string
the table in which data is storedDatabasePort
int
the port on which the database is accessedDatabaseUser
string
the username used to access the databaseDatabasePassword
string
the password associated with the user to access the databaseSchemaName
string
the name of the schema.CreatedUtc
datetime
timestamp from creation, in UTC time
Create
To create, call PUT /v1.0/tenants/[tenant-guid]/vectorrepositories
with the following properties using the configuration server: Name
RepositoryType
Model
Dimensionality
DatabaseHostname
DatabaseName
DatabaseTable
DatabasePort
DatabaserUser
DatabasePassword
{
"Name": "Another vector repository",
"RepositoryType": "Pgvector",
"Model": "all-MiniLM-L6-v2",
"Dimensionality": 384,
"DatabaseHostname": "localhost",
"DatabaseName": "vectordb",
"DatabaseTable": "testtable",
"DatabasePort": 5432,
"DatabaseUser": "postgres",
"DatabasePassword": "password"
}
curl --location --request PUT 'http://view.homedns.org: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
sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "<tenant-guid>")
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);
Enumerate
Refer to the Enumeration page in REST API for details about the use of enumeration APIs.
Enumerate metadata rule objects by using GET /v2.0/tenants/[tenant-guid]/vectorrepositories
. The resultant object will appear as:
{
"Success": true,
"Timestamp": {
"Start": "2024-10-21T02:36:37.677751Z",
"TotalMs": 23.58,
"Messages": {}
},
"MaxResults": 10,
"IterationsRequired": 1,
"EndOfResults": true,
"RecordsRemaining": 16,
"Objects": [
{
"GUID": "example-vectorrepository",
... vectorrepository details ...
},
{ ... }
],
"ContinuationToken": "[continuation-token]"
}
curl --location 'http://view.homedns.org: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
sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "<tenant-guid>")
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();
Read
To read an object by GUID, call GET /v1.0/tenants/[tenant-guid]/vectorrepositories/[vectorrepository-guid]
. If the object exists, it will be returned as a JSON object in the response body. If it does not exist, a 404 will be returned with a NotFound
error response.
{
"GUID": "59f7c18d-7342-4aef-9308-86083459dd81",
"TenantGUID": "default",
"BucketGUID": "example-data-bucket",
"OwnerGUID": "default",
"Name": "Embeddings rule",
"ContentType": "*",
"TargetBucketGUID": "example-embeddings-bucket",
"VectorRepositoryGUID": "example-vector-repository",
"DataFlowEndpoint": "http://localhost:8501/processor",
"EmbeddingsGenerator": "LCProxy",
"GeneratorUrl": "http://localhost:8301/",
"GeneratorApiKey": "[huggingface API key]",
"BatchSize": 16,
"MaxGeneratorTasks": 16,
"MaxRetries": 3,
"MaxFailures": 3,
"VectorStoreUrl": "http://localhost:8311/",
"MaxContentLength": 16777216,
"CreatedUtc": "2024-10-21T15:19:09.000000Z"
}
curl --location 'http://view.homedns.org: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
sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "<tenant-guid>")
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>"));
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
To read all objects, call GET /v1.0/tenants/[tenant-guid]/vectorrepositories/
. If the object exists, it will be returned as an array of JSON object in the response body
curl --location 'http://view.homedns.org: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
sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "<tenant-guid>")
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();
Update
To update an object by GUID, call PUT /v1.0/tenants/[tenant-guid]/vectorrepositories/[vectorrepository-guid]
with a fully populated object in the request body. The updated object will be returned to you.
Note: certain fields cannot be modified and will be preserved across updates.
Request body:
{
"Name": "Updated vector repository",
"RepositoryType": "Pgvector",
"Model": "all-MiniLM-L6-v2",
"Dimensionality": 384,
"DatabaseHostname": "localhost",
"DatabaseName": "vectordb",
"DatabaseTable": "testtable",
"DatabasePort": 5432,
"DatabaseUser": "postgres",
"DatabasePassword": "password",
}
curl --location --request PUT 'http://view.homedns.org: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
sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "<tenant-guid>")
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 body:
{
"GUID": "57082e60-5a3d-44ed-bc3c-4b3ac8d1dbe5",
"TenantGUID": "default",
"Name": "Updated vector repository",
"RepositoryType": "Pgvector",
"Model": "all-MiniLM-L6-v2",
"Dimensionality": 384,
"DatabaseHostname": "localhost",
"DatabaseName": "vectordb",
"DatabaseTable": "testtable",
"DatabasePort": 5432,
"DatabaseUser": "postgres",
"DatabasePassword": "password",
"CreatedUtc": "2024-10-21T15:42:40.000000Z"
}
Delete
To delete an object by GUID, call DELETE /v1.0/tenants/[tenant-guid]/vectorrepositories/[vectorrepository-guid]
.
curl --location --request DELETE 'http://view.homedns.org: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
sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "<tenant-guid>")
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://view.homedns.org:8000/");
bool deleted = await sdk.VectorRepository.Delete(Guid.Parse("<vectorrepository-guid>"));
Check existance
To check existence of an object by GUID, call HEAD /v1.0/tenants/[tenant-id]/vectorrepositories/[vectorrepository-guid]
curl --location --head 'http://view.homedns.org: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
sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "<tenant-guid>")
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>"));