REST API Reference
Use this reference to call the REST API for model, table, data, search, and index operations.
Authentication & Base URL
- Host template: https://<hostname>:<port>/ords/<schema>/_/db-api/stable/vecdb/
- Headers: Authorization: Bearer <token> (Bearer or Basic), Content-Type: application/json
- Most POST/PATCH operations accept optional debugFlags objects that raise tracing levels; when omitted, standard logging is used.
- REST request bodies use top-level camelCase names, such as
tableParams,embedParams,indexParams,queryBy,topK,includeVectors,outputSelector,advancedOptions,modelName,modelParams, anddebugFlags. These fields map to the correspondingDBMS_VECTOR_DATABASEPL/SQL parameters, such astable_params,embed_params,index_params,query_by,top_k,include_vectors,output_selector,advanced_options,model_name,model_params, anddebug_flags.
Note: debugFlags is accepted by POST/PATCH endpoints. Each key accepts “low”, “medium”, or “high”. Available keys: VECTOR_INDEX, VECTOR_INDEX_NEIGHBOR_GRAPH, VECTOR_INDEX_NEIGHBOR_GRAPH_BUILD, VECTOR_INDEX_NEIGHBOR_GRAPH_MEM, VECTOR_INDEX_NEIGHBOR_GRAPH_SEARCH, VECTOR_INDEX_NEIGHBOR_GRAPH_APPCHNG, VECTOR_INDEX_NEIGHBOR_GRAPH_STATS, VECTOR_INDEX_NEIGHBOR_PARTITIONS, VECTOR_INDEX_FIXED_VIEW, VECIDX_TRANS, VECIDX_TRANS_COM, VECIDX_TRANS_PJ, VECIDX_TRANS_PJ_DWNGRD, VECIDX_TRANS_PJ_GROW, VECIDX_TRANS_SJ, VECIDX_TRANS_SJ_BG, VEC_INDEX_CALIBRATION, VECTOR_TRACE.
Models
Use these endpoints to load and manage embedding and reranking models.
POST /vecdb/models/
Load an embedding or reranking model into the database.
Imports a model from object storage (ONNX format) for use in embedding generation and reranking operations. Once loaded, the model can be used for integrated table embeddings or standalone inference.
Request body
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| modelName | string | Valid model identifier | Yes | No default | Unique name to assign to the loaded model. | Maps to PL/SQL model_name; must not already exist in the database schema. |
| url | string | Object storage or public URL | Yes | No default | Object storage URL where the model file is located. | Maps to PL/SQL url. |
| modelParams | object | Object or NULL | No | null | Optional model loading settings for object storage access and model metadata. | Maps to PL/SQL model_params; use credential when the model URL requires a database credential. Use metadata to pass model metadata, such as {"function": "regression"} for a reranking model. |
| debugFlags | object | Object or NULL | No | null | Debug or tracing flags for detailed logging. | Maps to PL/SQL debug_flags; optional unless diagnostics are needed. |
modelParams fields
| Field | Type | Value Range | Required | Description | Notes |
|---|---|---|---|---|---|
| credential | string | Valid credential name | No | Database credential used to access the object storage URL. | Provide when the model URL is private or requires object storage authentication. Omit for public or pre-authenticated URLs. |
| metadata | object | Object or NULL | No | A JSON description of the metadata describing the model. The metadata must, at minimum, describe the machine learning function supported by the model. The model’s metadata parameters are described in JSON Metadata Parameters for ONNX Models. | For reranking models, include "function": "regression" in metadata. |
Returns
JSON response containing the loaded model metadata.
Example curl request - Load an embedding model
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/models/" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"modelName": "DOC_EMBED_MODEL",
"url": "https://objectstorage.example.com/models/doc_embed.onnx"
}'
Example curl request - Load a reranking model
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/models/" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"modelName": "RERANK_MODEL",
"url": "https://objectstorage.example.com/models/reranker_quantized.onnx",
"modelParams": {
"metadata": {
"function": "regression"
}
}
}'
Example 201 response
{
"model_name": "DOC_EMBED_MODEL",
"algorithm": "ONNX",
"mining_function": "EMBEDDING",
"creation_date": "2026-05-01T10:00:00.000000+00:00",
"attributes": [
{
"name": "DATA",
"value": "TEXT",
"data_type": "VARCHAR2",
"data_length": 4000,
"vector_info": null
}
]
}
Response 400 – the request body included invalid parameters.
Response 404 – model not found.
GET /vecdb/models/
List all loaded embedding and reranking models.
Returns information about all models available for use in the database, limited to models currently loaded in the service.
Returns
JSON response containing an array of models with model names, types (embedding, reranking), algorithms, creation timestamps, and attributes and parameters.
Example curl request
curl -X GET \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/models/" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>"
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>"
Example 200 response
{
"items": [
{
"model_name": "DOC_EMBED_MODEL",
"algorithm": "ONNX",
"mining_function": "EMBEDDING",
"creation_date": "2026-05-01T10:00:00.000000+00:00",
"attributes": [
{
"name": "DATA",
"value": "TEXT",
"data_type": "VARCHAR2",
"data_length": 4000,
"vector_info": null
}
]
}
],
"hasMore": false,
"limit": 25,
"offset": 0,
"count": 1,
"links": []
}
GET /vecdb/models/{model_name}
Retrieve detailed metadata for a loaded model.
Returns comprehensive information about the model including its type, parameters, attributes, and usage statistics.
Path parameter
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| model_name | string | Valid model identifier | Yes | No default | Name of the model to describe. | Maps to PL/SQL model_name; model must exist in the database schema. |
Returns
JSON response containing the model name and type, algorithm and mining function, input/output attributes, creation timestamp, and model parameters.
Example curl request
curl -X GET \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/models/DOC_EMBED_MODEL" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>"
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>"
Example 200 response
{
"model_name": "DOC_EMBED_MODEL",
"algorithm": "ONNX",
"mining_function": "EMBEDDING",
"creation_date": "2026-05-01T10:00:00.000000+00:00",
"attributes": [
{
"name": "DATA",
"value": "TEXT",
"data_type": "VARCHAR2",
"data_length": 4000,
"vector_info": null
}
]
}
Response 404 – model not found.
DELETE /vecdb/models/{model_name}
Remove a loaded model from the database.
Drops the specified embedding or reranking model. Models currently in use by vector tables cannot be dropped and will throw an error.
Path parameter
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| model_name | string | Valid model identifier | Yes | No default | Name of the model to drop. | Maps to PL/SQL model_name; model must exist and must not be referenced by an integrated embedding vector table. |
Returns
JSON response confirming model deletion.
Example curl request
curl -X DELETE \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/models/DOC_EMBED_MODEL" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>"
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>"
Example 200 response
{
"message": "Model DOC_EMBED_MODEL dropped successfully"
}
Response 400 – the model is used in a vector table and cannot be deleted.
Response 404 – model not found.
Vector Tables
GET /vecdb/summary
Get summary statistics for the entire vector database service.
Returns
JSON response with database-level statistics including total tables, models, and vectors.
Example curl request
curl -X GET \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/summary" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>"
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>"
Example 200 response
{
"total_tables": 3,
"total_vectors": 12500,
"total_models": 2
}
POST /vecdb/vector-tables/
Create a new vector table for storing vector embeddings.
Creates a vector table with a fixed schema optimized for vector search. The table includes columns for ID, vector data, and JSON metadata. You can configure automatic ID generation, embedding integration, and index parameters during creation.
Request body
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| name | string | Valid vector table identifier | Yes | No default | Name of the vector table to create. | Maps to PL/SQL name; the table must not already exist in the database schema. |
| comment | string | Valid string | No | null | Human-readable description of the vector table. | Maps to PL/SQL comment; returned as comment in table metadata. |
| annotations | object | Object or NULL | No | null | Table-level annotation metadata. | Maps to PL/SQL annotations; must be valid JSON metadata. |
tableParams |
object | Object or NULL | No | null | Table-level creation parameters. | Maps to PL/SQL table_params; currently supports auto_generate_id. |
embedParams |
object | Object or NULL | No | null | Automatic embedding configuration for integrated embedding tables. | Maps to PL/SQL embed_params; supply when the table should generate vectors from metadata text by using a loaded embedding model. Omit for bring-your-own-vector tables. |
indexParams |
object | Object or NULL | No | null | Vector and metadata index configuration. | Maps to PL/SQL index_params; defaults are applied when omitted. |
| debugFlags | object | Object or NULL | No | null | Debug or tracing flags for detailed logging. | Maps to PL/SQL debug_flags; optional unless diagnostics are needed. |
Returns
JSON response containing the created table metadata.
Example curl request – Create table for bring-your-own vectors
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"name": "product_vectors",
"comment": "Product catalog embeddings",
"tableParams": {
"auto_generate_id": false
},
"annotations": {
"domain": "retail"
},
"indexParams": {
"vector_index_params": {
"auto_index": true,
"organization": "PARTITIONS",
"distance_metric": "COSINE",
"accuracy": 90
},
"metadata_index_params": {
"auto_index": true,
"include_paths": ["category", "price"]
},
"parallel_creation": 2
}
}'
Example curl request – Create integrated embedding table
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"name": "product_text_vectors",
"comment": "Product text embeddings",
"tableParams": {
"auto_generate_id": true
},
"embedParams": {
"model": "DOC_EMBED_MODEL",
"embed_metadata_jsonpath": "description"
},
"indexParams": {
"vector_index_params": {
"auto_index": true,
"organization": "INMEMORY GRAPH",
"distance_metric": "COSINE"
}
}
}'
Example 201 response
{
"table_name": "PRODUCT_VECTORS",
"comment": "Product catalog embeddings",
"table_params": {
"auto_generate_id": false
},
"annotations": {
"domain": "retail"
},
"vector_type": "dense",
"vector_table_type": "BYOV",
"embed_params": null,
"index_params": {
"vector_index_params": {
"auto_index": true,
"organization": "PARTITIONS",
"distance_metric": "COSINE",
"accuracy": 90
},
"metadata_index_params": {
"auto_index": true,
"include_paths": ["category", "price"]
},
"parallel_creation": 2
},
"owner": "APPUSER",
"indexes": [],
"status": "Empty",
"stats": {
"total_vectors": 0
},
"created": "2026-05-01T10:00:00.000000+00:00",
"updated": "2026-05-01T10:00:00.000000+00:00"
}
Response 400 – invalid or missing parameters, including invalid nested object fields or unsupported combinations.
Response 409 – a table with that name already exists.
GET /vecdb/vector-tables/
List all vector tables in the database.
Returns a list of all vector tables accessible to the current user, including their names and basic configuration details.
Returns
JSON response containing an array of table metadata including table names, comments, table parameters, vector table type, embedding configuration, index configuration, owner, index details, status, statistics, and timestamps.
Example curl request
curl -X GET \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>"
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>"
Example 200 response
{
"count": 1,
"hasMore": false,
"items": [
{
"table_name": "PRODUCT_VECTORS",
"comment": "Product catalog embeddings",
"table_params": {
"auto_generate_id": false
},
"annotations": {
"domain": "retail"
},
"vector_type": "dense",
"vector_table_type": "BYOV",
"embed_params": null,
"index_params": {
"vector_index_params": {
"auto_index": true,
"organization": "PARTITIONS",
"distance_metric": "COSINE"
},
"metadata_index_params": {
"auto_index": true
},
"parallel_creation": 1
},
"owner": "APPUSER",
"indexes": [],
"status": "Empty",
"stats": {
"total_vectors": 0
},
"created": "2026-05-01T10:00:00.000000+00:00",
"updated": "2026-05-01T10:00:00.000000+00:00"
}
],
"limit": 25,
"offset": 0
}
GET /vecdb/vector-tables/{vector_table_name}
Retrieve detailed configuration and metadata for a vector table.
Returns comprehensive information about the specified table including its schema, index configuration, embedding settings, row count, and creation timestamp.
Path parameter
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| vector_table_name | string | Valid vector table identifier | Yes | No default | Name of the vector table to describe. | Maps to PL/SQL name; table must exist in the database schema. |
Returns
JSON response describing the table including table name and description, vector type and dimensions, index parameters and status, embedding model configuration (if applicable), row count and storage statistics, and annotations and metadata.
Example curl request
curl -X GET \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/product_vectors" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>"
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>"
Example 200 response
{
"table_name": "PRODUCT_VECTORS",
"comment": "Product catalog embeddings",
"table_params": {
"auto_generate_id": false
},
"annotations": {
"domain": "retail"
},
"vector_type": "dense",
"vector_table_type": "BYOV",
"embed_params": null,
"index_params": {
"vector_index_params": {
"auto_index": true,
"organization": "PARTITIONS",
"distance_metric": "COSINE"
},
"metadata_index_params": {
"auto_index": true
},
"parallel_creation": 1
},
"owner": "APPUSER",
"indexes": [],
"status": "Empty",
"stats": {
"total_vectors": 0
},
"created": "2026-05-01T10:00:00.000000+00:00",
"updated": "2026-05-01T10:00:00.000000+00:00"
}
Response 404 – not found or precondition failed.
PATCH /vecdb/vector-tables/{vector_table_name}
Update the comment and annotations for an existing vector table.
Modifies vector table metadata without affecting the stored data. Can update the table comment and annotations.
Note: Annotations are replaced entirely, not merged. To preserve existing annotations, include them in the update request.
Path parameter
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| vector_table_name | string | Valid vector table identifier | Yes | No default | Name of the vector table to update. | Maps to PL/SQL name; table must exist in the database schema. |
Request body
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| comment | string | Valid string | No | null | Replacement comment for the table. | Maps to PL/SQL comment and is returned as comment in table metadata. |
| annotations | object | Object or NULL | No | null | Replacement annotations for the table. | Maps to PL/SQL annotations; update replaces annotations instead of merging them. |
| debugFlags | object | Object or NULL | No | null | Debug or tracing flags for detailed logging. | Maps to PL/SQL debug_flags; optional unless diagnostics are needed. |
Returns
JSON response containing the updated table metadata.
Example curl request
curl -X PATCH \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/product_vectors" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"comment": "Updated product embeddings",
"annotations": {
"domain": "retail",
"owner": "search"
}
}'
Example 202 response
{
"table_name": "PRODUCT_VECTORS",
"comment": "Updated product embeddings",
"table_params": {
"auto_generate_id": false
},
"annotations": {
"domain": "retail",
"owner": "search"
},
"vector_type": "dense",
"vector_table_type": "BYOV",
"embed_params": null,
"index_params": {
"vector_index_params": {
"auto_index": true
},
"metadata_index_params": {
"auto_index": true
},
"parallel_creation": 1
},
"owner": "APPUSER",
"indexes": [],
"status": "Empty",
"stats": {
"total_vectors": 0
},
"created": "2026-05-01T10:00:00.000000+00:00",
"updated": "2026-05-02T09:30:00.000000+00:00"
}
Response 400 – invalid JSON, invalid types, or missing required fields.
Response 404 – not found or precondition failed.
DELETE /vecdb/vector-tables/{vector_table_name}
Permanently delete a vector table and all its data.
Drops the specified vector table, including all vectors, metadata, and associated indexes. This operation cannot be undone.
Warning: Do not use the SQL DROP TABLE statement to delete vector tables created with POST /vecdb/vector-tables/. This can leave residual metadata entries with table_name: null that cannot be removed later. Use DELETE /vecdb/vector-tables/{vector_table_name} to remove the table and its associated metadata.
Path parameter
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| vector_table_name | string | Valid vector table identifier | Yes | No default | Name of the vector table to drop. | Maps to PL/SQL name; table must exist in the database schema. |
Returns
JSON response confirming the table was dropped successfully.
Example curl request
curl -X DELETE \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/product_vectors" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>"
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>"
Example 200 response
{
"message": "Table PRODUCT_VECTORS deleted successfully"
}
Response 404 – table not found.
Manage Data
POST /vecdb/embed
Generate vector embeddings for text inputs using a loaded model.
Converts text into dense vector representations using the specified embedding model. The model must be loaded in the database using POST /vecdb/models/ first.
Request body
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| modelName | string | Valid model identifier | Yes | No default | Name of the loaded embedding model to use. | Maps to PL/SQL model_name; model must exist in the database schema. |
| inputs | array | Array | Yes | No default | Array of input objects to embed. Each entry contains text (string, required). Example: [{“text”: “text1”}, {“text”: “text2”}]. | Maps to PL/SQL inputs; each input object must include text. |
| debugFlags | object | Object or NULL | No | null | Debug or tracing flags for detailed logging. | Maps to PL/SQL debug_flags; optional unless diagnostics are needed. |
Returns
JSON response containing the generated embeddings — an array of vectors corresponding to each input.
Example curl request
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/embed" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"modelName": "DOC_EMBED_MODEL",
"inputs": [
{"text": "hello world"}
]
}'
Example 200 response
{
"data": [
{
"text": "hello world",
"embedding": [
0.0117027815,
0.00419755466,
-0.0301191173,
0.011317092
]
}
]
}
Response 400 – the request body included invalid parameters.
POST /vecdb/vector-tables/{vector_table_name}/list
Retrieve vectors from a table by their IDs.
Lists vector records with their IDs, embeddings, and metadata. Supports pagination for large result sets.
Path parameter
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| vector_table_name | string | Valid vector table identifier | Yes | No default | Name of the vector table to read. | Maps to PL/SQL table_name; table must exist in the database schema. |
Request body
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| ids | array of string | Array | No | null | Optional list of vector IDs to retrieve. Example: [“id1”, “id2”, “id3”]. | Maps to PL/SQL ids; builds an ID filter when provided. |
| limit | number | > 0 | No | null | Maximum number of results to return. | Maps to PL/SQL limit; defaults to 15. |
| offset | number | >= 0 | No | null | Number of records to skip for pagination. | Maps to PL/SQL offset; defaults to 0 when omitted. |
| debugFlags | object | Object or NULL | No | null | Debug or tracing flags for detailed logging. | Maps to PL/SQL debug_flags; optional unless diagnostics are needed. |
Returns
JSON response containing matching vectors including IDs, dense vectors, and metadata.
Example curl request – Get specific vectors by ID
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/sample_table/list" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"ids": ["id1", "id2"],
"limit": 2,
"offset": 0
}'
Example curl request – Paginate through results (First 10 results)
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/sample_table/list" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-u "<user>:<password>" \
-d '{
"limit": 10,
"offset": 0
}'
Example curl request – Next 10 results
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/sample_table/list" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-u "<user>:<password>" \
-d '{
"limit": 10,
"offset": 10
}'
Example 200 response
{
"items": [
{
"id": "id1",
"dense_vector": [0.1, 0.5, 0.4, 0.56],
"metadata": {
"product_name": "Noise Cancelling Headphones",
"category": "electronics",
"brand": "Sony",
"price": 299.99
}
},
{
"id": "id2",
"dense_vector": [0.14, 0.534, 0.12, 0.58],
"metadata": {
"product_name": "Studio Monitor Headphones",
"category": "electronics",
"brand": "Audio-Technica",
"price": 149.99
}
}
],
"limit": 2,
"offset": 0,
"count": 2
}
Response 400 – the request body included invalid parameters.
Response 404 – the specified vector table does not exist.
POST /vecdb/load
Bulk load vectors from a CSV file in object storage.
Loads a large dataset from object storage into an existing vector table asynchronously. For integrated embedding tables, the table’s embedParams configuration is used to generate embeddings when needed.
Performance consideration: When source records do not contain precomputed vectors, embedding is performed as part of the load job using database CPU resources. This can make integrated embedding loads slower than loading precomputed vectors and can increase database CPU utilization during the job.
Guidelines for Preparing CSV Files for Load
- The file must be a valid comma-separated values (CSV) file.
- The first row must define the column names.
- If a dense vector or metadata field contains commas, enclose the entire field in double quotation marks (
"). - JSON fields inside CSV must use double quotation marks for property names and string values. To include a double quotation mark inside the JSON value, escape it by doubling (
""). - For integrated embedding vector tables, use
ID,METADATAorMETADATAwhentableParams.auto_generate_idistrue. - For bring-your-own-vector tables, use
ID,DENSE_VECTOR,ID,DENSE_VECTOR,METADATA,METADATAwhentableParams.auto_generate_idistrue, orDENSE_VECTORwhentableParams.auto_generate_idistrue. - Each ID must not exceed 40 characters.
- Header order is flexible and headers are not case-sensitive. For integrated embedding tables, metadata must include the text path configured by
embedParams.embed_metadata_jsonpath. For example, ifembed_metadata_jsonpathisdescription, then each metadata object must contain adescriptiontext value. Use a JSON path, such asdetails.summary, to embed text from nested metadata.
Request body
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| tableName | string | Valid vector table identifier | Yes | No default | Name of the target vector table for the load job. | Maps to PL/SQL table_name; table must already exist. |
| url | string | Cloud URI or public URL | Yes | No default | Object storage URL pointing to the CSV file containing vectors. | Maps to PL/SQL url; the file is loaded through the database cloud loader. |
| params | object | Object or NULL | No | null | Optional load settings. Example: {"credential": "OBJ_STORE_CRED"} if the object storage URL requires authentication. |
Maps to PL/SQL params; supports credential. |
| debugFlags | object | Object or NULL | No | null | Debug or tracing flags for detailed logging. | Maps to PL/SQL debug_flags; optional unless diagnostics are needed. |
Returns
JSON response containing the load job ID and initial status.
Example curl request
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/load" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"tableName": "product_vectors",
"url": "https://objectstorage.example.com/data/product_vectors.csv",
"params": {
"credential": "OBJ_STORE_CRED"
}
}'
Example 200 response
{
"job_creator": "APPUSER",
"job_name": "VECDB_LOAD_20260501110000",
"job_type": "PLSQL_BLOCK",
"operation": "LOAD",
"state": "SCHEDULED",
"start_date": "2026-05-01T11:00:00.118886Z",
"links": [
{
"href": "/vecdb/load/jobs/",
"rel": "collection"
},
{
"href": "/vecdb/load/jobs/vecdb_load_20260501110000/",
"rel": "self"
},
{
"href": "/vecdb/load/jobs/vecdb_load_20260501110000/jobfile",
"rel": "related"
}
]
}
Response 400 – the request body included invalid parameters.
POST /vecdb/vector-tables/{vector_table_name}/upsert
Insert or update vectors in a table.
Upserts vectors into the specified table. If a vector with the same ID already exists, it will be updated with the new values. Otherwise, a new record is inserted.
If the table is configured with tableParams.auto_generate_id: true, you do not need to provide id as part of the upsert object. For integrated embedding vector tables, you can provide text in metadata and embeddings are generated automatically.
Path parameter
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| vector_table_name | string | Valid vector table identifier | Yes | No default | Name of the vector table to insert or update. | Maps to PL/SQL table_name; table must exist in the database schema. |
Request body
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| vectors | array | Array | Yes | No default | Array of vector records to insert or update. Each entry contains id, dense_vector, and metadata. For tables with embedding models, dense_vector can be omitted and generated from the configured metadata field. |
Maps to PL/SQL vectors; id is optional only when automatic ID generation is enabled for the table. Each ID must not exceed 40 characters. |
| debugFlags | object | Object or NULL | No | null | Debug or tracing flags for detailed logging. | Maps to PL/SQL debug_flags; optional unless diagnostics are needed. |
Returns
JSON response confirming upsert with count of inserted/updated vectors.
Example curl request – Upsert pre-computed vectors
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/sample_table/upsert" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"vectors": [
{
"id": "vec1",
"dense_vector": [0.1, 0.5, 0.4, 0.56],
"metadata": {
"type": "document",
"source": "Wikipedia"
}
},
{
"id": "vec2",
"dense_vector": [0.14, 0.534, 0.12, 0.58],
"metadata": {
"type": "document",
"source": "Internal"
}
}
]
}'
Example curl request – Upsert with automatic embedding (table must have embedParams configured)
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/product_text_vectors/upsert" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-u "<user>:<password>" \
-d '{
"vectors": [
{
"metadata": {
"description": "Professional wired headphones with accurate sound for studio use."
}
}
]
}'
Example 201 response
{
"upserted_count": 2
}
Response 400 – the request body included invalid parameters.
Response 404 – the specified vector table does not exist.
GET /vecdb/load/jobs/
List all bulk load operations.
Returns metadata for all load jobs including their states and progress.
Returns
JSON response containing an array of load jobs with job names, owners, states, timestamps, and log file links.
Example curl request
curl -X GET \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/load/jobs/" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>"
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>"
Example 200 response
{
"count": 1,
"hasMore": false,
"items": [
{
"job_creator": "APPUSER",
"job_name": "VECDB_LOAD_20260501110000",
"job_type": "PLSQL_BLOCK",
"operation": "LOAD",
"state": "SUCCEEDED",
"start_date": "2026-05-01T11:00:00.118886Z",
"links": [
{
"href": "/vecdb/load/jobs/vecdb_load_20260501110000",
"rel": "self"
},
{
"href": "/vecdb/load/jobs/vecdb_load_20260501110000/jobfile",
"rel": "related"
}
]
}
],
"limit": 25,
"offset": 0
}
GET /vecdb/load/jobs/{load_job_name}/
Get the status of a bulk load operation.
Returns details about an asynchronous load job initiated by POST /vecdb/load.
Path parameter
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| load_job_name | string | Valid string | Yes | No default | Name of the load job to describe. | Use a job name returned by POST /vecdb/load or GET /vecdb/load/jobs/. |
Returns
JSON response containing job status and log file links.
Example curl request
curl -X GET \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/load/jobs/VECDB_LOAD_20260501110000/" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>"
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>"
Example 200 response
{
"job_creator": "APPUSER",
"job_name": "VECDB_LOAD_20260501110000",
"job_type": "PLSQL_BLOCK",
"operation": "LOAD",
"state": "SUCCEEDED",
"start_date": "2026-05-01T11:00:00.118886Z",
"links": [
{
"href": "/vecdb/load/jobs/",
"rel": "collection"
},
{
"href": "/vecdb/load/jobs/vecdb_load_20260501110000/",
"rel": "self"
},
{
"href": "/vecdb/load/jobs/vecdb_load_20260501110000/jobfile",
"rel": "related"
}
]
}
GET /vecdb/load/jobs/{load_job_name}/jobfile
Retrieve the log output for a bulk load job.
Path parameter
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| load_job_name | string | Valid string | Yes | No default | Name of the load job. | Use a job name returned by POST /vecdb/load or GET /vecdb/load/jobs/. |
Returns
JSON response containing log file metadata.
Example curl request
curl -X GET \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/load/jobs/VECDB_LOAD_20260501110000/jobfile" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>"
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>"
Example 200 response
{
"actual_start_date": "2026-05-01T11:00:00.22485Z",
"additional_info": null,
"error#": 0,
"job_name": "VECDB_LOAD_20260501110000",
"links": [
{
"href": "/vecdb/load/jobs/VECDB_LOAD_20260501110000/",
"rel": "collection"
}
],
"log_date": "2026-05-01T11:00:00.572103Z",
"run_duration": "P0DT0H0M0S",
"status": "SUCCEEDED"
}
POST /vecdb/vector-tables/{vector_table_name}/delete
Delete vectors from a table by their IDs.
Removes the specified vectors and their associated metadata from the table.
Path parameter
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| vector_table_name | string | Valid vector table identifier | Yes | No default | Name of the vector table to delete from. | Maps to PL/SQL table_name; table must exist in the database schema. |
Request body
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| ids | array of string | Array | Yes | No default | List of vector IDs to delete. Example: [“id1”, “id2”, “id3”]. | Maps to PL/SQL ids; use explicit ID arrays. |
| debugFlags | object | Object or NULL | No | null | Debug or tracing flags for detailed logging. | Maps to PL/SQL debug_flags; optional unless diagnostics are needed. |
Returns
JSON response confirming deletion with count of deleted vectors.
Example curl request
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/myvectors/delete" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"ids": ["vec1", "vec2"]
}'
Example 200 response
{
"message": "Deleted 2 rows successfully"
}
Response 400 – the request body included invalid parameters.
Response 404 – the specified vector table does not exist.
Search Data
POST /vecdb/vector-tables/{vector_table_name}/query
Perform a vector similarity search using text, a vector, or an ID.
Performs similarity search to find the most similar vectors in the table. Supports filtering by metadata and various distance metrics. Retrieves the IDs, metadata, vectors and similarity scores of the most similar items.
Notes:
- If no vector index exists, search uses an exact base-table or metadata-index route with filters.
Path parameter
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| vector_table_name | string | Valid vector table identifier | Yes | No default | Name of the vector table to search. | Maps to PL/SQL table_name; table must exist in the database schema. |
Request body
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| queryBy | object | Exactly one query mode | Yes | No default | Query vector source. Specify one of {"vector": [...]}, {"text": "query text"}, or {"id": "vector_id"}. |
Maps to PL/SQL query_by; text, id, and vector are mutually exclusive. |
| topK | number | > 0 | Yes | No default | Number of most similar results to return. | Maps to PL/SQL top_k; zero or negative values raise a validation error. With filters, the search operation may use optimized or fallback paths to return at least topK rows when enough matching rows exist. |
| includeVectors | boolean | true, false |
No | null | Include vector values in the response. | Maps to PL/SQL include_vectors; defaults to false. |
| outputSelector | array of string | Array or NULL | No | null | Top-level metadata keys to project in each result. | Maps to PL/SQL output_selector; null returns full metadata, and an empty array returns an empty metadata object. |
| filters | object | Object or NULL | No | null | Metadata filters to narrow search results. | Maps to PL/SQL filters; translated by the QBE helper and applied to metadata. |
| advancedOptions | object | Object or NULL | No | null | Search tuning parameters. Supports distance_metric, accuracy, and idx_parameters. |
Maps to PL/SQL advanced_options; overrides index defaults for this query only. |
| debugFlags | object | Object or NULL | No | null | Debug or tracing flags for detailed logging. | Maps to PL/SQL debug_flags; optional unless diagnostics are needed. |
filters capabilities
| Capability | Operator / syntax | Example |
|---|---|---|
| Direct equality | field: value |
{"status":"active"} |
| Existence | $exists |
{"email":{"$exists":true}} |
| Equality | $eq |
{"tier":{"$eq":"gold"}} |
| Inequality | $ne |
{"tier":{"$ne":"bronze"}} |
| Greater than | $gt |
{"age":{"$gt":40}} |
| Greater than or equal | $gte |
{"age":{"$gte":41}} |
| Less than | $lt |
{"age":{"$lt":40}} |
| Less than or equal | $lte |
{"age":{"$lte":30}} |
| Inclusive range | $between |
{"age":{"$between":[30,41]}} |
| Value in a list | $in |
{"tier":{"$in":["gold","silver"]}} |
| Value not in a list | $nin |
{"tier":{"$nin":["bronze"]}} |
| Array contains all values | $all |
{"tags":{"$all":["oracle","security"]}} |
| String prefix | $startsWith |
{"name":{"$startsWith":"Ada"}} |
| String substring | $hasSubstring |
{"description":{"$hasSubstring":"Oracle"}} |
| String substring alias | $instr |
{"description":{"$instr":"security"}} |
| Regular expression | $regex |
{"name":{"$regex":"^Ada.*"}} |
SQL LIKE pattern |
$like |
{"name":{"$like":"Ada%"}} |
| Logical AND | $and |
{"$and":[{"status":"active"},{"balance":{"$gt":10000}}]} |
| Logical OR | $or |
{"$or":[{"tier":"silver"},{"balance":{"$gt":10000}}]} |
| Logical NOR | $nor |
{"$nor":[{"tier":"gold"},{"tier":"silver"}]} |
| Negation | $not |
{"status":{"$not":{"$eq":"inactive"}}} |
| Same array-object match | parent[*]: {...} |
{"addresses[*]":{"city":"Boston","state":"MA"}} |
| Absolute value | $abs |
{"temperature":{"$abs":{"$gt":40}}} |
| Round up | $ceiling |
{"temperature":{"$ceiling":{"$lt":20}}} |
| Round down | $floor |
{"temperature":{"$floor":{"$lte":0}}} |
| Convert to number | $number |
{"age":{"$number":{"$gt":40}}} |
| Convert to binary double | $double |
{"price":{"$double":{"$gt":25}}} |
| Convert to lowercase | $lower |
{"name":{"$lower":"ada lovelace"}} |
| Convert to uppercase | $upper |
{"name":{"$upper":"GRACE HOPPER"}} |
| String length | $length |
{"name":{"$length":{"$gt":10}}} |
| Convert to string | $string |
{"age":{"$string":{"$eq":"30"}}} |
| Boolean conversion | $boolean |
{"isPreferred":{"$boolean":true}} |
| JSON data type | $type |
{"location":{"$type":"object"}} |
| Array/object size | $size |
{"items":{"$size":{"$gte":3}}} |
| Date conversion | $date |
{"birthDate":{"$date":{"$gte":"2000-01-01"}}} |
| Timestamp conversion | $timestamp |
{"createdAt":{"$timestamp":{"$lt":"2026-01-01T00:00:00Z"}}} |
| Spatial proximity | $near |
{"location":{"$near":{"$geometry":{"type":"Point","coordinates":[-122.417,37.783]},"$distance":10,"$unit":"mile"}}} |
| Spatial intersection | $intersects |
{"location":{"$intersects":{"$geometry":{"type":"Point","coordinates":[-122.417,37.783]}}}} |
| Spatial containment | $within |
{"location":{"$within":{"$geometry":{"type":"Polygon","coordinates":[[[-123,37],[-122,37],[-122,38],[-123,38],[-123,37]]]}}}} |
For more information about the filter syntax, see SODA Filter Specifications.
outputSelector values
| Value | Result | Notes |
|---|---|---|
null |
Returns full CONTENT_METADATA. |
Default result. |
| Array of strings | Projects selected top-level metadata keys into the result metadata object. |
Example: ['tenant', 'title']. |
| Empty array | Returns an empty metadata object. | Results still include id and distance. |
| Dotted string | Treats the value as a literal top-level key. | ['a.b'] is treated as a literal key, not a nested JSON path. |
| Non-string or empty-string entry | Not supported. | Use arrays of non-empty strings only. |
advancedOptions fields
| Field | Type | Value Range | Required | Description | Notes |
|---|---|---|---|---|---|
| distance_metric | string | MANHATTAN, DOT, COSINE, EUCLIDEAN, EUCLIDEAN_SQUARED, L2_SQUARED |
No | Per-query distance metric override, such as COSINE or EUCLIDEAN. |
Validation is case-insensitive. For more information, see Vector Distance Metrics. |
| accuracy | number | 0-100 | No | Query-time trade-off between speed and accuracy. | Use a higher value when search quality is more important than speed. For more information, see Understand Approximate Similarity Search Using Vector Indexes. |
| idx_parameters | object | Object or NULL | No | Query-time vector index parameters. | Use efsearch only with HNSW indexes and neighbor partition probes only with IVF indexes. |
idx_parameters fields
| Field | Type | Value Range | Required | Description | Notes |
|---|---|---|---|---|---|
| efsearch | number | > 0 | No | HNSW beam width that controls recall. Use this value to specify the maximum number of candidates considered while probing the index. | Supported only with HNSW. |
| neighbor partition probes | number | > 0 | No | IVF partition probes. Increasing the number of partitions scanned can improve recall for IVF indexes. | Supported only with IVF. |
| rescore_factor | integer | 1-100 | No | Controls the number of candidates rescored during search. | Use only when quantization is configured when creating the vector table. |
Returns
JSON response containing matching results with IDs, distances, and metadata. Distance scores are lower for more similar results for most metrics. Vector values are included if includeVectors is true.
Example curl request – Search by query vector
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/product_vectors/query" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"queryBy": {"vector": [0.1, 0.5, 0.4, 0.56]},
"topK": 5,
"includeVectors": false
}'
Example curl request – Search by text with filtering
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/product_vectors/query" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-u "<user>:<password>" \
-d '{
"queryBy": {"text": "good headphone"},
"topK": 5,
"filters": {
"$and": [
{"category": {"$eq": "electronics"}},
{"price": {"$lt": 200}}
]
},
"outputSelector": ["product_name", "price", "product_description"],
"includeVectors": false
}'
Example curl request – Find similar items to an existing product
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/product_vectors/query" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-u "<user>:<password>" \
-d '{
"queryBy": {"id": "id2"},
"topK": 10,
"filters": {"category": {"$eq": "electronics"}}
}'
Example curl request – Search an HNSW index with custom runtime options
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-tables/product_vectors/query" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-u "<user>:<password>" \
-d '{
"queryBy": {"text": "good headphone"},
"topK": 10,
"advancedOptions": {
"distance_metric": "EUCLIDEAN",
"idx_parameters": {
"efsearch": 128,
"rescore_factor": 2
}
},
"includeVectors": true
}'
Example 200 response
{
"results": [
{
"id": "id2",
"distance": 0.212,
"metadata": {
"product_name": "Studio Monitor Headphones",
"price": 149.99,
"product_description": "Professional wired headphones with accurate sound for studio use."
}
},
{
"id": "id5",
"distance": 0.678,
"metadata": {
"product_name": "Wireless Earbuds",
"price": 199.99,
"product_description": "Noise-cancelling wireless earbuds with rich sound and secure fit."
}
}
]
}
Response 400 – the request body included invalid parameters.
Response 404 – the specified vector table does not exist.
POST /vecdb/rerank
Re-rank search results based on relevance to a query.
Uses a reranking model to score and reorder documents relative to a query. This improves search quality by performing a more detailed comparison between the query and each candidate document.
Request body
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| query | string | Non-empty string | Yes | No default | Search query text used as the reranking prompt. | Maps to PL/SQL query; empty values raise a validation error. |
| documents | array of string | Array | Yes | No default | Candidate documents to rerank. Typically the results from POST /query. |
Maps to PL/SQL documents; must contain at least one document. |
| modelName | string | Valid model identifier | Yes | No default | Name of the loaded reranking model. | Maps to PL/SQL model_name; model must exist in the database schema. |
| modelParams | object | Object or NULL | No | null | Rerank options for the model call. Example: {"top_n": 5} to return only the top five reranked results. |
Maps to PL/SQL model_params; supports top_n. |
| debugFlags | object | Object or NULL | No | null | Debug or tracing flags for detailed logging. | Maps to PL/SQL debug_flags; optional unless diagnostics are needed. |
Returns
JSON response containing reranked documents with relevance scores.
Example curl request
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/rerank" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"modelName": "RERANK_MODEL",
"query": "good headphone",
"documents": [
"Studio Monitor Headphones",
"Wireless Earbuds",
"Coffee Grinder"
],
"modelParams": {
"top_n": 2
}
}'
Example 200 response
[
{
"index": 0,
"score": 0.92
},
{
"index": 1,
"score": 0.76
}
]
Response 400 – the request body included invalid parameters.
Indexes
POST /vecdb/vector-indexes/
Create a vector index on a table to enable fast similarity search.
Creates an index for approximate nearest neighbor (ANN) search. Index creation runs asynchronously as a background job. Use GET /vecdb/vector-indexes/{vector_table_name} or GET /vecdb/vector-indexes/jobs/{index_job_name}/ to monitor progress.
Supports IVF (Inverted File) and HNSW (Hierarchical Navigable Small World) indexes. When indexParams is omitted, an IVF index is created automatically with organization set to PARTITIONS and distance_metric set to COSINE.
Request body
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| tableName | string | Valid vector table identifier | Yes | No default | Name of the vector table to index. | Maps to PL/SQL table_name; table must exist in the database schema. |
indexParams |
object | Object or NULL | No | null | Vector and metadata index configuration. | Maps to PL/SQL index_params; defaults are applied when omitted. |
| debugFlags | object | Object or NULL | No | null | Debug or tracing flags for detailed logging. | Maps to PL/SQL debug_flags; optional unless diagnostics are needed. |
Returns
JSON response containing the index creation job ID and status.
Example curl request – Create HNSW index with metadata index paths
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-indexes/" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"tableName": "product_vectors",
"indexParams": {
"vector_index_params": {
"auto_index": true,
"organization": "INMEMORY GRAPH",
"distance_metric": "COSINE",
"accuracy": 95,
"quantization_type": "SCALAR",
"compression_ratio": 4,
"advanced_params": {
"neighbors": 32,
"efConstruction": 128,
"rescore_factor": 4,
"algorithm": "uniform_quantization"
}
},
"metadata_index_params": {
"auto_index": true,
"include_paths": ["category", "price"]
},
"parallel_creation": 2
}
}'
Example curl request – Create IVF index with explicit defaults
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-indexes/" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-u "<user>:<password>" \
-d '{
"tableName": "product_vectors",
"indexParams": {
"vector_index_params": {
"auto_index": true,
"organization": "PARTITIONS",
"distance_metric": "COSINE",
"advanced_params": {
"partitions": 16
}
},
"parallel_creation": 2
}
}'
Example 200 response
{
"job_creator": "APPUSER",
"job_name": "VECDB_CREATE_INDEX_20260501100000",
"job_type": "PLSQL_BLOCK",
"operation": "CREATE",
"state": "SUCCEEDED",
"start_date": "2026-05-01T10:00:00.302367Z",
"links": [
{
"href": "/vecdb/vector-indexes/jobs/",
"rel": "collection"
},
{
"href": "/vecdb/vector-indexes/jobs/vecdb_create_index_20260501100000/",
"rel": "self"
},
{
"href": "/vecdb/vector-indexes/jobs/vecdb_create_index_20260501100000/jobfile",
"rel": "related"
}
]
}
Response 400 – the request body included invalid parameters.
Response 404 – the vector table was not found.
GET /vecdb/vector-indexes/{vector_table_name}
Get the current status and configuration of a vector table’s index.
Returns detailed information about the index including its type, parameters, build status, and statistics.
Path parameter
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| vector_table_name | string | Valid vector table identifier | Yes | No default | Name of the vector table whose index to describe. | Maps to PL/SQL table_name; table must exist in the database schema. |
Returns
JSON response containing the current index status.
Example curl request
curl -X GET \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-indexes/product_vectors" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>"
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>"
Example 200 response
{
"Index Status": "Index build in progress...\nCurrent progress: 75%"
}
Response 400 – the request body included invalid parameters.
Response 404 – the vector table was not found.
GET /vecdb/vector-indexes/jobs/
List all index build and rebuild jobs.
Returns metadata for all CREATE and REBUILD index operations, including their current states and progress.
Returns
JSON response containing an array of index jobs with job names, owners, states, start timestamps, and log file links.
Example curl request
curl -X GET \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-indexes/jobs/" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>"
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>"
Example 200 response
{
"count": 1,
"hasMore": false,
"items": [
{
"job_creator": "APPUSER",
"job_name": "VECDB_CREATE_INDEX_20260501100000",
"job_type": "PLSQL_BLOCK",
"operation": "CREATE",
"state": "SUCCEEDED",
"start_date": "2026-05-01T10:00:00.302367Z",
"links": [
{
"href": "/vecdb/vector-indexes/jobs/vecdb_create_index_20260501100000",
"rel": "self"
},
{
"href": "/vecdb/vector-indexes/jobs/vecdb_create_index_20260501100000/jobfile",
"rel": "related"
}
]
}
],
"limit": 25,
"offset": 0
}
GET /vecdb/vector-indexes/jobs/{index_job_name}/
Retrieve metadata and status for a specific index build job.
Returns details about an asynchronous index creation or rebuild job, including its current state, owner, and log file location.
Path parameter
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| index_job_name | string | Valid string | Yes | No default | Name of the index job to describe. | Use a job name returned by POST /vecdb/vector-indexes/ or GET /vecdb/vector-indexes/jobs/. |
Returns
JSON response describing the index job including job name, owner, operation, state, timestamp, and log file links.
Example curl request
curl -X GET \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-indexes/jobs/VECDB_CREATE_INDEX_20260501100000/" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>"
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>"
Example 200 response
{
"job_creator": "APPUSER",
"job_name": "VECDB_CREATE_INDEX_20260501100000",
"job_type": "PLSQL_BLOCK",
"operation": "CREATE",
"state": "SUCCEEDED",
"start_date": "2026-05-01T10:00:00.302367Z",
"links": [
{
"href": "/vecdb/vector-indexes/jobs/",
"rel": "collection"
},
{
"href": "/vecdb/vector-indexes/jobs/vecdb_create_index_20260501100000/",
"rel": "self"
},
{
"href": "/vecdb/vector-indexes/jobs/vecdb_create_index_20260501100000/jobfile",
"rel": "related"
}
]
}
GET /vecdb/vector-indexes/jobs/{index_job_name}/jobfile
Retrieve the log output for an index build job.
Returns detailed log file metadata for diagnosing index creation issues or monitoring progress.
Path parameter
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| index_job_name | string | Valid string | Yes | No default | Name of the index job. | Use a job name returned by POST /vecdb/vector-indexes/ or GET /vecdb/vector-indexes/jobs/. |
Returns
JSON response containing log file metadata.
Example curl request
curl -X GET \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-indexes/jobs/VECDB_CREATE_INDEX_20260501100000/jobfile" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>"
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>"
Example 200 response
{
"actual_start_date": "2026-05-01T10:00:00.32485Z",
"additional_info": null,
"error#": 0,
"job_name": "VECDB_CREATE_INDEX_20260501100000",
"links": [
{
"href": "/vecdb/vector-indexes/jobs/VECDB_CREATE_INDEX_20260501100000/",
"rel": "collection"
}
],
"log_date": "2026-05-01T10:00:00.772103Z",
"run_duration": "P0DT0H0M0S",
"status": "SUCCEEDED"
}
POST /vecdb/vector-indexes/{vector_table_name}
Rebuild an existing vector index with updated parameters.
Recreates the index, optionally with new configuration parameters. The rebuild runs asynchronously as a background job.
Path parameter
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| vector_table_name | string | Valid vector table identifier | Yes | No default | Name of the vector table whose indexes are rebuilt. | Maps to PL/SQL table_name; table must exist in the database schema. |
Request body
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
indexParams |
object | Object or NULL | No | null | Rebuild scope and vector index configuration. | Maps to PL/SQL index_params; metadata_index_params.auto_index is not supported for rebuild. |
| debugFlags | object | Object or NULL | No | null | Debug or tracing flags for detailed logging. | Maps to PL/SQL debug_flags; optional unless diagnostics are needed. |
Returns
JSON response containing the rebuild job ID and status.
Example curl request - Vector-only rebuild
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-indexes/product_vectors" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"indexParams": {
"index_type": "vector",
"parallel_creation": 4
}
}'
Example curl request - Metadata-only rebuild
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-indexes/product_vectors" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"indexParams": {
"index_type": "metadata",
"metadata_index_params": {
"include_paths": ["tenant"]
}
}
}'
Example curl request - All-index rebuild
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-indexes/product_vectors" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"indexParams": {
"index_type": "all",
"parallel_creation": 4
}
}'
Example 200 response
{
"job_creator": "APPUSER",
"job_name": "VECDB_REBUILD_INDEX_20260501103000",
"job_type": "PLSQL_BLOCK",
"operation": "REBUILD",
"state": "RUNNING",
"start_date": "2026-05-01T10:30:00.118886Z",
"links": [
{
"href": "/vecdb/vector-indexes/jobs/",
"rel": "collection"
},
{
"href": "/vecdb/vector-indexes/jobs/vecdb_rebuild_index_20260501103000/",
"rel": "self"
},
{
"href": "/vecdb/vector-indexes/jobs/vecdb_rebuild_index_20260501103000/jobfile",
"rel": "related"
}
]
}
Response 400 – the request body included invalid parameters.
Response 404 – the vector table was not found.
POST /vecdb/vector-indexes/{vector_table_name}/delete
Drop vector and metadata indexes from a table.
Removes selected vector or metadata indexes while preserving the table and its data. Use this POST action endpoint for targeted index deletion because DELETE operations do not carry a request body in the REST/OpenAPI contract.
Path parameter
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
| vector_table_name | string | Valid vector table identifier | Yes | No default | Name of the vector table whose indexes are dropped. | Maps to PL/SQL table_name; table must exist in the database schema. |
Request body
| Parameter | Type | Value Range | Required | Default | Description | Notes |
|---|---|---|---|---|---|---|
indexParams |
object | Object or NULL | No | null | Drop scope and metadata path selection. | Maps to PL/SQL index_params; supports index_type, metadata_index_params.include_paths, and metadata_index_params.exclude_paths. |
| debugFlags | object | Object or NULL | No | null | Debug or tracing flags for detailed logging. | Maps to PL/SQL debug_flags; optional unless diagnostics are needed. |
Returns
JSON response confirming index deletion.
Example curl request - Drop vector indexes only
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-indexes/product_vectors/delete" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"indexParams": {
"index_type": "vector"
}
}'
Example curl request - Drop selected metadata indexes
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-indexes/product_vectors/delete" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"indexParams": {
"index_type": "metadata",
"metadata_index_params": {
"include_paths": ["tenant"]
}
}
}'
Example curl request - Drop all indexes
curl -X POST \
"https://<host>:<port>/ords/<schema>/_/db-api/stable/vecdb/vector-indexes/product_vectors/delete" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
# Choose ONE authentication method:
# Option 1: Basic authentication
-u "<user>:<password>" \
# Option 2: OAuth Bearer token
# -H "Authorization: Bearer <access_token>" \
-d '{
"indexParams": {
"index_type": "all"
}
}'
Example 200 response
{
"message": "MVI index(es) for paths [tenant] dropped successfully from table PRODUCT_VECTORS"
}
Response 400 – the request body included invalid parameters.
Response 404 – the vector table was not found.
Shared Parameter Objects
Use these shared object definitions for request body parameters that accept nested configuration objects.
tableParams
tableParams defines REST table-level creation settings and maps to the PL/SQL table_params object.
| Field | Type | Value Range | Required | Description | Notes |
|---|---|---|---|---|---|
auto_generate_id |
boolean | true, false |
No | Controls whether the database automatically generates IDs for inserted records. | Defaults to false; set to true when callers do not provide explicit IDs. |
embedParams
embedParams defines how the database generates embeddings automatically from metadata content and maps to the PL/SQL embed_params object.
Use embedParams when the table should store vectors generated from text in each row’s metadata object. Set model to a loaded embedding model. Set embed_metadata_jsonpath to the metadata field that contains the text to embed, such as description or details.summary.
To select metadata content for embedding, choose the field that contains the natural-language text. For metadata such as {"description":"Compact wireless headphones","details":{"summary":"Noise-canceling audio"}}, use description to embed the top-level description, or use details.summary to embed the nested summary. Other metadata fields remain available for filtering or indexing, but they are not used as embedding input by this setting.
Resource usage: Configuring embedParams causes embedding to occur inside Oracle AI Database whenever an operation supplies text that requires a vector. The embedding work uses database CPU resources and is performed inline with the operation. Consider workload volume and latency requirements when choosing between integrated embedding and precomputed vectors.
| Field | Type | Value Range | Required | Description | Notes |
|---|---|---|---|---|---|
model |
string | 1-128 chars | Yes | Name of the loaded embedding model to use for automatic embedding. | Model must exist in the database schema. Use a model name returned by GET /vecdb/models/; load one with POST /vecdb/models/ if needed. |
embed_metadata_jsonpath |
string | 1-128 chars | Yes | Metadata field or JSON path that selects the text value to embed. | Use a simple field name, such as description, or a JSON path, such as details.summary. Each inserted or loaded row’s metadata must contain this path, and the selected value should be text. |
indexParams
indexParams defines how vector and metadata indexes are created and managed. It maps to the PL/SQL index_params object.
| Field | Type | Value Range | Required | Description | Notes |
|---|---|---|---|---|---|
index_type |
string | vector, metadata, all |
No | Index rebuild or drop scope. | Use with rebuild or deletion to target vector indexes, metadata indexes, or all indexes. For rebuild, omit to infer the target from supplied vector_index_params or metadata_index_params; use all when metadata parameters are supplied and the vector index should also be rebuilt. Omit for create flows. |
vector_index_params |
object | vector_index_params object |
No | Controls how the vector index is built and managed. | Contains vector index settings and advanced tuning parameters. |
metadata_index_params |
object | metadata_index_params object |
No | Controls how metadata JSON paths are indexed and maintained. | Supports automatic path discovery and explicit include/exclude overrides. |
parallel_creation |
number | >= 1 | No | Controls index creation or rebuild parallelism. | Uses parallel DDL for vector and metadata index creation when supported; defaults to 1 when normalized. |
vector_index_params
vector_index_params controls vector index configuration for vector table creation, index creation, and rebuild. It defines how the vector index is built and managed, including vector index settings and advanced tuning parameters.
| Field | Type | Value Range | Required | Description | Notes |
|---|---|---|---|---|---|
auto_index |
boolean | true, false |
No | Controls whether the vector index is created automatically or only when requested explicitly. | Defaults to true when vector parameters are normalized. Set to false when you want to create or manage the vector index through explicit index lifecycle operations. |
organization |
string | PARTITIONS, INMEMORY GRAPH |
No | Controls vector index organization. | Defaults to PARTITIONS. PARTITIONS builds an IVF index, and INMEMORY GRAPH builds an HNSW index. |
distance_metric |
string | MANHATTAN, DOT, COSINE, EUCLIDEAN, EUCLIDEAN_SQUARED, L2_SQUARED |
No | Distance or similarity metric used by the vector index. | Defaults to COSINE when omitted. Validation is case-insensitive. For more information, see Vector Distance Metrics. |
accuracy |
number | 0-100 | No | Controls target index accuracy. | Optional tuning parameter. The implementation default is used when omitted. Use this value to adjust the trade-off between speed and accuracy. For more information, see Understand Approximate Similarity Search Using Vector Indexes. |
quantization_type |
string or null | NONE, SCALAR |
No | Vector index quantization mode. | Use SCALAR with compression_ratio to compress vectors. Omit or use NONE when scalar quantization is not needed. Quantization is supported only with HNSW indexes. |
compression_ratio |
number or null | 2, 4, 8 |
No | Controls how much to compress vectors when scalar quantization is enabled. | Populate when quantization_type is SCALAR. Valid values are 2, 4, and 8. |
advanced_params |
object | advanced_params object |
No | Advanced vector index tuning parameters. | Supported fields depend on organization. Use partitions with PARTITIONS; use graph parameters, such as neighbors and efConstruction, with INMEMORY GRAPH. |
metadata_index_params
metadata_index_params controls how metadata JSON paths are indexed and maintained for metadata filtering. Use it when you want the database to discover metadata paths automatically, force specific paths to be indexed, exclude paths that should not be indexed, or disable metadata indexing.
| Field | Type | Value Range | Required | Description | Notes |
|---|---|---|---|---|---|
auto_index |
boolean | true, false |
No | Controls whether metadata indexes are automatically created and maintained. | Defaults to true in create flows. When true, the database automatically creates and maintains indexes on qualifying metadata paths, up to the supported limit. When false, only user-specified paths are indexed. |
include_paths |
array of string | JSON paths or * |
No | Explicit list of metadata JSON paths to include in metadata indexing. | Use explicit paths, such as year or details.genre, to force those paths into the metadata index selection. Use * to request all qualifying paths. Exact paths are normalized. |
exclude_paths |
array of string | JSON paths or * |
No | Explicit list of metadata JSON paths to exclude from metadata indexing. | Use explicit paths to override automatic selection or an include_paths wildcard. include_paths=["*"] with exclude_paths=["*"] is invalid. |
Metadata indexing supports up to the first 50 qualifying paths when automatic path discovery is used. Qualifying paths are scalar metadata values that can be indexed. Arrays, objects, strings longer than 2 KB, and the path referenced by embed_metadata_jsonpath are not qualifying metadata index paths.
Use these common patterns:
{
"metadata_index_params": {
"auto_index": true
}
}
Automatically discover and index qualifying metadata paths, up to the supported limit.
{
"metadata_index_params": {
"auto_index": false,
"include_paths": ["year", "genre"]
}
}
Index only the selected metadata paths.
{
"metadata_index_params": {
"include_paths": ["*"],
"exclude_paths": ["title"]
}
}
Request all qualifying metadata paths except the excluded paths.
advanced_params
advanced_params controls vector index tuning.
| Field | Type | Value Range | Required | Description | Notes |
|---|---|---|---|---|---|
partitions |
number | 1-10000000 | No | IVF or partition count. | Applies to PARTITIONS. |
neighbors |
number | 1-2048 | No | HNSW graph neighbor count. | Applies to INMEMORY GRAPH. |
efConstruction |
number | 1-65535 | No | HNSW construction beam width. | Applies to INMEMORY GRAPH. |
rescore_factor |
number | 1-100 | No | Rescore factor for HNSW index tuning. | Use only with scalar quantization. |
algorithm |
string | uniform_quantization |
No | HNSW quantization algorithm. | Used with scalar quantization settings. |
Error Catalogue
| Status Code | Description |
|---|---|
| 400 Bad Request | Validation problems, incompatible payloads, or attempts to drop models still referenced by tables. |
| 404 Not Found | Target model, table, index, or job does not exist. |
| 409 Conflict | Resource already exists (for example, attempting to create a duplicate table). |