Skip to documentation
Ask the docs

OriginChainDB / Guides

Elasticsearch API: current support

Connect a 7.x client with the supported authentication formats, and check the operations and limits available on dedicated deployments.

Endpoint and credentials

Copy the HTTPS endpoint and tenant ID from the instance’s Connect dialog. The base URL is {HTTPS endpoint}/v1/tenants/{tenant}/es. Use the tenant ID, not the instance ID, and keep the OriginChainDB token on your server.

OptionHeader value
BearerBearer <token>
BasicBasic base64(<username>:<token>). Any username can be used; the OriginChainDB token is the password.
ApiKeyApiKey base64(<id>:<token>). The ID is a label; the secret is the OriginChainDB token.

Each value is sent in the Authorization header. Base64 is encoding, not encryption. These options use OriginChainDB credentials; they do not create Elasticsearch security API keys.

Set OC_ENDPOINT, OC_TENANT and OC_TOKEN in your server environment. The following request assumes a catalog index with a searchable title field.

curl "$OC_ENDPOINT/v1/tenants/$OC_TENANT/es/catalog/_search" \
  -H "Authorization: Bearer $OC_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"query":{"match":{"title":"notebook"}}}'

A client request

Use an Elasticsearch 7.x client. The API reports version 7.14.2; it does not claim Elasticsearch 8.x compatibility. This snippet illustrates endpoint and authentication configuration. Test the operations your application uses before switching traffic.

import { Client } from "@elastic/elasticsearch"; // Use a 7.x client.

const es = new Client({
  node: `${process.env.OC_ENDPOINT}/v1/tenants/${process.env.OC_TENANT}/es`,
  auth: { apiKey: { id: "originchain", api_key: process.env.OC_TOKEN } }
});

const result = await es.search({
  index: "catalog",
  body: { query: { match: { title: "notebook" } } }
});

Supported operations and boundaries

AreaAvailable behaviorLimits to check
Documents and bulkIndex, get, update and delete documents; bulk actions and multi-get.Update scripts are limited to simple field assignment and removal. Ingest pipelines are unavailable.
SearchSupported Query DSL, count, multi-search, highlighting and term suggestions.Cross-index requests refuse aggregations, suggesters, collapse and search_after. Phrase and completion suggesters are unavailable.
PaginationScroll and point-in-time reads, with open, continuation and close operations.Read the deployed capability limits. Async search returns synchronously.
AggregationsSupported bucket, metric and pipeline aggregations, including extended_stats.Support is a subset; nested, geo and composite aggregations are not available.
TemplatesLegacy, index and component templates applied when an index is created.Template aliases and data streams are unavailable. Search templates are a separate, unsupported operation.
Index configurationCreate indexes with supported mappings and settings; read settings and update mappings.Changing settings with PUT _settings and the full Elasticsearch index lifecycle are unavailable.
AnalysisNamed analyzers and a limited set of analyzer definitions.Do not assume arbitrary tokenizer or filter chains work. Inline definitions in _analyze are refused.

Limits and errors

Read GET /v1/capabilities on the instance for its supported operations and limits, including the search window, scroll and point-in-time limits.

curl "$OC_ENDPOINT/v1/capabilities" \
  -H "Authorization: Bearer $OC_TOKEN"

Unsupported APIs can return 501, a missing index returns 404, and refused request features can return 400 with an explanation. Unknown URL parameters are currently ignored. Send only documented parameters and verify the returned result; do not rely on every unsupported option being rejected.

Delete-by-query and update-by-query refuse options that would change the selected set in unsupported ways, such as pagination, sorting or point-in-time selection. URI query-string search options are supported for search and count, not those write operations.

Access control and suggestions

Database grants determine what a token may read or write. Searches, counts and gets apply row policies. Masks on the source document redact hits and can make field queries, sorts or aggregations unavailable. Updates, update-by-query and reindex operations are refused when the caller’s row policy or mask makes those rewrites unsafe.

Term suggestions use documents visible to the caller. Suggestion requests can fail with a timeout or throttling response; show that error instead of treating it as “no suggestions”.

Features outside this API

Ingest pipelines, general scripting, Kibana support, Elasticsearch security APIs, snapshots, lifecycle management, data streams and Elasticsearch kNN search are not offered by this release. A compatible authentication format alone does not verify a log shipper or dashboard integration.

For OriginChainDB vector retrieval, use the vector record API or the vector-table API. For instance navigation and available integrations, see the current console guide.

Elasticsearch and Kibana are trademarks of Elasticsearch B.V. OriginChainDB is not affiliated with or endorsed by Elasticsearch B.V.