-
Notifications
You must be signed in to change notification settings - Fork 150
Add Vector Databases API spec for public preview #1181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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": "nyc3", "size": "medium", "tags": ["production"]}' \ | ||
| "https://api.digitalocean.com/v2/vector-databases" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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": "1.24.0"}}' \ | ||
| "https://api.digitalocean.com/v2/vector-databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| type: object | ||
|
|
||
| description: VectorDB represents a provisioned vector database instance. | ||
|
|
||
| properties: | ||
| id: | ||
| type: string | ||
| example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 | ||
| description: A unique ID that can be used to identify and reference a vector database. | ||
| readOnly: true | ||
| name: | ||
| type: string | ||
| example: my-vector-db | ||
| description: A unique, human-readable name referring to a vector database. | ||
| region: | ||
| type: string | ||
| example: nyc3 | ||
| description: The slug identifier for the region where the vector database is located. | ||
| owner_uuid: | ||
| type: string | ||
| example: 8b3b4c5d-6e7f-8901-a234-567890bcdef0 | ||
| description: The UUID of the account that owns the vector database. | ||
| readOnly: true | ||
| status: | ||
| type: string | ||
| enum: | ||
| - pending | ||
| - creating | ||
| - active | ||
| - errored | ||
| - deleting | ||
| example: active | ||
| description: 'Lifecycle state: pending, creating, active, errored, or deleting.' | ||
| readOnly: true | ||
| config: | ||
| allOf: | ||
| - $ref: './vector_database_config.yml' | ||
| description: Advanced configuration. | ||
| created_at: | ||
| type: string | ||
| format: date-time | ||
| example: '2024-01-11T18:37:36Z' | ||
| description: >- | ||
| A time value given in ISO8601 combined date and time format that represents | ||
| when the vector database was created. | ||
| readOnly: true | ||
| updated_at: | ||
| type: string | ||
| format: date-time | ||
| example: '2024-01-11T18:37:36Z' | ||
| description: >- | ||
| A time value given in ISO8601 combined date and time format that represents | ||
| when the vector database was last updated. | ||
| readOnly: true | ||
| endpoints: | ||
| allOf: | ||
| - $ref: './vector_database_endpoints.yml' | ||
| description: Connection endpoints for the database instance. | ||
| readOnly: true | ||
| size: | ||
| type: string | ||
| enum: | ||
| - small | ||
| - medium | ||
| - large | ||
| example: medium | ||
| description: 'Resource tier: small, medium, or large.' | ||
| tags: | ||
| type: array | ||
| items: | ||
| type: string | ||
| example: | ||
| - production | ||
| nullable: true | ||
| description: >- | ||
| An array of tags (as strings) to organize your vector database. | ||
| <br><br>Requires `tag:create` scope. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| type: object | ||
|
|
||
| description: Backup represents a single backup of a vector database. | ||
|
|
||
| properties: | ||
| backup_id: | ||
| type: string | ||
| example: vectordb-9cc10173-e9ea-4176-9dbc-a4cee4c4ff30-20240101-120000 | ||
| description: >- | ||
| Unique identifier for the backup (e.g., "vectordb-{uuid}-20240101-120000"). | ||
| status: | ||
| type: string | ||
| example: SUCCESS | ||
| description: 'Status of the backup: SUCCESS.' | ||
| started_at: | ||
| type: string | ||
| format: date-time | ||
| example: '2024-01-01T12:00:00Z' | ||
| description: Timestamp when the backup process started. | ||
| completed_at: | ||
| type: string | ||
| format: date-time | ||
| example: '2024-01-01T12:05:00Z' | ||
| description: Timestamp when the backup process completed. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| type: object | ||
|
|
||
| description: VectorDBConfig holds optional, advanced cluster settings. | ||
|
|
||
| properties: | ||
| default_quantization: | ||
| type: string | ||
| enum: | ||
| - rq | ||
| - pq | ||
| - bq | ||
| - sq | ||
| example: rq | ||
| description: >- | ||
| Default vector compression for new collections: rq, pq, bq, or sq. Empty | ||
| means platform default (rq). | ||
| enable_auto_schema: | ||
| type: boolean | ||
| example: true | ||
| description: Whether to enable automatic schema creation for new collections. | ||
| weaviate_version: | ||
| type: string | ||
| example: '1.24.0' | ||
| description: The Weaviate version running on the vector database cluster. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Vector Database version* |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| type: object | ||
|
|
||
| properties: | ||
| user_id: | ||
| type: string | ||
| example: admin-user-abc123 | ||
| description: >- | ||
| Weaviate DB user id from the cluster secret (opaque; matches what was | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets not use weaviate here in case we add another more general db type in the future |
||
| provisioned). | ||
| api_token: | ||
| type: string | ||
| example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... | ||
| description: API token for that user. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| type: object | ||
|
|
||
| description: VectorDBEndpoints contains the connection endpoints for a vector database instance. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo |
||
|
|
||
| properties: | ||
| http: | ||
| type: string | ||
| example: https://my-db-abc123.vectordb.digitalocean.com | ||
| description: >- | ||
| HTTP endpoint (e.g. "https://my-db-abc123.vectordb.digitalocean.com"). | ||
| grpc: | ||
| type: string | ||
| example: my-db-abc123.vectordb.digitalocean.com:443 | ||
| description: >- | ||
| gRPC endpoint (e.g. "my-db-abc123.vectordb.digitalocean.com:443"). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets have a properly formatted grpc endpoint as an example. this isnt the right structure |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| type: object | ||
|
|
||
| properties: | ||
| backup_id: | ||
| type: string | ||
| example: vectordb-9cc10173-e9ea-4176-9dbc-a4cee4c4ff30-20240101-120000 | ||
| description: The backup ID being restored. | ||
| status: | ||
| type: string | ||
| enum: | ||
| - STARTED | ||
| - TRANSFERRING | ||
| - TRANSFERRED | ||
| - FINALIZING | ||
| - SUCCESS | ||
| - FAILED | ||
| - CANCELLING | ||
| - CANCELED | ||
| example: STARTED | ||
| description: >- | ||
| Current status: STARTED, TRANSFERRING, TRANSFERRED, FINALIZING, SUCCESS, | ||
| FAILED, CANCELLING, CANCELED. | ||
| error: | ||
| type: string | ||
| example: '' | ||
| description: Error message if the restore failed. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| id: | ||
| in: path | ||
| name: id | ||
| description: A unique identifier for a vector database. | ||
| required: true | ||
| example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 | ||
| schema: | ||
| type: string | ||
|
|
||
| backup_id: | ||
| in: path | ||
| name: backup_id | ||
| description: A unique identifier for a vector database backup. | ||
| required: true | ||
| example: vectordb-9cc10173-e9ea-4176-9dbc-a4cee4c4ff30-20240101-120000 | ||
| schema: | ||
| type: string |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| description: A JSON object with a key of `vector_db`. | ||
|
|
||
| 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' | ||
|
|
||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| properties: | ||
| vector_db: | ||
| $ref: '../models/vector_database.yml' | ||
| required: | ||
| - vector_db | ||
| example: | ||
| vector_db: | ||
| id: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30 | ||
| name: my-vector-db | ||
| region: nyc3 | ||
| owner_uuid: 8b3b4c5d-6e7f-8901-a234-567890bcdef0 | ||
| status: active | ||
| config: | ||
| default_quantization: rq | ||
| enable_auto_schema: true | ||
| weaviate_version: '1.24.0' | ||
| created_at: '2024-01-11T18:37:36Z' | ||
| updated_at: '2024-01-11T18:37:36Z' | ||
| endpoints: | ||
| http: https://my-db-abc123.vectordb.digitalocean.com | ||
| grpc: my-db-abc123.vectordb.digitalocean.com:443 | ||
| size: medium | ||
| tags: | ||
| - production |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for now lets have the region be tor1 since thats all thats available rn