Skip to main content

vector_databases

Creates, updates, deletes, gets or lists a vector_databases resource.

Overview

Namevector_databases
TypeResource
Iddigitalocean.databases.vector_databases

Fields

The following fields are returned by SELECT queries:

A successful response.

NameDatatypeDescription
idstring (example: example string)
namestring (example: example name)
forked_from_idstringID of the vector database this instance was forked from. Empty when the instance was created directly via CreateVectorDB. Read-only and set by the platform at fork time; never modifiable through UpdateVectorDB. (example: 123e4567-e89b-12d3-a456-426614174000)
last_restore_idstringBackup_id of the most recent restore initiated against this instance. Empty if no restore has ever been triggered. Lets callers recover the identifier of an in-flight or last-completed restore without having to retain the RestoreBackupResponse themselves. Use it with GetRestoreStatus to fetch the live status. (example: 123e4567-e89b-12d3-a456-426614174000)
project_idstringProject this database belongs to. (example: 123e4567-e89b-12d3-a456-426614174000)
configobjectVectorDBConfig holds optional, advanced cluster settings.
created_atstring (date-time) (example: 2023-01-01T00:00:00Z)
endpointsobjectVectorDBEndpoints contains the connection endpoints for a vector database instance.
owner_uuidstring (example: 123e4567-e89b-12d3-a456-426614174000)
regionstring (example: tor1)
sizestringResource tier: small, medium, or large. (example: example string)
statusstringLifecycle state: pending, creating, active, errored, or deleting. (example: example string)
tagsarray
updated_atstring (date-time) (example: 2023-01-01T00:00:00Z)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
vector_databases_getselectidTo show information about an existing vector database, send a GET request to /v2/vector-databases/{id}. The response body contains a JSON object with a vector_db key holding the standard vector database attributes, including an embedded endpoints object with the connection information needed to access the database.
vector_databases_listselectpage, per_pageTo list all of the vector databases on your account, send a GET request to /v2/vector-databases. Use the page and per_page query parameters to paginate the results. The response body contains a vector_dbs array of vector database objects and a total field with the overall count.
vector_databases_createinsertTo create a vector database, send a POST request to /v2/vector-databases. The response body contains a JSON object with a vector_db key holding the newly created database. Its initial status is creating and changes to active once the database is ready to receive traffic.
vector_databases_updatereplaceidTo update an existing vector database, send a PUT request to /v2/vector-databases/{id}. The response body contains a JSON object with a vector_db key holding the updated vector database.
vector_databases_deletedeleteidTo delete a vector database, send a DELETE request to /v2/vector-databases/{id}. Deleting a vector database is irreversible and destroys the underlying instance along with its data.
vector_databases_post_resizeexecidTo resize a vector database, send a POST request to /v2/vector-databases/{id}/resize. This changes the database's resource tier. The response body contains a JSON object with the updated vector database.
vector_databases_update_tagsexecidTo update the tags on a vector database, send a PUT request to /v2/vector-databases/{id}/tags. The supplied set of tags replaces the database's existing tags.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
idstringRequired. ID of the vector database to update tags for. (example: "example string")
pageinteger (example: 1)
per_pageinteger (example: 1)

SELECT examples

To show information about an existing vector database, send a GET request to /v2/vector-databases/{id}. The response body contains a JSON object with a vector_db key holding the standard vector database attributes, including an embedded endpoints object with the connection information needed to access the database.

SELECT
id,
name,
forked_from_id,
last_restore_id,
project_id,
config,
created_at,
endpoints,
owner_uuid,
region,
size,
status,
tags,
updated_at
FROM digitalocean.databases.vector_databases
WHERE id = '{{ id }}' -- required
;

INSERT examples

To create a vector database, send a POST request to /v2/vector-databases. The response body contains a JSON object with a vector_db key holding the newly created database. Its initial status is creating and changes to active once the database is ready to receive traffic.

INSERT INTO digitalocean.databases.vector_databases (
name,
project_id,
region,
size,
tags
)
SELECT
'{{ name }}',
'{{ project_id }}',
'{{ region }}',
'{{ size }}',
'{{ tags }}'
RETURNING
vector_db
;

REPLACE examples

To update an existing vector database, send a PUT request to /v2/vector-databases/{id}. The response body contains a JSON object with a vector_db key holding the updated vector database.

REPLACE digitalocean.databases.vector_databases
SET
config = '{{ config }}',
id = '{{ id }}',
project_id = '{{ project_id }}'
WHERE
id = '{{ id }}' --required
RETURNING
vector_db;

DELETE examples

To delete a vector database, send a DELETE request to /v2/vector-databases/{id}. Deleting a vector database is irreversible and destroys the underlying instance along with its data.

DELETE FROM digitalocean.databases.vector_databases
WHERE id = '{{ id }}' --required
;

Lifecycle Methods

To resize a vector database, send a POST request to /v2/vector-databases/{id}/resize. This changes the database's resource tier. The response body contains a JSON object with the updated vector database.

EXEC digitalocean.databases.vector_databases.vector_databases_post_resize
@id='{{ id }}' --required
@@json=
'{
"id": "{{ id }}",
"size": "{{ size }}"
}'
;