diff --git a/specification/DigitalOcean-public.v2.yaml b/specification/DigitalOcean-public.v2.yaml index e2af692d3..a560078b1 100644 --- a/specification/DigitalOcean-public.v2.yaml +++ b/specification/DigitalOcean-public.v2.yaml @@ -583,6 +583,13 @@ tags: To interact with Uptime, you will generally send requests to the Uptime endpoint at `/v2/uptime/`. + - name: Vector Databases + description: |- + Vector DB provides APIs for provisioning and managing vector database instances + on DigitalOcean. By sending requests to the `/v2/vector-databases` endpoint, + you can list, create, update, resize, and delete vector database instances, + manage tags, retrieve admin credentials, and work with backups and restores. + - name: "VPC NAT Gateways" description: |- [VPC NAT Gateways](https://docs.digitalocean.com/products/networking/vpc/how-to/create-nat-gateway/) @@ -698,6 +705,7 @@ x-tagGroups: - SSH Keys - Tags - Uptime + - Vector Databases - VPC NAT Gateways - VPC Peerings - VPCs @@ -2339,6 +2347,42 @@ paths: delete: $ref: "resources/tags/tags_unassign_resources.yml" + /v2/vector-databases: + get: + $ref: "resources/vector_databases/vector_databases_list.yml" + post: + $ref: "resources/vector_databases/vector_databases_create.yml" + + /v2/vector-databases/{id}: + get: + $ref: "resources/vector_databases/vector_databases_get.yml" + put: + $ref: "resources/vector_databases/vector_databases_update.yml" + delete: + $ref: "resources/vector_databases/vector_databases_delete.yml" + + /v2/vector-databases/{id}/backups: + get: + $ref: "resources/vector_databases/vector_databases_list_backups.yml" + + /v2/vector-databases/{id}/backups/{backup_id}/restore: + get: + $ref: "resources/vector_databases/vector_databases_get_restore_status.yml" + post: + $ref: "resources/vector_databases/vector_databases_restore_backup.yml" + + /v2/vector-databases/{id}/credentials: + get: + $ref: "resources/vector_databases/vector_databases_get_credentials.yml" + + /v2/vector-databases/{id}/resize: + post: + $ref: "resources/vector_databases/vector_databases_resize.yml" + + /v2/vector-databases/{id}/tags: + put: + $ref: "resources/vector_databases/vector_databases_update_tags.yml" + /v2/volumes: get: $ref: "resources/volumes/volumes_list.yml" diff --git a/specification/resources/vector_databases/definitions.yml b/specification/resources/vector_databases/definitions.yml new file mode 100644 index 000000000..7a146ba95 --- /dev/null +++ b/specification/resources/vector_databases/definitions.yml @@ -0,0 +1,420 @@ +vectordbBackup: + description: Backup represents a single backup of a vector database. + properties: + backup_id: + description: Unique identifier for the backup (e.g., "vectordb-{uuid}-20240101-120000"). + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + completed_at: + description: Timestamp when the backup process completed. + example: "2023-01-01T00:00:00Z" + format: date-time + type: string + started_at: + description: Timestamp when the backup process started. + example: "2023-01-01T00:00:00Z" + format: date-time + type: string + status: + description: 'Status of the backup: SUCCESS.' + example: example string + type: string + type: object +vectordbCreateBackupResponse: + properties: + backup_id: + description: The generated backup ID (e.g., "vectordb-{uuid}-{timestamp}"). + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + status: + description: Initial status of the backup operation (e.g., "STARTED"). + example: example string + type: string + type: object +vectordbCreateVectorDBRequest: + properties: + name: + description: Required. Human-readable name for the database. + example: example name + type: string + project_id: + description: Required. ID of the project to create the vector database in. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + region: + description: Required. Region slug where the database will be provisioned. + example: tor1 + type: string + size: + description: 'Required. Resource tier: small, medium, or large.' + example: example string + type: string + tags: + description: A set of arbitrary tags to organize your vector database + example: + - example string + items: + example: example string + type: string + type: array + type: object +vectordbCreateVectorDBResponse: + properties: + vector_db: + $ref: '#/vectordbVectorDB' + type: object +vectordbDeleteVectorDBResponse: + type: object +vectordbForkBackupMode: + default: FORK_BACKUP_MODE_UNSPECIFIED + description: |- + ForkBackupMode selects how ForkVectorDB obtains the backup it restores + onto the new instance. + + - FORK_BACKUP_MODE_UNSPECIFIED: Default; rejected by the API. Callers must pick one of the modes below + explicitly so behaviour is never inferred from a missing value. + - USE_BACKUP_ID: Restore from the backup_id supplied in the request. The backup must + belong to the source instance and have completed successfully. + - LATEST_SUCCESS: Restore from the most recent successful backup of the source instance. + Fastest path because it skips taking a new backup; backup_id is ignored. + - FRESH_BACKUP: Trigger a new backup on the source instance and restore from it once + it completes. The intermediate backup is deleted after the fork + succeeds; backup_id is ignored. + enum: + - FORK_BACKUP_MODE_UNSPECIFIED + - USE_BACKUP_ID + - LATEST_SUCCESS + - FRESH_BACKUP + example: FORK_BACKUP_MODE_UNSPECIFIED + type: string +vectordbForkVectorDBRequest: + properties: + backup_id: + description: |- + Required when backup_mode = USE_BACKUP_ID. Ignored otherwise. + Must reference a SUCCESS backup belonging to the source instance. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + backup_mode: + $ref: '#/vectordbForkBackupMode' + id: + description: Required. ID of the source vector database to fork from (path parameter). + example: example string + type: string + name: + description: |- + Required. Human-readable name for the new (forked) database. + Must be unique within the owner. + example: example name + type: string + project_id: + description: Required. ID of the project the forked database will be created + in. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + region: + description: |- + Required. Region slug where the forked database will be provisioned. + May differ from the source region. + example: tor1 + type: string + size: + description: 'Required. Resource tier for the forked database: small, medium, + or large.' + example: example string + type: string + tags: + description: |- + Optional. Tags to apply to the forked database. Tags are not inherited + from the source instance. + example: + - example string + items: + example: example string + type: string + type: array + type: object +vectordbForkVectorDBResponse: + properties: + vector_db: + $ref: '#/vectordbVectorDB' + type: object +vectordbGetRestoreStatusResponse: + properties: + backup_id: + description: The backup ID being restored. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + error: + description: Error message if the restore failed. + example: example string + type: string + status: + description: 'Current status: STARTED, TRANSFERRING, TRANSFERRED, FINALIZING, + SUCCESS, FAILED, CANCELLING, CANCELED.' + example: example string + type: string + type: object +vectordbGetVectorDBAdminCredentialsResponse: + properties: + api_token: + description: API token for that user. + example: example string + type: string + user_id: + description: Database user id from the cluster secret (opaque; matches what + was provisioned). + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + type: object +vectordbGetVectorDBResponse: + properties: + vector_db: + $ref: '#/vectordbVectorDB' + type: object +vectordbListBackupsResponse: + properties: + backups: + description: List of available backups. + items: + $ref: '#/vectordbBackup' + type: array + type: object +vectordbListPlansResponse: + properties: + plans: + items: + $ref: '#/vectordbVectorDBPlan' + type: array + type: object +vectordbListVectorDBsResponse: + properties: + total: + example: 123 + format: int64 + type: integer + vector_dbs: + items: + $ref: '#/vectordbVectorDB' + type: array + type: object +vectordbResizeVectorDBRequest: + properties: + id: + description: Required. ID of the vector database to resize. + example: example string + type: string + size: + description: 'Required. Target resource tier: small, medium, or large.' + example: example string + type: string + type: object +vectordbResizeVectorDBResponse: + properties: + vector_db: + $ref: '#/vectordbVectorDB' + type: object +vectordbRestoreBackupRequest: + properties: + backup_id: + description: Required. ID of the backup to restore from. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + id: + description: Required. ID of the vector database. + example: example string + type: string + type: object +vectordbRestoreBackupResponse: + properties: + backup_id: + description: The backup ID being restored. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + status: + description: Initial status of the restore operation (e.g., "STARTED"). + example: example string + type: string + type: object +vectordbRotateVectorDBUserCredentialsRequest: + properties: + id: + description: Required. ID of the vector database whose user API key should be + rotated. + example: example string + type: string + user: + description: |- + Required. Database user id whose API key should be rotated + (e.g. "do-admin"). Must be 1-63 chars, [A-Za-z0-9_-]; the server + validates this independently of any path routing. + example: example string + type: string + type: object +vectordbUpdateVectorDBRequest: + properties: + config: + $ref: '#/vectordbVectorDBConfig' + id: + description: ID of the vector database. + example: example string + type: string + project_id: + description: Optional. New project UUID to assign the database to. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + type: object +vectordbUpdateVectorDBResponse: + properties: + vector_db: + $ref: '#/vectordbVectorDB' + type: object +vectordbUpdateVectorDBTagsRequest: + properties: + id: + description: Required. ID of the vector database to update tags for. + example: example string + type: string + tags: + description: Tags to set on the vector database. Replaces all existing tags. + example: + - example string + items: + example: example string + type: string + type: array + type: object +vectordbUpdateVectorDBTagsResponse: + properties: + vector_db: + $ref: '#/vectordbVectorDB' + type: object +vectordbVectorDB: + description: VectorDB represents a provisioned vector database instance. + properties: + config: + $ref: '#/vectordbVectorDBConfig' + created_at: + example: "2023-01-01T00:00:00Z" + format: date-time + type: string + endpoints: + $ref: '#/vectordbVectorDBEndpoints' + forked_from_id: + description: |- + ID 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 + type: string + id: + example: example string + type: string + last_restore_id: + description: |- + Backup_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 + type: string + name: + example: example name + type: string + owner_uuid: + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + project_id: + description: Project this database belongs to. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + region: + example: tor1 + type: string + size: + description: 'Resource tier: small, medium, or large.' + example: example string + type: string + status: + description: 'Lifecycle state: pending, creating, active, errored, or deleting.' + example: example string + type: string + tags: + example: + - example string + items: + example: example string + type: string + type: array + updated_at: + example: "2023-01-01T00:00:00Z" + format: date-time + type: string + type: object +vectordbVectorDBConfig: + description: VectorDBConfig holds optional, advanced cluster settings. + properties: + default_quantization: + description: 'Default vector compression for new collections: rq, pq, bq, or + sq. Empty means platform default (rq).' + example: example string + type: string + enable_auto_schema: + example: true + type: boolean + weaviate_version: + description: The Vector Database version running on the cluster. + example: example string + type: string + type: object +vectordbVectorDBEndpoints: + description: VectorDBEndpoints contains the connection endpoints for a vector database + instance. + properties: + grpc: + description: Endpoint for gRPC connections (e.g. "my-db-tor1-a1b2c3d4-grpc.weaviate.ondigitalocean.com:443"). + example: my-db-tor1-a1b2c3d4-grpc.weaviate.ondigitalocean.com:443 + type: string + http: + description: Endpoint for HTTPS connections (e.g. "https://my-db-tor1-a1b2c3d4.weaviate.ondigitalocean.com"). + example: https://my-db-tor1-a1b2c3d4.weaviate.ondigitalocean.com + type: string + type: object +vectordbVectorDBPlan: + properties: + deprecated: + example: true + type: boolean + disk_mib: + example: 123 + format: int64 + type: integer + enabled_regions: + description: |- + Regions where this plan can be provisioned. An empty list means the + plan is not currently offered anywhere. + example: + - tor1 + items: + example: example string + type: string + type: array + hourly_price: + example: example string + type: string + monthly_price: + example: example string + type: string + size: + example: example string + type: string + usable_memory_mib: + example: 123 + format: int64 + type: integer + vcpu: + example: 123 + format: int64 + type: integer + type: object diff --git a/specification/resources/vector_databases/examples/curl/vector_databases_create.yml b/specification/resources/vector_databases/examples/curl/vector_databases_create.yml new file mode 100644 index 000000000..678633c8c --- /dev/null +++ b/specification/resources/vector_databases/examples/curl/vector_databases_create.yml @@ -0,0 +1,7 @@ +lang: cURL +source: |- + curl -X POST \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ + -d '{"name": "my-vector-db", "region": "tor1", "size": "medium", "tags": ["production"], "project_id": "84e1e297-0000-0000-0000-1067cf2206e9"}' \ + "https://api.digitalocean.com/v2/vector-databases" diff --git a/specification/resources/vector_databases/examples/curl/vector_databases_delete.yml b/specification/resources/vector_databases/examples/curl/vector_databases_delete.yml new file mode 100644 index 000000000..38ba93053 --- /dev/null +++ b/specification/resources/vector_databases/examples/curl/vector_databases_delete.yml @@ -0,0 +1,6 @@ +lang: cURL +source: |- + curl -X DELETE \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ + "https://api.digitalocean.com/v2/vector-databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30" diff --git a/specification/resources/vector_databases/examples/curl/vector_databases_get.yml b/specification/resources/vector_databases/examples/curl/vector_databases_get.yml new file mode 100644 index 000000000..a821970a5 --- /dev/null +++ b/specification/resources/vector_databases/examples/curl/vector_databases_get.yml @@ -0,0 +1,6 @@ +lang: cURL +source: |- + curl -X GET \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ + "https://api.digitalocean.com/v2/vector-databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30" diff --git a/specification/resources/vector_databases/examples/curl/vector_databases_get_credentials.yml b/specification/resources/vector_databases/examples/curl/vector_databases_get_credentials.yml new file mode 100644 index 000000000..a61de28eb --- /dev/null +++ b/specification/resources/vector_databases/examples/curl/vector_databases_get_credentials.yml @@ -0,0 +1,6 @@ +lang: cURL +source: |- + curl -X GET \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ + "https://api.digitalocean.com/v2/vector-databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/credentials" diff --git a/specification/resources/vector_databases/examples/curl/vector_databases_get_restore_status.yml b/specification/resources/vector_databases/examples/curl/vector_databases_get_restore_status.yml new file mode 100644 index 000000000..087a0cc57 --- /dev/null +++ b/specification/resources/vector_databases/examples/curl/vector_databases_get_restore_status.yml @@ -0,0 +1,6 @@ +lang: cURL +source: |- + curl -X GET \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ + "https://api.digitalocean.com/v2/vector-databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/backups/vectordb-9cc10173-e9ea-4176-9dbc-a4cee4c4ff30-20240101-120000/restore" diff --git a/specification/resources/vector_databases/examples/curl/vector_databases_list.yml b/specification/resources/vector_databases/examples/curl/vector_databases_list.yml new file mode 100644 index 000000000..4bd23bdc6 --- /dev/null +++ b/specification/resources/vector_databases/examples/curl/vector_databases_list.yml @@ -0,0 +1,6 @@ +lang: cURL +source: |- + curl -X GET \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ + "https://api.digitalocean.com/v2/vector-databases?page=1&per_page=20" diff --git a/specification/resources/vector_databases/examples/curl/vector_databases_list_backups.yml b/specification/resources/vector_databases/examples/curl/vector_databases_list_backups.yml new file mode 100644 index 000000000..659748dab --- /dev/null +++ b/specification/resources/vector_databases/examples/curl/vector_databases_list_backups.yml @@ -0,0 +1,6 @@ +lang: cURL +source: |- + curl -X GET \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ + "https://api.digitalocean.com/v2/vector-databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/backups" diff --git a/specification/resources/vector_databases/examples/curl/vector_databases_resize.yml b/specification/resources/vector_databases/examples/curl/vector_databases_resize.yml new file mode 100644 index 000000000..fb1fe5d47 --- /dev/null +++ b/specification/resources/vector_databases/examples/curl/vector_databases_resize.yml @@ -0,0 +1,7 @@ +lang: cURL +source: |- + curl -X POST \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ + -d '{"size": "large"}' \ + "https://api.digitalocean.com/v2/vector-databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/resize" diff --git a/specification/resources/vector_databases/examples/curl/vector_databases_restore_backup.yml b/specification/resources/vector_databases/examples/curl/vector_databases_restore_backup.yml new file mode 100644 index 000000000..738cc673e --- /dev/null +++ b/specification/resources/vector_databases/examples/curl/vector_databases_restore_backup.yml @@ -0,0 +1,7 @@ +lang: cURL +source: |- + curl -X POST \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ + -d '{"id": "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "backup_id": "vectordb-9cc10173-e9ea-4176-9dbc-a4cee4c4ff30-20240101-120000"}' \ + "https://api.digitalocean.com/v2/vector-databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/backups/vectordb-9cc10173-e9ea-4176-9dbc-a4cee4c4ff30-20240101-120000/restore" diff --git a/specification/resources/vector_databases/examples/curl/vector_databases_update.yml b/specification/resources/vector_databases/examples/curl/vector_databases_update.yml new file mode 100644 index 000000000..c088ea045 --- /dev/null +++ b/specification/resources/vector_databases/examples/curl/vector_databases_update.yml @@ -0,0 +1,7 @@ +lang: cURL +source: |- + curl -X PUT \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ + -d '{"id": "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "config": {"default_quantization": "rq", "enable_auto_schema": true, "weaviate_version": ""}}' \ + "https://api.digitalocean.com/v2/vector-databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30" diff --git a/specification/resources/vector_databases/examples/curl/vector_databases_update_tags.yml b/specification/resources/vector_databases/examples/curl/vector_databases_update_tags.yml new file mode 100644 index 000000000..3783bd851 --- /dev/null +++ b/specification/resources/vector_databases/examples/curl/vector_databases_update_tags.yml @@ -0,0 +1,7 @@ +lang: cURL +source: |- + curl -X PUT \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ + -d '{"tags": ["production", "staging"]}' \ + "https://api.digitalocean.com/v2/vector-databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/tags" diff --git a/specification/resources/vector_databases/vector_databases_create.yml b/specification/resources/vector_databases/vector_databases_create.yml new file mode 100644 index 000000000..6acdf87b8 --- /dev/null +++ b/specification/resources/vector_databases/vector_databases_create.yml @@ -0,0 +1,42 @@ +description: 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. +operationId: vectorDatabases_create +requestBody: + content: + application/json: + schema: + $ref: ./definitions.yml#/vectordbCreateVectorDBRequest +responses: + "201": + content: + application/json: + schema: + $ref: ./definitions.yml#/vectordbCreateVectorDBResponse + description: A successful response. + headers: + ratelimit-limit: + $ref: ../../shared/headers.yml#/ratelimit-limit + ratelimit-remaining: + $ref: ../../shared/headers.yml#/ratelimit-remaining + ratelimit-reset: + $ref: ../../shared/headers.yml#/ratelimit-reset + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml +security: +- bearer_auth: + - database:create +summary: Create a New Vector Database +tags: +- Vector Databases +x-codeSamples: +- $ref: examples/curl/vector_databases_create.yml diff --git a/specification/resources/vector_databases/vector_databases_delete.yml b/specification/resources/vector_databases/vector_databases_delete.yml new file mode 100644 index 000000000..a16e195b5 --- /dev/null +++ b/specification/resources/vector_databases/vector_databases_delete.yml @@ -0,0 +1,40 @@ +description: 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. +operationId: vectorDatabases_delete +parameters: +- description: ID of the vector database. + example: '"example string"' + in: path + name: id + required: true + schema: + type: string +responses: + "204": + description: A successful response. + headers: + ratelimit-limit: + $ref: ../../shared/headers.yml#/ratelimit-limit + ratelimit-remaining: + $ref: ../../shared/headers.yml#/ratelimit-remaining + ratelimit-reset: + $ref: ../../shared/headers.yml#/ratelimit-reset + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml +security: +- bearer_auth: + - database:delete +summary: Delete a Vector Database +tags: +- Vector Databases +x-codeSamples: +- $ref: examples/curl/vector_databases_delete.yml diff --git a/specification/resources/vector_databases/vector_databases_get.yml b/specification/resources/vector_databases/vector_databases_get.yml new file mode 100644 index 000000000..3e67f6842 --- /dev/null +++ b/specification/resources/vector_databases/vector_databases_get.yml @@ -0,0 +1,45 @@ +description: 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. +operationId: vectorDatabases_get +parameters: +- description: ID of the vector database. + example: '"example string"' + in: path + name: id + required: true + schema: + type: string +responses: + "200": + content: + application/json: + schema: + $ref: ./definitions.yml#/vectordbGetVectorDBResponse + description: A successful response. + headers: + ratelimit-limit: + $ref: ../../shared/headers.yml#/ratelimit-limit + ratelimit-remaining: + $ref: ../../shared/headers.yml#/ratelimit-remaining + ratelimit-reset: + $ref: ../../shared/headers.yml#/ratelimit-reset + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml +security: +- bearer_auth: + - database:read +summary: Retrieve an Existing Vector Database +tags: +- Vector Databases +x-codeSamples: +- $ref: examples/curl/vector_databases_get.yml diff --git a/specification/resources/vector_databases/vector_databases_get_credentials.yml b/specification/resources/vector_databases/vector_databases_get_credentials.yml new file mode 100644 index 000000000..8af61b51c --- /dev/null +++ b/specification/resources/vector_databases/vector_databases_get_credentials.yml @@ -0,0 +1,44 @@ +description: To retrieve the admin credentials for a vector database, send a GET request + to `/v2/vector-databases/{id}/credentials`. The response body contains the `user_id` + and `api_token` for the admin user provisioned on the cluster. +operationId: vectorDatabases_get_credentials +parameters: +- description: ID of the vector database. + example: '"example string"' + in: path + name: id + required: true + schema: + type: string +responses: + "200": + content: + application/json: + schema: + $ref: ./definitions.yml#/vectordbGetVectorDBAdminCredentialsResponse + description: A successful response. + headers: + ratelimit-limit: + $ref: ../../shared/headers.yml#/ratelimit-limit + ratelimit-remaining: + $ref: ../../shared/headers.yml#/ratelimit-remaining + ratelimit-reset: + $ref: ../../shared/headers.yml#/ratelimit-reset + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml +security: +- bearer_auth: + - database:view_credentials +summary: Retrieve Admin Credentials for a Vector Database +tags: +- Vector Databases +x-codeSamples: +- $ref: examples/curl/vector_databases_get_credentials.yml diff --git a/specification/resources/vector_databases/vector_databases_get_restore_status.yml b/specification/resources/vector_databases/vector_databases_get_restore_status.yml new file mode 100644 index 000000000..98bf777a8 --- /dev/null +++ b/specification/resources/vector_databases/vector_databases_get_restore_status.yml @@ -0,0 +1,50 @@ +description: To check the status of a restore operation, send a GET request to `/v2/vector-databases/{id}/backups/{backup_id}/restore`. + The response body contains the current status of the restore. +operationId: vectorDatabases_get_restore_status +parameters: +- description: Required. ID of the vector database. + example: '"example string"' + in: path + name: id + required: true + schema: + type: string +- description: Required. ID of the backup being restored. + example: '"example string"' + in: path + name: backup_id + required: true + schema: + type: string +responses: + "200": + content: + application/json: + schema: + $ref: ./definitions.yml#/vectordbGetRestoreStatusResponse + description: A successful response. + headers: + ratelimit-limit: + $ref: ../../shared/headers.yml#/ratelimit-limit + ratelimit-remaining: + $ref: ../../shared/headers.yml#/ratelimit-remaining + ratelimit-reset: + $ref: ../../shared/headers.yml#/ratelimit-reset + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml +security: +- bearer_auth: + - database:read +summary: Retrieve the Status of a Restore +tags: +- Vector Databases +x-codeSamples: +- $ref: examples/curl/vector_databases_get_restore_status.yml diff --git a/specification/resources/vector_databases/vector_databases_list.yml b/specification/resources/vector_databases/vector_databases_list.yml new file mode 100644 index 000000000..f0e8be305 --- /dev/null +++ b/specification/resources/vector_databases/vector_databases_list.yml @@ -0,0 +1,48 @@ +description: To 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. +operationId: vectorDatabases_list +parameters: +- example: 1 + in: query + name: page + schema: + type: integer +- example: 1 + in: query + name: per_page + schema: + type: integer +responses: + "200": + content: + application/json: + schema: + $ref: ./definitions.yml#/vectordbListVectorDBsResponse + description: A successful response. + headers: + ratelimit-limit: + $ref: ../../shared/headers.yml#/ratelimit-limit + ratelimit-remaining: + $ref: ../../shared/headers.yml#/ratelimit-remaining + ratelimit-reset: + $ref: ../../shared/headers.yml#/ratelimit-reset + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml +security: +- bearer_auth: + - database:read +summary: List All Vector Databases +tags: +- Vector Databases +x-codeSamples: +- $ref: examples/curl/vector_databases_list.yml diff --git a/specification/resources/vector_databases/vector_databases_list_backups.yml b/specification/resources/vector_databases/vector_databases_list_backups.yml new file mode 100644 index 000000000..d94734e31 --- /dev/null +++ b/specification/resources/vector_databases/vector_databases_list_backups.yml @@ -0,0 +1,44 @@ +description: To list the available backups for a vector database, send a GET request + to `/v2/vector-databases/{id}/backups`. Only backups with a status of `SUCCESS` + are returned. +operationId: vectorDatabases_list_backups +parameters: +- description: Required. ID of the vector database. + example: '"example string"' + in: path + name: id + required: true + schema: + type: string +responses: + "200": + content: + application/json: + schema: + $ref: ./definitions.yml#/vectordbListBackupsResponse + description: A successful response. + headers: + ratelimit-limit: + $ref: ../../shared/headers.yml#/ratelimit-limit + ratelimit-remaining: + $ref: ../../shared/headers.yml#/ratelimit-remaining + ratelimit-reset: + $ref: ../../shared/headers.yml#/ratelimit-reset + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml +security: +- bearer_auth: + - database:read +summary: List Backups for a Vector Database +tags: +- Vector Databases +x-codeSamples: +- $ref: examples/curl/vector_databases_list_backups.yml diff --git a/specification/resources/vector_databases/vector_databases_resize.yml b/specification/resources/vector_databases/vector_databases_resize.yml new file mode 100644 index 000000000..e4169ef37 --- /dev/null +++ b/specification/resources/vector_databases/vector_databases_resize.yml @@ -0,0 +1,49 @@ +description: 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. +operationId: vectorDatabases_post_resize +parameters: +- description: Required. ID of the vector database to resize. + example: '"example string"' + in: path + name: id + required: true + schema: + type: string +requestBody: + content: + application/json: + schema: + $ref: ./definitions.yml#/vectordbResizeVectorDBRequest +responses: + "200": + content: + application/json: + schema: + $ref: ./definitions.yml#/vectordbResizeVectorDBResponse + description: A successful response. + headers: + ratelimit-limit: + $ref: ../../shared/headers.yml#/ratelimit-limit + ratelimit-remaining: + $ref: ../../shared/headers.yml#/ratelimit-remaining + ratelimit-reset: + $ref: ../../shared/headers.yml#/ratelimit-reset + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml +security: +- bearer_auth: + - database:update +summary: Resize a Vector Database +tags: +- Vector Databases +x-codeSamples: +- $ref: examples/curl/vector_databases_resize.yml diff --git a/specification/resources/vector_databases/vector_databases_restore_backup.yml b/specification/resources/vector_databases/vector_databases_restore_backup.yml new file mode 100644 index 000000000..53ff148a3 --- /dev/null +++ b/specification/resources/vector_databases/vector_databases_restore_backup.yml @@ -0,0 +1,56 @@ +description: To restore a vector database from a backup, send a POST request to `/v2/vector-databases/{id}/backups/{backup_id}/restore`. + The restore runs asynchronously; use the restore-status endpoint to monitor its + progress. +operationId: vectorDatabases_post_restore_backup +parameters: +- description: Required. ID of the vector database. + example: '"example string"' + in: path + name: id + required: true + schema: + type: string +- description: Required. ID of the backup to restore from. + example: '"example string"' + in: path + name: backup_id + required: true + schema: + type: string +requestBody: + content: + application/json: + schema: + $ref: ./definitions.yml#/vectordbRestoreBackupRequest +responses: + "200": + content: + application/json: + schema: + $ref: ./definitions.yml#/vectordbRestoreBackupResponse + description: A successful response. + headers: + ratelimit-limit: + $ref: ../../shared/headers.yml#/ratelimit-limit + ratelimit-remaining: + $ref: ../../shared/headers.yml#/ratelimit-remaining + ratelimit-reset: + $ref: ../../shared/headers.yml#/ratelimit-reset + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml +security: +- bearer_auth: + - database:update +summary: Restore a Vector Database from a Backup +tags: +- Vector Databases +x-codeSamples: +- $ref: examples/curl/vector_databases_restore_backup.yml diff --git a/specification/resources/vector_databases/vector_databases_update.yml b/specification/resources/vector_databases/vector_databases_update.yml new file mode 100644 index 000000000..ac5341b77 --- /dev/null +++ b/specification/resources/vector_databases/vector_databases_update.yml @@ -0,0 +1,49 @@ +description: 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. +operationId: vectorDatabases_update +parameters: +- description: ID of the vector database. + example: '"example string"' + in: path + name: id + required: true + schema: + type: string +requestBody: + content: + application/json: + schema: + $ref: ./definitions.yml#/vectordbUpdateVectorDBRequest +responses: + "200": + content: + application/json: + schema: + $ref: ./definitions.yml#/vectordbUpdateVectorDBResponse + description: A successful response. + headers: + ratelimit-limit: + $ref: ../../shared/headers.yml#/ratelimit-limit + ratelimit-remaining: + $ref: ../../shared/headers.yml#/ratelimit-remaining + ratelimit-reset: + $ref: ../../shared/headers.yml#/ratelimit-reset + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml +security: +- bearer_auth: + - database:update +summary: Update a Vector Database +tags: +- Vector Databases +x-codeSamples: +- $ref: examples/curl/vector_databases_update.yml diff --git a/specification/resources/vector_databases/vector_databases_update_tags.yml b/specification/resources/vector_databases/vector_databases_update_tags.yml new file mode 100644 index 000000000..e801e648b --- /dev/null +++ b/specification/resources/vector_databases/vector_databases_update_tags.yml @@ -0,0 +1,48 @@ +description: To 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. +operationId: vectorDatabases_update_tags +parameters: +- description: Required. ID of the vector database to update tags for. + example: '"example string"' + in: path + name: id + required: true + schema: + type: string +requestBody: + content: + application/json: + schema: + $ref: ./definitions.yml#/vectordbUpdateVectorDBTagsRequest +responses: + "200": + content: + application/json: + schema: + $ref: ./definitions.yml#/vectordbUpdateVectorDBTagsResponse + description: A successful response. + headers: + ratelimit-limit: + $ref: ../../shared/headers.yml#/ratelimit-limit + ratelimit-remaining: + $ref: ../../shared/headers.yml#/ratelimit-remaining + ratelimit-reset: + $ref: ../../shared/headers.yml#/ratelimit-reset + "401": + $ref: ../../shared/responses/unauthorized.yml + "404": + $ref: ../../shared/responses/not_found.yml + "429": + $ref: ../../shared/responses/too_many_requests.yml + "500": + $ref: ../../shared/responses/server_error.yml + default: + $ref: ../../shared/responses/unexpected_error.yml +security: +- bearer_auth: + - database:update +summary: Update Tags on a Vector Database +tags: +- Vector Databases +x-codeSamples: +- $ref: examples/curl/vector_databases_update_tags.yml