# OnDB Documentation ## Docs - [Batch Operations](https://docs.ondb.ai/advanced/batch-operations.md): Bulk data operations with progress tracking, distributed coordination, and deduplication - [Blob Storage](https://docs.ondb.ai/advanced/blob-storage.md): Upload and retrieve binary files like images, videos, and documents - [Error Handling](https://docs.ondb.ai/advanced/error-handling.md): Comprehensive error handling with specific error types - [Sharding](https://docs.ondb.ai/advanced/sharding.md): Partition collections for high-scale datasets - [Task Management](https://docs.ondb.ai/advanced/task-management.md): Async operations with ticket-based status tracking - [Transaction Tracking](https://docs.ondb.ai/advanced/transaction-tracking.md): Monitor transaction status with events - [AI Coding Tools](https://docs.ondb.ai/ai-tools/setup.md): Configure AI coding assistants for OnDB development - [Create a new API collection POST /apps/:app_id/api_collections](https://docs.ondb.ai/api-reference/api-collections/create-a-new-api-collectionpost-apps:app_idapi_collections.md) - [Delete API collection DELETE /apps/:app_id/api_collections/:collection_name](https://docs.ondb.ai/api-reference/api-collections/delete-api-collectiondelete-apps:app_idapi_collections:collection_name.md) - [Get API collection details GET /apps/:app_id/api_collections/:collection_name](https://docs.ondb.ai/api-reference/api-collections/get-api-collection-detailsget-apps:app_idapi_collections:collection_name.md) - [List all collections for an app (including API collections) GET /apps/:app_id/api_collections](https://docs.ondb.ai/api-reference/api-collections/list-all-collections-for-an-app-including-api-collectionsget-apps:app_idapi_collections.md) - [List all API keys for an app POST /api/apps/:app_id/keys/list](https://docs.ondb.ai/api-reference/api-keys/list-all-api-keys-for-an-apppost-apiapps:app_idkeyslist.md) - [Regenerate an app API key (invalidates the old one) Or generate initial key if app doesn't have one yet POST /api/apps/:app_id/regenerate-key](https://docs.ondb.ai/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.md) - [Register a new user API key POST /api/auth/register](https://docs.ondb.ai/api-reference/api-keys/register-a-new-user-api-keypost-apiauthregister.md) - [Revoke a specific API key POST /api/apps/:app_id/keys/:key_hash/revoke](https://docs.ondb.ai/api-reference/api-keys/revoke-a-specific-api-keypost-apiapps:app_idkeys:key_hashrevoke.md) - [Get application details GET /api/applications/:app_id](https://docs.ondb.ai/api-reference/applications/get-application-detailsget-apiapplications:app_id.md) - [List all registered applications from OnDB storage](https://docs.ondb.ai/api-reference/applications/list-all-registered-applications-from-ondb-storage.md) - [Update creator premium settings for an app](https://docs.ondb.ai/api-reference/applications/update-creator-premium-settings-for-an-app.md) - [Updated create application endpoint with financial integration and OnDB storage Requires payment proof via X-PAYMENT header](https://docs.ondb.ai/api-reference/applications/updated-create-application-endpoint-with-financial-integration-and-ondb-storagerequires-payment-proof-via-x-payment-header.md) - [Get authz transaction history for a user GET /api/authz/transactions/:user_address](https://docs.ondb.ai/api-reference/authorization/get-authz-transaction-history-for-a-userget-apiauthztransactions:user_address.md) - [Get authz transaction history for an app GET /api/authz/transactions/app/:app_id](https://docs.ondb.ai/api-reference/authorization/get-authz-transaction-history-for-an-appget-apiauthztransactionsapp:app_id.md) - [Get recent authz transactions (admin/monitoring) GET /api/authz/transactions/recent?limit=50](https://docs.ondb.ai/api-reference/authorization/get-recent-authz-transactions-adminmonitoringget-apiauthztransactionsrecent?limit=50.md) - [Client](https://docs.ondb.ai/api-reference/client.md): Client initialization and core methods - [Auto-generated collection query endpoint GET /api/apps/:app_id/collections/:collection/data](https://docs.ondb.ai/api-reference/collections/auto-generated-collection-query-endpointget-apiapps:app_idcollections:collectiondata.md): Accepts any query parameters that match indexed fields in the collection. Example: GET /api/apps/app_123/collections/users/data?email=test@example.com&status=active - [Create a new collection POST /api/apps/:app_id/collections](https://docs.ondb.ai/api-reference/collections/create-a-new-collectionpost-apiapps:app_idcollections.md) - [Delete a collection DELETE /api/apps/:app_id/collections/:collection_id](https://docs.ondb.ai/api-reference/collections/delete-a-collectiondelete-apiapps:app_idcollections:collection_id.md) - [Get a specific collection GET /api/apps/:app_id/collections/:collection_id](https://docs.ondb.ai/api-reference/collections/get-a-specific-collectionget-apiapps:app_idcollections:collection_id.md) - [List all collections for an app GET /api/apps/:app_id/collections](https://docs.ondb.ai/api-reference/collections/list-all-collections-for-an-appget-apiapps:app_idcollections.md) - [Patch apiapps collections](https://docs.ondb.ai/api-reference/collections/patch-apiapps-collections.md) - [Update collection sharding configuration PATCH /api/apps/:app_id/collections/:collection_name/sharding](https://docs.ondb.ai/api-reference/collections/update-collection-sharding-configurationpatch-apiapps:app_idcollections:collection_namesharding.md) - [Handler for SQL queries](https://docs.ondb.ai/api-reference/data-query/handler-for-sql-queries.md): POST /query/sql Body: { "sql": "SELECT ... FROM app::collection WHERE ..." } - [List records with QueryExecutor POST /list](https://docs.ondb.ai/api-reference/data-query/list-records-with-queryexecutorpost-list.md) - [Handler for SQL INSERT statements](https://docs.ondb.ai/api-reference/data-storage/handler-for-sql-insert-statements.md): POST /insert/sql Body: { "sql": "INSERT INTO app::collection (col1, col2) VALUES (val1, val2)" } Headers: X-App-Key (required for write authorization) - [Retrieve blob endpoint GET /api/apps/:app_id/blobs/:collection/:blob_id](https://docs.ondb.ai/api-reference/data-storage/retrieve-blob-endpointget-apiapps:app_idblobs:collection:blob_id.md) - [Store blob endpoint - Upload binary data (images, videos, files, etc.) POST /api/apps/:app_id/blobs/:collection](https://docs.ondb.ai/api-reference/data-storage/store-blob-endpoint--upload-binary-data-images-videos-files-etcpost-apiapps:app_idblobs:collection.md) - [Store data endpoint - app::collection based only POST /store](https://docs.ondb.ai/api-reference/data-storage/store-data-endpoint--app::collection-based-onlypost-store.md) - [Database Manager](https://docs.ondb.ai/api-reference/database-manager.md): Collections, indexes, and views management - [Get encryption settings for an app GET /api/apps/:app_id/encryption](https://docs.ondb.ai/api-reference/encryption/get-encryption-settings-for-an-appget-apiapps:app_idencryption.md) - [Get quote for encryption feature changes POST /api/apps/:app_id/encryption/quote](https://docs.ondb.ai/api-reference/encryption/get-quote-for-encryption-feature-changespost-apiapps:app_idencryptionquote.md) - [Update encryption settings for an app (x402 payment flow) POST /api/apps/:app_id/encryption](https://docs.ondb.ai/api-reference/encryption/update-encryption-settings-for-an-app-x402-payment-flowpost-apiapps:app_idencryption.md): Headers: - X-PAYMENT: Base64-encoded payment proof (required if cost > 0) - [Health check endpoint with comprehensive system verification GET /health](https://docs.ondb.ai/api-reference/health/health-check-endpoint-with-comprehensive-system-verificationget-health.md) - [Create a collection relation and automatically index join fields POST /api/apps/:app_id/relations](https://docs.ondb.ai/api-reference/indexes/create-a-collection-relation-and-automatically-index-join-fieldspost-apiapps:app_idrelations.md) - [Create an index for an app POST /api/apps/:app_id/indexes](https://docs.ondb.ai/api-reference/indexes/create-an-index-for-an-apppost-apiapps:app_idindexes.md) - [Delete an index DELETE /api/apps/:app_id/indexes/:index_id](https://docs.ondb.ai/api-reference/indexes/delete-an-indexdelete-apiapps:app_idindexes:index_id.md) - [Get all indexes for an app GET /api/apps/:app_id/indexes](https://docs.ondb.ai/api-reference/indexes/get-all-indexes-for-an-appget-apiapps:app_idindexes.md) - [Get quote for creating an encrypted index (x402 flow) GET /api/apps/:app_id/indexes/encrypted-quote](https://docs.ondb.ai/api-reference/indexes/get-quote-for-creating-an-encrypted-index-x402-flowget-apiapps:app_idindexesencrypted-quote.md): Returns x402 payment requirements for creating an encrypted index - [SDK Reference](https://docs.ondb.ai/api-reference/introduction.md): Complete reference for OnDB SDKs - [Create a new materialized view POST /apps/:app_id/views](https://docs.ondb.ai/api-reference/materialized-views/create-a-new-materialized-viewpost-apps:app_idviews.md) - [Delete a materialized view DELETE /apps/:app_id/views/:view_name](https://docs.ondb.ai/api-reference/materialized-views/delete-a-materialized-viewdelete-apps:app_idviews:view_name.md) - [Get a specific materialized view GET /apps/:app_id/views/:view_name](https://docs.ondb.ai/api-reference/materialized-views/get-a-specific-materialized-viewget-apps:app_idviews:view_name.md) - [Handler for SQL CREATE MATERIALIZED VIEW statements](https://docs.ondb.ai/api-reference/materialized-views/handler-for-sql-create-materialized-view-statements.md): POST /apps/:app_id/views/sql Body: { "sql": "CREATE MATERIALIZED VIEW app::view AS SELECT ... FROM app::collection WHERE ..." } Headers: X-App-Key (required with Admin permission) - [List all materialized views for an app GET /apps/:app_id/views](https://docs.ondb.ai/api-reference/materialized-views/list-all-materialized-views-for-an-appget-apps:app_idviews.md) - [Manually refresh a materialized view POST /apps/:app_id/views/:view_name/refresh](https://docs.ondb.ai/api-reference/materialized-views/manually-refresh-a-materialized-viewpost-apps:app_idviews:view_namerefresh.md) - [Get payout history POST /api/apps/:app_id/payout/history](https://docs.ondb.ai/api-reference/payout/get-payout-historypost-apiapps:app_idpayouthistory.md) - [Get payout settings and available balance POST /api/apps/:app_id/payout/info](https://docs.ondb.ai/api-reference/payout/get-payout-settings-and-available-balancepost-apiapps:app_idpayoutinfo.md) - [Trigger a manual payout POST /api/apps/:app_id/payout/trigger](https://docs.ondb.ai/api-reference/payout/trigger-a-manual-payoutpost-apiapps:app_idpayouttrigger.md) - [Update payout settings POST /api/apps/:app_id/payout/settings](https://docs.ondb.ai/api-reference/payout/update-payout-settingspost-apiapps:app_idpayoutsettings.md) - [Create a new predefined query POST /apps/:app_id/queries](https://docs.ondb.ai/api-reference/predefined-queries/create-a-new-predefined-querypost-apps:app_idqueries.md) - [Delete a predefined query DELETE /apps/:app_id/queries/:query_name](https://docs.ondb.ai/api-reference/predefined-queries/delete-a-predefined-querydelete-apps:app_idqueries:query_name.md) - [Execute a predefined query with parameters GET /api/queries/:app_id/:query_name/data](https://docs.ondb.ai/api-reference/predefined-queries/execute-a-predefined-query-with-parametersget-apiqueries:app_id:query_namedata.md) - [Get a specific predefined query definition GET /apps/:app_id/queries/:query_name](https://docs.ondb.ai/api-reference/predefined-queries/get-a-specific-predefined-query-definitionget-apps:app_idqueries:query_name.md) - [Get Skills.md for discovery (reads from disk) GET /api/skills/:app_id/skills.md](https://docs.ondb.ai/api-reference/predefined-queries/get-skillsmd-for-discovery-reads-from-diskget-apiskills:app_idskillsmd.md) - [List all predefined queries for an app GET /apps/:app_id/queries](https://docs.ondb.ai/api-reference/predefined-queries/list-all-predefined-queries-for-an-appget-apps:app_idqueries.md) - [Get current pricing information](https://docs.ondb.ai/api-reference/pricing/get-current-pricing-information.md) - [Post apipricingquote](https://docs.ondb.ai/api-reference/pricing/post-apipricingquote.md) - [Query Builder](https://docs.ondb.ai/api-reference/query-builder.md): Fluent query API reference - [Get retention configuration for a collection GET /api/apps/:app_id/collections/:collection/retention](https://docs.ondb.ai/api-reference/retention/get-retention-configuration-for-a-collectionget-apiapps:app_idcollections:collectionretention.md) - [Get retention costs for all collections in an app GET /api/apps/:app_id/retention/cost](https://docs.ondb.ai/api-reference/retention/get-retention-costs-for-all-collections-in-an-appget-apiapps:app_idretentioncost.md) - [Set retention configuration for a collection POST /api/apps/:app_id/collections/:collection/retention](https://docs.ondb.ai/api-reference/retention/set-retention-configuration-for-a-collectionpost-apiapps:app_idcollections:collectionretention.md) - [Get task status by ticket ID GET /api/tasks/:ticket_id](https://docs.ondb.ai/api-reference/tasks/get-task-status-by-ticket-idget-apitasks:ticket_id.md) - [Types](https://docs.ondb.ai/api-reference/types.md): TypeScript type definitions - [GET /api/views/:app_id/:view_name/count Get count of records in view (useful for pagination)](https://docs.ondb.ai/api-reference/view-query/get-apiviews:app_id:view_namecountget-count-of-records-in-view-useful-for-pagination.md) - [GET /api/views/:app_id/:view_name/data Simple query with URL parameters](https://docs.ondb.ai/api-reference/view-query/get-apiviews:app_id:view_namedatasimple-query-with-url-parameters.md) - [POST /api/views/:app_id/:view_name/data Complex query with request body (full Scepter query syntax)](https://docs.ondb.ai/api-reference/view-query/post-apiviews:app_id:view_namedatacomplex-query-with-request-body-full-scepter-query-syntax.md) - [Get app wallet information GET /api/apps/:app_id/wallet](https://docs.ondb.ai/api-reference/wallet/get-app-wallet-informationget-apiapps:app_idwallet.md) - [Get app wallet transactions GET /api/apps/:app_id/wallet/transactions](https://docs.ondb.ai/api-reference/wallet/get-app-wallet-transactionsget-apiapps:app_idwallettransactions.md) - [GET /x402/supported - List supported payment schemes](https://docs.ondb.ai/api-reference/x402-payment-protocol/get-x402supported--list-supported-payment-schemes.md): Returns all blockchain networks that OnDB can verify payments for. - [POST /x402/settle - Execute and confirm payment](https://docs.ondb.ai/api-reference/x402-payment-protocol/post-x402settle--execute-and-confirm-payment.md): This endpoint verifies payment and waits for blockchain confirmation. For Celestia, the transaction is already broadcast by the user (via Keplr), so "settle" means verifying it exists and waiting for confirmation. - [POST /x402/verify - Validate payment without executing](https://docs.ondb.ai/api-reference/x402-payment-protocol/post-x402verify--validate-payment-without-executing.md): This endpoint validates that a payment proof is authentic and meets the payment requirements, without waiting for blockchain confirmation. - [Changelog](https://docs.ondb.ai/changelog.md): Latest updates and improvements to OnDB. - [Authentication](https://docs.ondb.ai/concepts/authentication.md): Authentication system for OnDB - [Collections & Indexes](https://docs.ondb.ai/concepts/collections-indexes.md): Organize your data with collections and optimize queries with indexes - [Data Storage](https://docs.ondb.ai/concepts/data-storage.md): Store JSON documents with built-in monetization - [Immutability](https://docs.ondb.ai/concepts/immutability.md): Append-only storage model with full audit trails - [Payment Flows](https://docs.ondb.ai/concepts/payment-flows.md): Understanding payment options in OnDB - [Security Settings](https://docs.ondb.ai/concepts/security.md): Authentication, authorization grants, and security configuration - [Create Documents](https://docs.ondb.ai/crud/create.md): Create new documents with the store method - [Delete Documents](https://docs.ondb.ai/crud/delete.md): Soft delete documents in OnDB - [CRUD Overview](https://docs.ondb.ai/crud/overview.md): Document operations for OnDB - [Read Documents](https://docs.ondb.ai/crud/read.md): Find and query documents with the Query Builder - [Update Documents](https://docs.ondb.ai/crud/update.md): Update and upsert documents in OnDB - [Introduction](https://docs.ondb.ai/index.md): OnDB - The missing infrastructure between proprietary data and AI agents - [Cost Estimation](https://docs.ondb.ai/payments/cost-estimation.md): Understanding operation costs in OnDB - [Paid Reads](https://docs.ondb.ai/payments/paid-reads.md): Pay-per-query monetization for read operations - [PriceIndex](https://docs.ondb.ai/payments/price-index.md): Value-based payment model with automatic revenue sharing - [Write Payments](https://docs.ondb.ai/payments/write-payments.md): Automatic payment handling for write operations - [Aggregations](https://docs.ondb.ai/querying/aggregations.md): Count, sum, average, and group data with built-in aggregation methods - [Data JOINs](https://docs.ondb.ai/querying/joins.md): Relational queries with joinOne and joinMany - [Materialized Views](https://docs.ondb.ai/querying/materialized-views.md): Pre-computed views with JOINs and aggregations for instant query performance - [Predefined Queries](https://docs.ondb.ai/querying/predefined-queries.md): Named, parameterized queries with public endpoints - [Query Builder](https://docs.ondb.ai/querying/query-builder.md): Build complex queries with the fluent query API - [SQL Interface](https://docs.ondb.ai/querying/sql.md): Query and insert data using SQL syntax - [Quickstart](https://docs.ondb.ai/quickstart.md): Get started with OnDB in 5 minutes - [AI Agent Guidelines](https://docs.ondb.ai/resources/ai-agent-guidelines.md): Recommendations for AI coding agents building with OnDB - [Best Practices](https://docs.ondb.ai/resources/best-practices.md): Recommended patterns for building with OnDB - [Glossary](https://docs.ondb.ai/resources/glossary.md): Key terms and concepts in OnDB ## OpenAPI Specs - [openapi](https://docs.ondb.ai/openapi.yaml) ## Optional - [Dashboard](https://app.ondb.ai) - [GitHub](https://github.com/ondbai) - [llms.txt](https://docs.ondb.ai/llms-full.txt)