import { createClient } from '@ondb/sdk';const client = createClient({ endpoint: string, // OnDB server endpoint appKey?: string, // App API key for writes (X-App-Key header) appId?: string, // Application ID for automatic root building timeout?: number, // Request timeout (default: 30000ms) retryCount?: number, // Retry attempts (default: 3) retryDelay?: number, // Retry delay (default: 1000ms)});
API Overview
Client
createClient and core methods
Query Builder
Fluent query API reference
Database Manager
Collections, indexes, and views
Types
Type definitions
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"OnDB Documentation","colors":{"primary":"#005EFE","light":"#CAEFFF","dark":"#358BFA"},"logo":{"light":"https://mintcdn.com/onchaindbinc/VD1tl64ZAh0b7Uis/images/logo-full-black-text.svg?fit=max\u0026auto=format\u0026n=VD1tl64ZAh0b7Uis\u0026q=85\u0026s=6337dd081e6bd5e8c079cd7fc1d49d62","dark":"https://mintcdn.com/onchaindbinc/VD1tl64ZAh0b7Uis/images/logo-full-white-text.svg?fit=max\u0026auto=format\u0026n=VD1tl64ZAh0b7Uis\u0026q=85\u0026s=669c936747ebdee6271a5a02d91e0e17","href":"/"},"favicon":"https://mintcdn.com/onchaindbinc/VD1tl64ZAh0b7Uis/images/logo-ondb.png?fit=max\u0026auto=format\u0026n=VD1tl64ZAh0b7Uis\u0026q=85\u0026s=da6aa45308eb500ef35260760eecb569","appearance":{"default":"system"},"navbar":{"links":[{"href":"mailto:support@ondb.io","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.ondb.ai"}},"footer":{"socials":{"x":"https://x.com/ondbai","github":"https://github.com/ondbai"}},"seo":{},"contextual":{"options":["copy","view","claude","chatgpt","perplexity","grok","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://app.ondb.ai"},{"anchor":"GitHub","icon":"github","href":"https://github.com/ondbai"},{"anchor":"llms.txt","icon":"robot","href":"https://docs.ondb.ai/llms-full.txt"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"onchaindbinc","hasAudioNarration":false,"actualSubdomain":"onchaindbinc","customDomains":["docs.ondb.ai"],"gitSource":{"type":"github","owner":"ondbai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae94383f43bdafb4937776f:success","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"API Reference","count":72},{"language":"default","tag":"Guides","count":30},{"language":"default","tag":"Collections","count":7},{"language":"default","tag":"Advanced","count":6},{"language":"default","tag":"Core Concepts","count":6},{"language":"default","tag":"Querying Data","count":6},{"language":"default","tag":"Materialized Views","count":6},{"language":"default","tag":"Predefined Queries","count":6},{"language":"default","tag":"SDK Reference","count":5},{"language":"default","tag":"CRUD Operations","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/introduction","slug":"/api-reference/introduction","pageMetadata":{"title":"SDK Reference","description":"Complete reference for OnDB SDKs","href":"/api-reference/introduction"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Complete reference for OnDB SDKs\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,CodeGroup,Heading}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`installation`,children:`Installation`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`TypeScript (npm)`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @ondb/sdk`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript (yarn)`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`yarn`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @ondb/sdk`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`quick-start`,children:`Quick Start`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`20`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@ondb/sdk'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` endpoint:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.ondb.io'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` appId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your-app-id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` appKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your-app-key'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Store data`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` collection:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'users'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [{ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Alice'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`email:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'alice@example.com'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Query data`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` users`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`queryBuilder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`collection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'users'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`whereField`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'active'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`isTrue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`limit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`execute`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`client-initialization`,children:`Client Initialization`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@ondb/sdk'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` endpoint:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// OnDB server endpoint`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` appKey?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// App API key for writes (X-App-Key header)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` appId?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Application ID for automatic root building`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` timeout?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Request timeout (default: 30000ms)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` retryCount?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Retry attempts (default: 3)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` retryDelay?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` number`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Retry delay (default: 1000ms)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`api-overview`,children:`API Overview`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Client`,icon:`plug`,href:`/api-reference/client`,children:_jsx(_components.p,{children:`createClient and core methods`})}),_jsx(Card,{title:`Query Builder`,icon:`magnifying-glass`,href:`/api-reference/query-builder`,children:_jsx(_components.p,{children:`Fluent query API reference`})}),_jsx(Card,{title:`Database Manager`,icon:`database`,href:`/api-reference/database-manager`,children:_jsx(_components.p,{children:`Collections, indexes, and views`})}),_jsx(Card,{title:`Types`,icon:`code`,href:`/api-reference/types`,children:_jsx(_components.p,{children:`Type definitions`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"SDK Reference","description":"Complete reference for OnDB SDKs","href":"/api-reference/introduction"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Installation","slug":"installation","depth":2,"children":[]},{"title":"Quick Start","slug":"quick-start","depth":2,"children":[]},{"title":"Client Initialization","slug":"client-initialization","depth":2,"children":[]},{"title":"API Overview","slug":"api-overview","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"onchaindbinc","siteName":"OnDB Documentation","title":"SDK Reference - OnDB Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-03-16T12:35:06.275Z","originalFileLocation":"api-reference/introduction.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Complete reference for OnDB SDKs\">\u003cmeta data-mint-head name=\"application-name\" content=\"OnDB Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/onchaindbinc/9qDdD06rCzBjMHVp/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/onchaindbinc/9qDdD06rCzBjMHVp/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/onchaindbinc/9qDdD06rCzBjMHVp/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/onchaindbinc/9qDdD06rCzBjMHVp/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/onchaindbinc/9qDdD06rCzBjMHVp/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/onchaindbinc/9qDdD06rCzBjMHVp/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/onchaindbinc/9qDdD06rCzBjMHVp/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/onchaindbinc/9qDdD06rCzBjMHVp/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/onchaindbinc/9qDdD06rCzBjMHVp/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"SDK Reference - OnDB Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Complete reference for OnDB SDKs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"OnDB Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.ondb.ai/api-reference/introduction\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://onchaindbinc.mintlify.site/_mintlify/api/og/v2?division=SDK+Reference\u0026amp;title=SDK+Reference\u0026amp;description=Complete+reference+for+OnDB+SDKs\u0026amp;theme=9e25357d88dd3a1dc4bafccc\u0026amp;signature=61cdb8f9d840ea7114cde5ae48cc5b062150fc06f385c652fd4e9067cb7ef82f\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"SDK Reference - OnDB Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Complete reference for OnDB SDKs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://onchaindbinc.mintlify.site/_mintlify/api/og/v2?division=SDK+Reference\u0026amp;title=SDK+Reference\u0026amp;description=Complete+reference+for+OnDB+SDKs\u0026amp;theme=9e25357d88dd3a1dc4bafccc\u0026amp;signature=61cdb8f9d840ea7114cde5ae48cc5b062150fc06f385c652fd4e9067cb7ef82f\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/onchaindbinc/9qDdD06rCzBjMHVp/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"OnDB Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#005EFE\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.ondb.ai/api-reference/introduction\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/introduction.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.ondb.ai/#organization\",\"name\":\"OnDB Documentation\",\"url\":\"https://docs.ondb.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/onchaindbinc/VD1tl64ZAh0b7Uis/images/logo-full-black-text.svg?fit=max\u0026auto=format\u0026n=VD1tl64ZAh0b7Uis\u0026q=85\u0026s=6337dd081e6bd5e8c079cd7fc1d49d62\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.ondb.ai#website\",\"name\":\"OnDB Documentation\",\"url\":\"https://docs.ondb.ai\",\"publisher\":{\"@id\":\"https://docs.ondb.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.ondb.ai/api-reference/introduction#webpage\",\"url\":\"https://docs.ondb.ai/api-reference/introduction\",\"name\":\"SDK Reference\",\"description\":\"Complete reference for OnDB SDKs\",\"dateModified\":\"2026-03-16T12:35:06.275Z\",\"isPartOf\":{\"@id\":\"https://docs.ondb.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.ondb.ai/api-reference/introduction#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.ondb.ai/api-reference/introduction#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"OnDB Documentation\",\"item\":\"https://docs.ondb.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SDK Reference\",\"item\":\"https://docs.ondb.ai/api-reference/introduction\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.ondb.ai/api-reference/introduction#article\",\"headline\":\"SDK Reference\",\"name\":\"SDK Reference\",\"description\":\"Complete reference for OnDB SDKs\",\"url\":\"https://docs.ondb.ai/api-reference/introduction\",\"mainEntityOfPage\":{\"@id\":\"https://docs.ondb.ai/api-reference/introduction#webpage\"},\"dateModified\":\"2026-03-16T12:35:06.275Z\",\"publisher\":{\"@id\":\"https://docs.ondb.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.ondb.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"OnDB Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"OnDB Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/introduction.md","siteName":"OnDB Documentation","nav":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://app.ondb.ai"},{"anchor":"GitHub","icon":"github","href":"https://github.com/ondbai"},{"anchor":"llms.txt","icon":"robot","href":"https://docs.ondb.ai/llms-full.txt"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API Reference","groups":[{"group":"SDK Reference","pages":[{"title":"SDK Reference","href":"/api-reference/introduction"},{"title":"Client","description":"Client initialization and core methods","href":"/api-reference/client"},{"title":"Query Builder","href":"/api-reference/query-builder"},{"title":"Database Manager","href":"/api-reference/database-manager"},{"title":"Types","href":"/api-reference/types"}]},{"group":"Health","pages":[{"title":"Health check endpoint with comprehensive system verification\nGET /health","deprecated":null,"version":null,"openapi":"/openapi.yaml get /","href":"/api-reference/health/health-check-endpoint-with-comprehensive-system-verificationget-health"}]},{"group":"Applications","pages":[{"title":"List all registered applications from OnDB storage","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/apps","href":"/api-reference/applications/list-all-registered-applications-from-ondb-storage"},{"title":"Updated create application endpoint with financial integration and OnDB storage\nRequires payment proof via X-PAYMENT header","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/apps","href":"/api-reference/applications/updated-create-application-endpoint-with-financial-integration-and-ondb-storagerequires-payment-proof-via-x-payment-header"},{"title":"Get application details\nGET /api/applications/:app_id","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/apps/{app_id}","href":"/api-reference/applications/get-application-detailsget-apiapplications:app_id"},{"title":"Update creator premium settings for an app","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/apps/{app_id}/creator-premium","href":"/api-reference/applications/update-creator-premium-settings-for-an-app"}]},{"group":"Data Storage","pages":[{"title":"Store blob endpoint - Upload binary data (images, videos, files, etc.)\nPOST /api/apps/:app_id/blobs/:collection","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/apps/{app_id}/blobs/{collection}","href":"/api-reference/data-storage/store-blob-endpoint--upload-binary-data-images-videos-files-etcpost-apiapps:app_idblobs:collection"},{"title":"Retrieve blob endpoint\nGET /api/apps/:app_id/blobs/:collection/:blob_id","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/apps/{app_id}/blobs/{collection}/{blob_id}","href":"/api-reference/data-storage/retrieve-blob-endpointget-apiapps:app_idblobs:collection:blob_id"},{"title":"Handler for SQL INSERT statements","deprecated":null,"version":null,"openapi":"/openapi.yaml post /insert/sql","href":"/api-reference/data-storage/handler-for-sql-insert-statements"},{"title":"Store data endpoint - app::collection based only\nPOST /store","deprecated":null,"version":null,"openapi":"/openapi.yaml post /store","href":"/api-reference/data-storage/store-data-endpoint--app::collection-based-onlypost-store"}]},{"group":"Collections","pages":[{"title":"List all collections for an app\nGET /api/apps/:app_id/collections","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/apps/{app_id}/collections","href":"/api-reference/collections/list-all-collections-for-an-appget-apiapps:app_idcollections"},{"title":"Create a new collection\nPOST /api/apps/:app_id/collections","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/apps/{app_id}/collections","href":"/api-reference/collections/create-a-new-collectionpost-apiapps:app_idcollections"},{"title":"Get a specific collection\nGET /api/apps/:app_id/collections/:collection_id","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/apps/{app_id}/collections/{collection_id}","href":"/api-reference/collections/get-a-specific-collectionget-apiapps:app_idcollections:collection_id"},{"title":"Delete a collection\nDELETE /api/apps/:app_id/collections/:collection_id","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /api/apps/{app_id}/collections/{collection_id}","href":"/api-reference/collections/delete-a-collectiondelete-apiapps:app_idcollections:collection_id"},{"title":"Patch apiapps collections","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /api/apps/{app_id}/collections/{collection_id}","href":"/api-reference/collections/patch-apiapps-collections"},{"title":"Update collection sharding configuration\nPATCH /api/apps/:app_id/collections/:collection_name/sharding","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /api/apps/{app_id}/collections/{collection_name}/sharding","href":"/api-reference/collections/update-collection-sharding-configurationpatch-apiapps:app_idcollections:collection_namesharding"},{"title":"Auto-generated collection query endpoint\nGET /api/apps/:app_id/collections/:collection/data","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/apps/{app_id}/collections/{collection}/data","href":"/api-reference/collections/auto-generated-collection-query-endpointget-apiapps:app_idcollections:collectiondata"}]},{"group":"Retention","pages":[{"title":"Get retention configuration for a collection\nGET /api/apps/:app_id/collections/:collection/retention","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/apps/{app_id}/collections/{collection}/retention","href":"/api-reference/retention/get-retention-configuration-for-a-collectionget-apiapps:app_idcollections:collectionretention"},{"title":"Set retention configuration for a collection\nPOST /api/apps/:app_id/collections/:collection/retention","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/apps/{app_id}/collections/{collection}/retention","href":"/api-reference/retention/set-retention-configuration-for-a-collectionpost-apiapps:app_idcollections:collectionretention"},{"title":"Get retention costs for all collections in an app\nGET /api/apps/:app_id/retention/cost","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/apps/{app_id}/retention/cost","href":"/api-reference/retention/get-retention-costs-for-all-collections-in-an-appget-apiapps:app_idretentioncost"}]},{"group":"Encryption","pages":[{"title":"Get encryption settings for an app\nGET /api/apps/:app_id/encryption","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/apps/{app_id}/encryption","href":"/api-reference/encryption/get-encryption-settings-for-an-appget-apiapps:app_idencryption"},{"title":"Update encryption settings for an app (x402 payment flow)\nPOST /api/apps/:app_id/encryption","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/apps/{app_id}/encryption","href":"/api-reference/encryption/update-encryption-settings-for-an-app-x402-payment-flowpost-apiapps:app_idencryption"},{"title":"Get quote for encryption feature changes\nPOST /api/apps/:app_id/encryption/quote","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/apps/{app_id}/encryption/quote","href":"/api-reference/encryption/get-quote-for-encryption-feature-changespost-apiapps:app_idencryptionquote"}]},{"group":"Indexes","pages":[{"title":"Get all indexes for an app\nGET /api/apps/:app_id/indexes","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/apps/{app_id}/indexes","href":"/api-reference/indexes/get-all-indexes-for-an-appget-apiapps:app_idindexes"},{"title":"Create an index for an app\nPOST /api/apps/:app_id/indexes","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/apps/{app_id}/indexes","href":"/api-reference/indexes/create-an-index-for-an-apppost-apiapps:app_idindexes"},{"title":"Get quote for creating an encrypted index (x402 flow)\nGET /api/apps/:app_id/indexes/encrypted-quote","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/apps/{app_id}/indexes/encrypted-quote","href":"/api-reference/indexes/get-quote-for-creating-an-encrypted-index-x402-flowget-apiapps:app_idindexesencrypted-quote"},{"title":"Delete an index\nDELETE /api/apps/:app_id/indexes/:index_id","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /api/apps/{app_id}/indexes/{index_id}","href":"/api-reference/indexes/delete-an-indexdelete-apiapps:app_idindexes:index_id"},{"title":"Create a collection relation and automatically index join fields\nPOST /api/apps/:app_id/relations","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/apps/{app_id}/relations","href":"/api-reference/indexes/create-a-collection-relation-and-automatically-index-join-fieldspost-apiapps:app_idrelations"}]},{"group":"API Keys","pages":[{"title":"List all API keys for an app\nPOST /api/apps/:app_id/keys/list","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/apps/{app_id}/keys/list","href":"/api-reference/api-keys/list-all-api-keys-for-an-apppost-apiapps:app_idkeyslist"},{"title":"Revoke a specific API key\nPOST /api/apps/:app_id/keys/:key_hash/revoke","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/apps/{app_id}/keys/{key_hash}/revoke","href":"/api-reference/api-keys/revoke-a-specific-api-keypost-apiapps:app_idkeys:key_hashrevoke"},{"title":"Regenerate an app API key (invalidates the old one)\nOr generate initial key if app doesn't have one yet\nPOST /api/apps/:app_id/regenerate-key","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/apps/{app_id}/regenerate-key","href":"/api-reference/api-keys/regenerate-an-app-api-key-invalidates-the-old-oneor-generate-initial-key-if-app-doesnt-have-one-yetpost-apiapps:app_idregenerate-key"},{"title":"Register a new user API key\nPOST /api/auth/register","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/auth/register","href":"/api-reference/api-keys/register-a-new-user-api-keypost-apiauthregister"}]},{"group":"Payout","pages":[{"title":"Get payout history\nPOST /api/apps/:app_id/payout/history","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/apps/{app_id}/payout/history","href":"/api-reference/payout/get-payout-historypost-apiapps:app_idpayouthistory"},{"title":"Get payout settings and available balance\nPOST /api/apps/:app_id/payout/info","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/apps/{app_id}/payout/info","href":"/api-reference/payout/get-payout-settings-and-available-balancepost-apiapps:app_idpayoutinfo"},{"title":"Update payout settings\nPOST /api/apps/:app_id/payout/settings","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/apps/{app_id}/payout/settings","href":"/api-reference/payout/update-payout-settingspost-apiapps:app_idpayoutsettings"},{"title":"Trigger a manual payout\nPOST /api/apps/:app_id/payout/trigger","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/apps/{app_id}/payout/trigger","href":"/api-reference/payout/trigger-a-manual-payoutpost-apiapps:app_idpayouttrigger"}]},{"group":"Wallet","pages":[{"title":"Get app wallet information\nGET /api/apps/:app_id/wallet","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/apps/{app_id}/wallet","href":"/api-reference/wallet/get-app-wallet-informationget-apiapps:app_idwallet"},{"title":"Get app wallet transactions\nGET /api/apps/:app_id/wallet/transactions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/apps/{app_id}/wallet/transactions","href":"/api-reference/wallet/get-app-wallet-transactionsget-apiapps:app_idwallettransactions"}]},{"group":"Authorization","pages":[{"title":"Get authz transaction history for an app\nGET /api/authz/transactions/app/:app_id","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/authz/transactions/app/{app_id}","href":"/api-reference/authorization/get-authz-transaction-history-for-an-appget-apiauthztransactionsapp:app_id"},{"title":"Get recent authz transactions (admin/monitoring)\nGET /api/authz/transactions/recent?limit=50","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/authz/transactions/recent","href":"/api-reference/authorization/get-recent-authz-transactions-adminmonitoringget-apiauthztransactionsrecent?limit=50"},{"title":"Get authz transaction history for a user\nGET /api/authz/transactions/:user_address","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/authz/transactions/{user_address}","href":"/api-reference/authorization/get-authz-transaction-history-for-a-userget-apiauthztransactions:user_address"}]},{"group":"Pricing","pages":[{"title":"Get current pricing information","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/pricing","href":"/api-reference/pricing/get-current-pricing-information"},{"title":"Post apipricingquote","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/pricing/quote","href":"/api-reference/pricing/post-apipricingquote"}]},{"group":"Predefined Queries","pages":[{"title":"Execute a predefined query with parameters\nGET /api/queries/:app_id/:query_name/data","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/queries/{app_id}/{query_name}/data","href":"/api-reference/predefined-queries/execute-a-predefined-query-with-parametersget-apiqueries:app_id:query_namedata"},{"title":"Get Skills.md for discovery (reads from disk)\nGET /api/skills/:app_id/skills.md","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/skills/{app_id}/skills.md","href":"/api-reference/predefined-queries/get-skillsmd-for-discovery-reads-from-diskget-apiskills:app_idskillsmd"},{"title":"List all predefined queries for an app\nGET /apps/:app_id/queries","deprecated":null,"version":null,"openapi":"/openapi.yaml get /apps/{app_id}/queries","href":"/api-reference/predefined-queries/list-all-predefined-queries-for-an-appget-apps:app_idqueries"},{"title":"Create a new predefined query\nPOST /apps/:app_id/queries","deprecated":null,"version":null,"openapi":"/openapi.yaml post /apps/{app_id}/queries","href":"/api-reference/predefined-queries/create-a-new-predefined-querypost-apps:app_idqueries"},{"title":"Get a specific predefined query definition\nGET /apps/:app_id/queries/:query_name","deprecated":null,"version":null,"openapi":"/openapi.yaml get /apps/{app_id}/queries/{query_name}","href":"/api-reference/predefined-queries/get-a-specific-predefined-query-definitionget-apps:app_idqueries:query_name"},{"title":"Delete a predefined query\nDELETE /apps/:app_id/queries/:query_name","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /apps/{app_id}/queries/{query_name}","href":"/api-reference/predefined-queries/delete-a-predefined-querydelete-apps:app_idqueries:query_name"}]},{"group":"View Query","pages":[{"title":"GET /api/views/:app_id/:view_name/count\nGet count of records in view (useful for pagination)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/views/{app_id}/{view_name}/count","href":"/api-reference/view-query/get-apiviews:app_id:view_namecountget-count-of-records-in-view-useful-for-pagination"},{"title":"GET /api/views/:app_id/:view_name/data\nSimple query with URL parameters","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api/views/{app_id}/{view_name}/data","href":"/api-reference/view-query/get-apiviews:app_id:view_namedatasimple-query-with-url-parameters"},{"title":"POST /api/views/:app_id/:view_name/data\nComplex query with request body (full Scepter query syntax)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api/views/{app_id}/{view_name}/data","href":"/api-reference/view-query/post-apiviews:app_id:view_namedatacomplex-query-with-request-body-full-scepter-query-syntax"}]},{"group":"API Collections","pages":[{"title":"List all collections for an app (including API collections)\nGET /apps/:app_id/api_collections","deprecated":null,"version":null,"openapi":"/openapi.yaml get /apps/{app_id}/api_collections","href":"/api-reference/api-collections/list-all-collections-for-an-app-including-api-collectionsget-apps:app_idapi_collections"},{"title":"Create a new API collection\nPOST /apps/:app_id/api_collections","deprecated":null,"version":null,"openapi":"/openapi.yaml post /apps/{app_id}/api_collections","href":"/api-reference/api-collections/create-a-new-api-collectionpost-apps:app_idapi_collections"},{"title":"Get API collection details\nGET /apps/:app_id/api_collections/:collection_name","deprecated":null,"version":null,"openapi":"/openapi.yaml get /apps/{app_id}/api_collections/{collection_name}","href":"/api-reference/api-collections/get-api-collection-detailsget-apps:app_idapi_collections:collection_name"},{"title":"Delete API collection\nDELETE /apps/:app_id/api_collections/:collection_name","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /apps/{app_id}/api_collections/{collection_name}","href":"/api-reference/api-collections/delete-api-collectiondelete-apps:app_idapi_collections:collection_name"}]},{"group":"Materialized Views","pages":[{"title":"List all materialized views for an app\nGET /apps/:app_id/views","deprecated":null,"version":null,"openapi":"/openapi.yaml get /apps/{app_id}/views","href":"/api-reference/materialized-views/list-all-materialized-views-for-an-appget-apps:app_idviews"},{"title":"Create a new materialized view\nPOST /apps/:app_id/views","deprecated":null,"version":null,"openapi":"/openapi.yaml post /apps/{app_id}/views","href":"/api-reference/materialized-views/create-a-new-materialized-viewpost-apps:app_idviews"},{"title":"Handler for SQL CREATE MATERIALIZED VIEW statements","deprecated":null,"version":null,"openapi":"/openapi.yaml post /apps/{app_id}/views/sql","href":"/api-reference/materialized-views/handler-for-sql-create-materialized-view-statements"},{"title":"Get a specific materialized view\nGET /apps/:app_id/views/:view_name","deprecated":null,"version":null,"openapi":"/openapi.yaml get /apps/{app_id}/views/{view_name}","href":"/api-reference/materialized-views/get-a-specific-materialized-viewget-apps:app_idviews:view_name"},{"title":"Delete a materialized view\nDELETE /apps/:app_id/views/:view_name","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /apps/{app_id}/views/{view_name}","href":"/api-reference/materialized-views/delete-a-materialized-viewdelete-apps:app_idviews:view_name"},{"title":"Manually refresh a materialized view\nPOST /apps/:app_id/views/:view_name/refresh","deprecated":null,"version":null,"openapi":"/openapi.yaml post /apps/{app_id}/views/{view_name}/refresh","href":"/api-reference/materialized-views/manually-refresh-a-materialized-viewpost-apps:app_idviews:view_namerefresh"}]},{"group":"Data Query","pages":[{"title":"List records with QueryExecutor\nPOST /list","deprecated":null,"version":null,"openapi":"/openapi.yaml post /list","href":"/api-reference/data-query/list-records-with-queryexecutorpost-list"},{"title":"Handler for SQL queries","deprecated":null,"version":null,"openapi":"/openapi.yaml post /query/sql","href":"/api-reference/data-query/handler-for-sql-queries"}]},{"group":"Tasks","pages":[{"title":"Get task status by ticket ID\nGET /api/tasks/:ticket_id","deprecated":null,"version":null,"openapi":"/openapi.yaml get /task/{ticket_id}","href":"/api-reference/tasks/get-task-status-by-ticket-idget-apitasks:ticket_id"}]},{"group":"X402 Payment Protocol","pages":[{"title":"POST /x402/settle - Execute and confirm payment","deprecated":null,"version":null,"openapi":"/openapi.yaml post /x402/settle","href":"/api-reference/x402-payment-protocol/post-x402settle--execute-and-confirm-payment"},{"title":"GET /x402/supported - List supported payment schemes","deprecated":null,"version":null,"openapi":"/openapi.yaml get /x402/supported","href":"/api-reference/x402-payment-protocol/get-x402supported--list-supported-payment-schemes"},{"title":"POST /x402/verify - Validate payment without executing","deprecated":null,"version":null,"openapi":"/openapi.yaml post /x402/verify","href":"/api-reference/x402-payment-protocol/post-x402verify--validate-payment-without-executing"}]}]},{"tab":"Resources","pages":[{"title":"Resources","href":"/resources/glossary"}]}]},"basePath":"","title":"SDK Reference - OnDB Documentation","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":[],"chunks":[]}