Database endpoints
Create a vector namespace
Create a namespace inside a vector index and optionally declare its record capacity.
POST /v1/tenants/{tenant}/vector-indexes/{index}/namespaces/create
- Choose the indexSelect the parent vector index.
- Name the namespaceOptionally declare its record capacity.
- Keep its identifierUse the namespace name in record requests.
Before you start
Use your database bearer token.
Create the vector index first. The example adds demo to demo-search; __default__ is reserved.
Path parameters
| Field | Type | Required |
|---|---|---|
tenant | string | Required |
index | string | Required |
Headers
| Field | Type | Required | Description |
|---|---|---|---|
x-oc-db-user | string | Optional | Acting database user (role, grant and row-policy checks). Send with x-oc-db-key. |
x-oc-db-key | string | Optional | API key of the x-oc-db-user user. |
Request body
application/json
Limits and accepted values
- __default__ cannot be created (400 namespace_reserved).
- declared_capacity is 1-9007199254740991.
| Field | Type | Required |
|---|---|---|
declared_capacity | integer | Optional |
name | string | Required |
Read the result
Save namespace_id and use the namespace name in record requests. Its initial record_count is zero. A declared capacity is a limit declaration, not inserted data.
Response statuses
HTTP status reference
| Status | What to do |
|---|---|
| 201 | Created |
| 400 | Correct the request before retrying. |
| 401 | Check the credential and Authorization header. |
| 402 | Check feature access or available credits. |
| 403 | Check tenant access, roles and permissions. |
| 404 | Check the resource ID and API route. |
| 409 | Resolve the conflict before retrying. |
| 413 | Split or reduce the request body. |
| 415 | Send the required Content-Type. |
| 422 | Correct the values or unsupported combination. |
| 429 | Honor Retry-After when present; back off. |
| 500 | Check the outcome before retrying a write. |
| 501 | Check deployment support for this operation. |
| 503 | Honor Retry-After when present; check write outcomes. |