OriginChainDB
Database endpoints

Fetch vector records

Read up to 1,000 vector records by ID from one namespace.

POST /v1/tenants/{tenant}/vector-indexes/{index}/records/fetch

Retrieve vector records by their IDsVector values and sparse data are included only when requested.
  1. Choose namespace and IDsSupply the specific records you want to read.
  2. Select returned fieldsRequest needed metadata, text or vector values.
  3. Inspect records and missing IDsKeep revision tokens for conditional updates.

Before you start

Use your database bearer token.

Connection setup

Use the target vector index and, where required, its namespace. The examples use index demo-search and namespace demo.

Path parameters

FieldTypeRequired
tenantstringRequired
indexstringRequired

Headers

FieldTypeRequiredDescription
x-oc-db-userstringOptionalActing database user (role, grant and row-policy checks). Send with x-oc-db-key.
x-oc-db-keystringOptionalAPI key of the x-oc-db-user user.

Request body

application/json

Limits and accepted values
  • ids: 1-1,000 distinct ids.
  • include_metadata defaults to true, the other include_* to false.
  • metadata_fields (at most 64) narrows metadata and cannot be combined with include_metadata: false;
  • text_fields at most 16.
  • include_pending needs manage and currently answers 501.
FieldTypeRequired
idsstring[]Required
Fields in ids
FieldTypeRequired
idsstringOptional
FieldTypeRequired
include_metadatabooleanOptional
include_pendingbooleanOptional
include_sparsebooleanOptional
include_valuesbooleanOptional
metadata_fieldsstring[]Optional
Fields in metadata_fields
FieldTypeRequired
metadata_fieldsstringOptional
FieldTypeRequired
namespacestringRequired
text_fieldsstring[]Optional
Fields in text_fields
FieldTypeRequired
text_fieldsstringOptional

Read the result

records is keyed by record ID; missing lists requested IDs that were not found. Save a record's revision_token if you plan a conditional update. Values and sparse data are omitted unless requested.

Response statuses

HTTP status reference
StatusWhat to do
200OK
400Correct the request before retrying.
401Check the credential and Authorization header.
402Check feature access or available credits.
403Check tenant access, roles and permissions.
404Check the resource ID and API route.
409Resolve the conflict before retrying.
413Split or reduce the request body.
415Send the required Content-Type.
422Correct the values or unsupported combination.
429Honor Retry-After when present; back off.
500Check the outcome before retrying a write.
501Check deployment support for this operation.
503Honor Retry-After when present; check write outcomes.
© 2026 Silicoyn Technologies Pvt Ltd