Comprehensive guide to View's graph repository management system, including configuration of graph database connections, relationship data storage, and graph analytics.
Overview
The View Graph Repositories management system provides comprehensive configuration for graph database connections and relationship data storage. Graph repositories define the properties and connections required to store and manage relationship data, metadata, and graph analytics within the View platform.
Key Features
- Graph Database Integration: Connect to LiteGraph and other graph database systems
- Relationship Storage: Store and manage complex relationship data and metadata
- Secure Connections: Configure secure API connections with authentication keys
- Graph Analytics: Enable advanced graph traversal and analytics capabilities
- Tenant Isolation: Graph repositories are isolated per tenant for enhanced security
- Flexible Configuration: Support for various graph database types and connection parameters
- SSL Support: Optional SSL encryption for secure graph database connections
Supported Operations
- Create: Configure new graph repository connections with database parameters
- Read: Retrieve graph repository configurations and connection details
- Enumerate: List all graph repositories with pagination support
- Update: Modify existing graph repository configurations
- Delete: Remove graph repositories from the system
- Existence Check: Verify graph repository presence without retrieving details
API Endpoints
Graph repositories are managed via the Configuration server API at [http|https]://[hostname]:[port]/v1.0/tenants/[tenant-guid]/graphrepositories
Supported HTTP Methods: GET
, HEAD
, PUT
, DELETE
Graph Repository Object Structure
Graph repository objects contain comprehensive configuration for graph database connections. Here's the complete structure:
{
"GUID": "example-graph-repository",
"TenantGUID": "default",
"Name": "My LiteGraph instance",
"RepositoryType": "LiteGraph",
"EndpointUrl": "http://litegraph:8701/",
"ApiKey": "default",
"Port": 0,
"Ssl": false,
"GraphIdentifier": "11111111-1111-1111-1111-111111111111",
"CreatedUtc": "2024-07-10T05:09:32.000000Z"
}
Field Descriptions
- GUID (GUID): Globally unique identifier for the graph repository object
- TenantGUID (GUID): Globally unique identifier for the tenant
- Name (string): Display name for the graph repository
- CreatedUtc (datetime): UTC timestamp when the repository was created
- RepositoryType (string): Type of graph repository (currently only "LiteGraph")
- EndpointUrl (string): URL endpoint for accessing the graph database
- ApiKey (string): API key for authenticating with the graph repository
- Port (integer): Port number for the graph database connection (currently unused)
- Ssl (boolean): Whether SSL encryption is enabled for the connection
- GraphIdentifier (string): Unique identifier (typically a GUID) for accessing the specific graph instance
Security Notes
- API Key Security: Store and manage API keys securely for graph database access
- SSL Configuration: Enable SSL for secure connections to graph databases
- Tenant Isolation: Graph repositories are strictly isolated per tenant for enhanced security
- Connection Security: Ensure proper network security for graph database endpoints
Create Graph Repository
Creates a new graph repository configuration using PUT /v1.0/tenants/[tenant-guid]/graphrepositories
. This endpoint allows you to configure connections to graph databases for storing and managing relationship data and metadata.
Request Parameters
Required Parameters
- Name (string, Body, Required): Display name for the graph repository
- RepositoryType (string, Body, Required): Type of graph repository (currently only "LiteGraph")
- EndpointUrl (string, Body, Required): URL endpoint for accessing the graph database
- GraphIdentifier (string, Body, Required): Unique identifier for accessing the specific graph instance
Optional Parameters
- ApiKey (string, Body, Optional): API key for authenticating with the graph repository
- Port (integer, Body, Optional): Port number for the graph database connection
- Ssl (boolean, Body, Optional): Whether SSL encryption is enabled for the connection
curl --location --request PUT 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/graphrepositories' \
--header 'content-type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"Name": "My LiteGraph instance",
"RepositoryType": "LiteGraph",
"EndpointUrl": "http://localhost:8701/",
"ApiKey": "default",
"GraphIdentifier": "00000000-0000-0000-0000-000000000000"
}'
import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access token
);
const createGraphRepository = async () => {
try {
const response = await api.GraphRepository.create({
Name: "My LiteGraph instance",
RepositoryType: "LiteGraph",
EndpointUrl: "http://localhost:8701/",
ApiKey: "default",
GraclearphIdentifier: "<graph-identifier>",
});
console.log(response, "Graph repository created successfully");
} catch (err) {
console.log("Error creating Graph repository:", err);
}
};
createGraphRepository();
import view_sdk
from view_sdk import configuration
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def createGraphRepository():
graphRepository = configuration.GraphRepository.create(
Name="My LiteGraph instance",
RepositoryType="LiteGraph",
EndpointUrl="http://localhost:8701/",
ApiKey="default",
GraphIdentifier="<graph-identifier>"
)
print(graphRepository)
createGraphRepository()
using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
GraphRepository request = new GraphRepository
{
Name = "My LiteGraph instance",
RepositoryType = GraphRepositoryTypeEnum.LiteGraph,
EndpointUrl = "http://localhost:8701/",
ApiKey = "default",
GraphIdentifier = "<graph-identifier>",
};
GraphRepository response = await sdk.GraphRepository.Create(request);
Response
Returns the created graph repository object with all configuration details:
{
"GUID": "example-graph-repository",
"TenantGUID": "default",
"Name": "My LiteGraph instance",
"RepositoryType": "LiteGraph",
"EndpointUrl": "http://litegraph:8701/",
"ApiKey": "***ault",
"Port": 0,
"Ssl": false,
"GraphIdentifier": "11111111-1111-1111-1111-111111111111",
"CreatedUtc": "2024-07-10T05:09:32.000000Z"
}
Enumerate Graph Repositories
Retrieves a paginated list of all graph repository objects in the tenant using GET /v2.0/tenants/[tenant-guid]/graphrepositories
. This endpoint provides comprehensive enumeration with pagination support for managing multiple graph repositories.
Request Parameters
No additional parameters required beyond authentication.
curl --location 'http://view.homedns.org:8000/v2.0/tenants/00000000-0000-0000-0000-000000000000/graphrepositories/' \
--header 'Authorization: ••••••'
import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access token
);
const enumerateGraphRepositories = async () => {
try {
const response = await api.GraphRepository.enumerate();
console.log(response, "Graph repositories fetched successfully");
} catch (err) {
console.log("Error fetching Graph repositories:", err);
}
};
enumerateGraphRepositories();
import view_sdk
from view_sdk import configuration
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def enumerateGraphRepositories():
graphRepositories = configuration.GraphRepository.enumerate()
print(graphRepositories)
enumerateGraphRepositories()
using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
EnumerationResult<GraphRepository> response = await sdk.GraphRepository.Enumerate();
Response Structure
Returns a paginated list of graph 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-graph-repository",
"TenantGUID": "default",
"Name": "My LiteGraph instance",
"RepositoryType": "LiteGraph",
"EndpointUrl": "http://litegraph:8701/",
"ApiKey": "***ault",
"Port": 0,
"Ssl": false,
"GraphIdentifier": "11111111-1111-1111-1111-111111111111",
"CreatedUtc": "2024-07-10T05:09:32.000000Z"
}
],
"ContinuationToken": null
}
Read Graph Repository
Retrieves graph repository configuration by GUID using GET /v1.0/tenants/[tenant-guid]/graphrepositories/[graphrepository-guid]
. Returns the complete graph repository configuration including all connection parameters. If the repository doesn't exist, a 404 error is returned.
Request Parameters
- graphrepository-guid (string, Path, Required): GUID of the graph repository object to retrieve
curl --location 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/graphrepositories/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 token
);
const readGraphRepository = async () => {
try {
const response = await api.GraphRepository.read(
"<graphrepository-guid>"
);
console.log(response, "Graph repository fetched successfully");
} catch (err) {
console.log("Error fetching Graph repository:", err);
}
};
readGraphRepository();
import view_sdk
from view_sdk import configuration
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def readGraphRepository():
graphRepository = configuration.GraphRepository.retrieve("<graphrepository-guid>")
print(graphRepository)
readGraphRepository()
using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
GraphRepository response = await sdk.GraphRepository.Retrieve(Guid.Parse("<graphrepository-guid>"));
Response
Returns the complete graph repository configuration:
{
"GUID": "example-graph-repository",
"TenantGUID": "default",
"Name": "My LiteGraph instance",
"RepositoryType": "LiteGraph",
"EndpointUrl": "http://litegraph:8701/",
"ApiKey": "***ault",
"Port": 0,
"Ssl": false,
"GraphIdentifier": "11111111-1111-1111-1111-111111111111",
"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 Graph Repositories
Retrieves all graph repository objects in the tenant using GET /v1.0/tenants/[tenant-guid]/graphrepositories/
. Returns an array of graph repository objects with complete configuration details for all repositories in the tenant.
Request Parameters
No additional parameters required beyond authentication.
curl --location 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/graphrepositories/' \
--header 'Authorization: ••••••'
import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access token
);
const readAllGraphRepositories = async () => {
try {
const response = await api.GraphRepository.readAll);
console.log(response, "All graph repositories fetched successfully");
} catch (err) {
console.log("Error fetching Graph repositories:", err);
}
};
readAllGraphRepositories();
import view_sdk
from view_sdk import configuration
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def readAllGraphRepositories():
graphRepositories = configuration.GraphRepository.retrieve_all()
print(graphRepositories)
readAllGraphRepositories()
using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
List<GraphRepository> response = await sdk.GraphRepository.RetrieveMany();
Response
Returns an array of all graph repository objects:
[
{
"GUID": "example-graph-repository",
"TenantGUID": "default",
"Name": "My LiteGraph instance",
"RepositoryType": "LiteGraph",
"EndpointUrl": "http://litegraph:8701/",
"ApiKey": "***ault",
"Port": 0,
"Ssl": false,
"GraphIdentifier": "11111111-1111-1111-1111-111111111111",
"CreatedUtc": "2024-07-10T05:09:32.000000Z"
},
{
"GUID": "another-graph-repository",
"TenantGUID": "default",
"Name": "Another LiteGraph instance",
"RepositoryType": "LiteGraph",
"EndpointUrl": "http://another-litegraph:8701/",
"ApiKey": "***ault",
"Port": 0,
"Ssl": true,
"GraphIdentifier": "22222222-2222-2222-2222-222222222222",
"CreatedUtc": "2024-07-10T06:15:45.123456Z"
}
]
Update Graph Repository
Updates an existing graph repository configuration using PUT /v1.0/tenants/[tenant-guid]/graphrepositories/[graphrepository-guid]
. This endpoint allows you to modify graph repository parameters while preserving certain immutable fields.
Request Parameters
- graphrepository-guid (string, Path, Required): GUID of the graph 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
- Validation: All updated parameters will be validated before applying changes
Request body:
curl --location --request PUT 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/graphrepositories/00000000-0000-0000-0000-000000000000' \
--header 'content-type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"Name": "My updated LiteGraph instance",
"RepositoryType": "LiteGraph",
"EndpointUrl": "http://localhost:8701/",
"ApiKey": "default",
"GraphIdentifier": "00000000-0000-0000-0000-000000000000"
}'
import { ViewConfigurationSdk } from "view-sdk";
const api = new ViewConfigurationSdk(
"http://localhost:8000/", //endpoint
"default", //tenant Id
"default" //access token
);
const updateGraphRepository = async () => {
try {
const response = await api.GraphRepository.update({
GUID: "<graphrepository-guid>",
TenantGUID: "<tenant-guid>",
Name: "My LiteGraph instance updated",
RepositoryType: "LiteGraph",
EndpointUrl: "http://localhost:8701/",
ApiKey: "***ault",
Ssl: false,
GraphIdentifier: undefined,
CreatedUtc: "2025-03-26T11:49:18.804037Z",
Port: 0,
});
console.log(response, "Graph repository updated successfully");
} catch (err) {
console.log("Error updating Graph repository:", err);
}
};
updateGraphRepository();
import view_sdk
from view_sdk import configuration
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def updateGraphRepository():
graphRepository = configuration.GraphRepository.update("626c44ef-cdc5-450f-8760-e6b863624cd8",
Name="My LiteGraph instance [updated]",
RepositoryType="LiteGraph",
EndpointUrl="http://localhost:8701/",
ApiKey="*****lt",
GraphIdentifier="<graph-identifier>"
)
print(graphRepository)
updateGraphRepository()
using System.Text.Json;
using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("00000000-0000-0000-0000-000000000000"),"default", "http://localhost:8000/");
var graphRepository = new GraphRepository
{
GUID = Guid.Parse("ee897d90-22e2-4fd5-aa90-7e8212051e6f"),
TenantGUID = Guid.Parse("00000000-0000-0000-0000-000000000000"),
Name = "My LiteGraph instance updated",
RepositoryType = GraphRepositoryTypeEnum.LiteGraph,
EndpointUrl = "http://localhost:8701/",
ApiKey = "***ault",
Ssl = false,
GraphIdentifier = "00000000-0000-0000-0000-000000000000",
Port = 0,
};
GraphRepository response = await sdk.GraphRepository.Update(graphRepository);
Response
Returns the updated graph repository object with all configuration details:
{
"GUID": "example-graph-repository",
"TenantGUID": "default",
"Name": "My LiteGraph instance updated",
"RepositoryType": "LiteGraph",
"EndpointUrl": "http://localhost:8701/",
"ApiKey": "***ault",
"Port": 0,
"Ssl": false,
"GraphIdentifier": "00000000-0000-0000-0000-000000000000",
"CreatedUtc": "2024-07-10T05:09:32.000000Z"
}
Delete Graph Repository
Deletes a graph repository object by GUID using DELETE /v1.0/tenants/[tenant-guid]/graphrepositories/[graphrepository-guid]
. This operation permanently removes the graph repository configuration. Use with caution as this action cannot be undone and may affect graph data access.
Request Parameters
- graphrepository-guid (string, Path, Required): GUID of the graph repository object to delete
curl --location --request DELETE 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/graphrepositories/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 token
);
const deleteGraphRepository = async () => {
try {
const response = await api.GraphRepository.delete(
"<graphrepository-guid>"
);
console.log(response, "Graph repository deleted successfully");
} catch (err) {
console.log("Error deleting Graph repository:", err);
}
};
deleteGraphRepository();
import view_sdk
from view_sdk import configuration
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def deleteGraphRepository():
graphRepository = configuration.GraphRepository.delete("<graphrepository-guid>")
print(graphRepository)
deleteGraphRepository()
using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
bool deleted = await sdk.GraphRepository.Delete(Guid.Parse("<graphrepository-guid>"));
Response
Returns 204 No Content on successful deletion. No response body is returned.
Check Graph Repository Existence
Verifies if a graph repository object exists without retrieving its configuration using HEAD /v1.0/tenants/[tenant-guid]/graphrepositories/[graphrepository-guid]
. This is an efficient way to check graph repository presence before performing operations.
Request Parameters
- graphrepository-guid (string, Path, Required): GUID of the graph repository object to check
curl --location --head 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/graphrepositories/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 token
);
const graphRepositoryExists = async () => {
try {
const response = await api.GraphRepository.exists(
"<graphrepository-guid>"
);
console.log(response, "Graph repository exists");
} catch (err) {
console.log("Error checking Graph repository:", err);
}
};
graphRepositoryExists();
import view_sdk
from view_sdk import configuration
sdk = view_sdk.configure(
access_key="default",
base_url="localhost",
tenant_guid="default",
service_ports={Service.DEFAULT: 8000},
)
def existsGraphRepository():
graphRepository = configuration.GraphRepository.exists("<graphrepository-guid>")
print(graphRepository)
existsGraphRepository()
using View.Sdk;
using View.Sdk.Configuration;
ViewConfigurationSdk sdk = new ViewConfigurationSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
bool exists = await sdk.GraphRepository.Exists(Guid.Parse("<graphrepository-guid>"));
Response
- 200 No Content: Graph repository exists
- 404 Not Found: Graph 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 graph repository exists.
Best Practices
When managing graph repositories in the View platform, consider the following recommendations for optimal performance and security:
- Secure API Keys: Store and manage API keys securely for graph database access
- SSL Configuration: Enable SSL encryption for secure connections to graph databases
- Connection Testing: Test graph repository connections before deploying to production
- Naming Conventions: Use descriptive names for graph repositories to facilitate management
- Tenant Isolation: Ensure graph repositories are properly isolated per tenant for multi-tenant environments
Next Steps
After successfully configuring graph repositories, you can:
- Graph Data Storage: Store relationship data and metadata in configured graph databases
- Graph Analytics: Implement advanced graph traversal and analytics capabilities
- Integration: Connect graph repositories with other View platform services and APIs
- Data Visualization: Build graph visualization interfaces using stored relationship data
- Performance Monitoring: Monitor graph repository connections and query performance