OriginChainDB
Database endpoints

Index JSON fields

Index the string values in a JSON document, optionally restricting which paths are searchable.

POST /v1/tenants/{tenant}/fts/{table}/{field}/json

Select which JSON text becomes searchableOnly string leaves are indexed; omitted paths include all string leaves.
  1. Supply the JSON documentKeep its source document ID.
  2. Choose searchable pathsOptionally restrict indexing with dotted paths.
  3. Index the selected stringsAn empty 201 response confirms the write.

Before you start

Use your database bearer token.

Connection setup

Choose the table, text field and JSON paths to index. The example uses demo_docs/body.

Path parameters

FieldTypeRequired
tenantstringRequired
tablestringRequired
fieldstringRequired

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
  • `paths` are dotted paths into `json`;
  • empty or absent indexes every string leaf.
  • Success is 201 with an empty body.
FieldTypeRequired
doc_idstringRequired
jsonany JSONRequired
pathsstring[]Optional
Fields in paths
FieldTypeRequired
pathsstringOptional

Read the result

Success is 201 with an empty body. Only string leaves in the selected dotted paths are indexed; omitting paths indexes every string leaf in the supplied JSON.

Response statuses

HTTP status reference
StatusWhat to do
201Created
400Correct the request before retrying.
401Check the credential and Authorization header.
402Check feature access or available credits.
403Check tenant access, roles and permissions.
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.
502Check service availability and the write outcome.
503Honor Retry-After when present; check write outcomes.
ยฉ 2026 Silicoyn Technologies Pvt Ltd