Returns the database’s declared metadata fields in data.fields, including each field’s type and search settings. Use it to check which fields you can send in metadata before ingesting or updating context.
result = client.databases.get_metadata_schema(database="acme_corp")
const result = await client.databases.getMetadataSchema({ database: "acme_corp" });
Field shape: The field definitions have the same shape that Create Database and Update Metadata Schema accept.Free-form fields:additional_metadata fields are not part of this schema.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"HydraDB","colors":{"primary":"#FF571A","light":"#FF8A54","dark":"#CC4515"},"logo":{"light":"https://mintcdn.com/cortex-e852fafe/BS0KyNLwX-6ZV20u/logo/logo.png?fit=max\u0026auto=format\u0026n=BS0KyNLwX-6ZV20u\u0026q=85\u0026s=8344dc832de70bde023451b8be681c27","dark":"https://mintcdn.com/cortex-e852fafe/BS0KyNLwX-6ZV20u/logo/logo.png?fit=max\u0026auto=format\u0026n=BS0KyNLwX-6ZV20u\u0026q=85\u0026s=8344dc832de70bde023451b8be681c27"},"favicon":"https://mintcdn.com/cortex-e852fafe/s0NUEinSIEJq1NNf/favicon.png?fit=max\u0026auto=format\u0026n=s0NUEinSIEJq1NNf\u0026q=85\u0026s=e7babf84979b4a4cfdba698292f0160a","api":{"examples":{"languages":["python","javascript","curl"]}},"appearance":{"default":"dark"},"background":{"decoration":"grid","color":{"light":"#FFFFFF","dark":"#000000"}},"navbar":{"links":[{"href":"mailto:founders@hydradb.com","label":"Support"}],"primary":{"type":"button","label":"Website","href":"https://hydradb.com"}},"styling":{"codeblocks":"dark","latex":true},"integrations":{"posthog":{"apiKey":"phc_qH6psLVjkWQFAGSmTJoKkpVG9Tj5KUqzULfAn9mYdg79","apiHost":"https://us.i.posthog.com","sessionRecording":true}},"contextual":{"options":["copy","download-spec","chatgpt","claude"],"display":"header"},"markdown":{"instructions":"AGENTS.md is HydraDB's maintained agent guide. Read https://docs.hydradb.com/AGENTS.md once, then use its content. /llms.txt and /llms-full.txt redirect to the same guide; they are not separate documentation indexes. If the guide is already loaded, continue with it instead of fetching either alias or reloading the guide."},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cortex-e852fafe","hasAudioNarration":false,"actualSubdomain":"cortex-e852fafe","customDomains":["docs.hydradb.com"],"gitSource":{"type":"github","owner":"hydra-db","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b10cf109ffae5051c40a764"},"feedback":{"agentFeedback":true,"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b12c3266bf89f5daeb4075a","clientVersion":"0.0.4458","searchFilterCounts":[{"language":"default","tag":"API Reference","count":69},{"language":"default","tag":"Guides","count":27},{"language":"default","tag":"Cookbooks","count":14},{"language":"default","tag":"Essentials","count":12},{"language":"default","tag":"Databases","count":10},{"language":"default","tag":"Webhooks","count":10},{"language":"default","tag":"Connectors","count":9},{"language":"default","tag":"Context","count":9},{"language":"default","tag":"Knowledge \u0026 Memories","count":7},{"language":"default","tag":"Tenants","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","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":"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":"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":"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":"turbopuffer-dual-write","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":"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":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":where(.mt-8.lg\\:mt-0.flex.flex-col.gap-6.xl\\:hidden.max-h-\\[30rem\\]),:where([class*=\"mt-8\"][class*=\"lg:mt-0\"][class*=\"flex\"][class*=\"flex-col\"][class*=\"gap-6\"][class*=\"xl:hidden\"][class*=\"max-h-[30rem]\"]){display:none!important;visibility:hidden!important;opacity:0!important;height:0!important;width:0!important;padding:0!important;margin:0!important;position:absolute!important;clip:rect(0, 0, 0, 0)!important;overflow:hidden!important}.mdx-content:has(.api-before-related-resources){display:flex;flex-direction:column}.api-before-related-resources{display:none}.mdx-content span[id]:empty{scroll-margin-top:9.5rem}.mdx-content:has(.api-before-related-resources)>div:has(>.api-section){order:1}.mdx-content:has(.api-before-related-resources) .api-before-related-resources~*{order:2}.field-req{color:#ef4444;font-weight:bold;cursor:default}.field-rec{color:#eab308;font-size:0.6em;vertical-align:middle;cursor:default}.field-wrap{display:inline-block;outline:none}.field-name-row{display:inline-block}.field-type{display:inline-block;margin-left:0.35rem;color:#475569;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;font-size:0.78rem;font-weight:700;line-height:1.25;overflow-wrap:anywhere}.dark .field-type,[data-theme=\"dark\"] .field-type{color:#cbd5e1}.field-type::before{content:\"(\"}.field-type::after{content:\")\"}.field-tip{position:absolute;bottom:calc(100% + 4px);left:0;z-index:50;display:none;padding:2px 8px;border:1px solid rgba(255,255,255,0.1);border-radius:4px;background:#1f2937;box-shadow:0 2px 8px rgba(0,0,0,0.3);color:#e5e7eb;font-size:0.7rem;font-weight:500;line-height:1.2;pointer-events:none;white-space:nowrap}.has-field-tip:hover .field-tip,.has-field-tip:focus .field-tip,.has-field-tip:focus-within .field-tip{display:inline-block}.peer.is-not-custom.is-not-center~[class~=\"peer-[.is-not-custom]:peer-[.is-not-center]:max-w-8xl\"]{max-width:104rem!important}"},{"filePath":"footer/footer.css","content":"@font-face{font-family:\"Geist Pixel Square\";src:url(\"/footer/fonts/GeistPixelSquare.woff2\") format(\"woff2\");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:\"Geist Pixel\";src:url(\"/footer/fonts/GeistPixel.woff2\") format(\"woff2\");font-weight:400;font-style:normal;font-display:swap}.hdb-footer{--hdb-bg: #000;--hdb-border: rgb(53, 53, 53);--hdb-grid: rgb(32, 32, 32);--hdb-fg: #fff;--hdb-fg-66: rgba(255, 255, 255, 0.66);--hdb-fg-60: rgba(255, 255, 255, 0.6);--hdb-accent: #ff571a;--hdb-ease: cubic-bezier(0.44, 0, 0.56, 1);position:relative;width:100%;box-sizing:border-box;margin:0;padding:80px 0;background:var(--hdb-bg);color:var(--hdb-fg);overflow:hidden;isolation:isolate;font-family:\"Geist Pixel Square\", ui-sans-serif, system-ui, -apple-system, sans-serif;font-size:16px;line-height:1.2;text-transform:capitalize;text-align:left;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.hdb-footer *,.hdb-footer *::before,.hdb-footer *::after{box-sizing:border-box}.hdb-footer p,.hdb-footer ul,.hdb-footer nav{margin:0;padding:0}.hdb-footer ul{list-style:none}.hdb-footer a{text-decoration:none}.hdb-footer img,.hdb-footer video{display:block}.hdb-footer__grid{position:absolute;inset:0;z-index:0;pointer-events:none;background-image:repeating-linear-gradient(\n 90deg, var(--hdb-grid) 0, var(--hdb-grid) 1px, transparent 1px, transparent 32px\n );background-size:32px 100%;background-position:center}.hdb-footer::before,.hdb-footer::after{content:\"\";position:absolute;left:0;right:0;height:1px;background:var(--hdb-border);z-index:2;pointer-events:none}.hdb-footer::before{top:80px}.hdb-footer::after{bottom:80px}.hdb-footer__card{position:relative;z-index:1;width:87%;margin:0 auto;display:flex;align-items:stretch;background:var(--hdb-bg)}.hdb-footer__card::after{content:\"\";position:absolute;inset:0;border:1px solid var(--hdb-border);pointer-events:none;z-index:4}.hdb-footer__left{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}.hdb-footer__brand{position:relative;padding:32px}.hdb-footer__brand::after{content:\"\";position:absolute;left:0;right:0;bottom:0;height:1px;background:var(--hdb-border);z-index:3}.hdb-footer__brand-inner{display:flex;flex-direction:column;gap:24px;max-width:400px}.hdb-footer__logo{display:inline-block;width:180px;height:33px}.hdb-footer__logo img{width:180px;height:33px;object-fit:cover}.hdb-footer__tagline{font-family:\"Geist Pixel Square\", ui-sans-serif, system-ui, sans-serif;font-size:20px;line-height:1.1;letter-spacing:-0.01em;color:var(--hdb-fg)}.hdb-footer__cols{flex:1 1 auto;display:flex;flex-direction:column;justify-content:space-between;gap:24px;padding:32px}.hdb-footer__cols-row{display:flex;flex-direction:row;gap:24px}.hdb-footer__col{display:flex;flex-direction:column;gap:12px}.hdb-footer__col:nth-child(1){width:151px}.hdb-footer__col:nth-child(2){width:174px}.hdb-footer__col:nth-child(3){width:175px}.hdb-footer__col:nth-child(4){width:174px}.hdb-footer__list{display:flex;flex-direction:column;gap:12px}.hdb-footer__head{display:block;font-family:\"Geist Pixel Square\", ui-sans-serif, system-ui, sans-serif;font-size:18px;line-height:1.2;letter-spacing:-0.01em;color:var(--hdb-fg-60);transition:color 0.4s var(--hdb-ease)}.hdb-footer__link{display:block;font-family:\"Geist Pixel\", ui-sans-serif, system-ui, sans-serif;font-size:14px;line-height:1.2;letter-spacing:-0.01em;color:var(--hdb-fg-60);transition:color 0.4s var(--hdb-ease)}.hdb-footer__head:hover,.hdb-footer__link:hover{color:var(--hdb-fg);text-decoration:underline;text-underline-offset:2px}.hdb-footer__col:nth-child(2) .hdb-footer__head,.hdb-footer__col:nth-child(3) .hdb-footer__head,.hdb-footer__col:nth-child(2) .hdb-footer__link,.hdb-footer__col:nth-child(3) .hdb-footer__list li:last-child .hdb-footer__link{letter-spacing:normal}.hdb-footer__badges{display:flex;flex-direction:row;gap:16px}.hdb-footer__badge{width:52px;height:52px;border-radius:50%;object-fit:cover}.hdb-footer__right{position:relative;flex:0 0 33%;min-width:0;display:flex;flex-direction:column}.hdb-footer__right::before{content:\"\";position:absolute;top:0;bottom:0;left:0;width:1px;background:var(--hdb-border);z-index:3}.hdb-footer__social{position:relative;display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:14px 32px}.hdb-footer__social::after{content:\"\";position:absolute;left:0;right:0;bottom:0;height:1px;background:var(--hdb-border);z-index:3}.hdb-footer__social-link{display:inline-flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:4px;color:var(--hdb-fg-66);transition:color 0.4s var(--hdb-ease)}.hdb-footer__social-label{font-family:\"Geist Pixel Square\", ui-sans-serif, system-ui, sans-serif;font-size:16px;line-height:1.1;letter-spacing:-0.01em;color:var(--hdb-fg-66);white-space:nowrap;transition:color 0.4s var(--hdb-ease)}.hdb-footer__social-link:hover .hdb-footer__social-label{color:var(--hdb-fg)}.hdb-footer__icon{width:24px;height:24px;color:var(--hdb-fg);flex:none}.hdb-footer__video{position:relative;width:100%;height:396px;overflow:hidden}.hdb-footer__video::after{content:\"\";position:absolute;left:0;right:0;bottom:0;height:1px;background:var(--hdb-border);z-index:3}.hdb-footer__video-el{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.hdb-footer__copy{display:flex;flex-direction:column;justify-content:center;padding:18px 32px;opacity:0.66}.hdb-footer__copy p{font-family:\"Geist Pixel Square\", ui-sans-serif, system-ui, sans-serif;font-size:16px;line-height:1.1;letter-spacing:-0.01em;color:var(--hdb-fg)}.hdb-footer a:focus-visible{outline:2px solid var(--hdb-accent);outline-offset:2px;border-radius:2px}@media (min-width: 1200px) and (max-width: 1439.98px){.hdb-footer__card{width:calc((100% - 80px) * 0.87)}.hdb-footer__social-label{display:none}}@media (min-width: 810px) and (max-width: 1199.98px){.hdb-footer__card{width:calc((100% - 80px) * 0.87);flex-direction:column}.hdb-footer__right{flex:1 1 auto;width:100%}.hdb-footer__right::before{top:0;bottom:auto;left:0;right:0;width:auto;height:1px}.hdb-footer__cols{display:block;padding:32px}.hdb-footer__cols-row{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto;grid-auto-flow:column;gap:24px;align-items:start}.hdb-footer__col{width:auto!important}.hdb-footer__badges{margin-top:58px}.hdb-footer__video{height:360px}}@media (max-width: 809.98px){.hdb-footer__card{width:87%;flex-direction:column;padding:0 20px}.hdb-footer__right{flex:1 1 auto;width:100%}.hdb-footer__right::before{top:0;bottom:auto;left:0;right:0;width:auto;height:1px}.hdb-footer__brand{padding:20px}.hdb-footer__cols{display:flex;flex-direction:column;gap:24px;padding:20px}.hdb-footer__cols-row{display:flex;flex-direction:column;gap:24px}.hdb-footer__col{width:auto!important}.hdb-footer__badges{margin-top:0}.hdb-footer__social{padding:14px 20px}.hdb-footer__social-label{display:none}.hdb-footer__video{height:442px}.hdb-footer__copy{padding:18px 20px}}"}]}
{"page":{"pagePath":"api-reference/v2/endpoint/get-metadata-schema","slug":"/api-reference/v2/endpoint/get-metadata-schema","pageMetadata":{"title":"Get Metadata Schema","description":"Read the metadata fields declared for a database.","openapi":"api-reference/v2/openapi.json GET /databases/{database}/metadata-schema","href":"/api-reference/v2/endpoint/get-metadata-schema"},"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: \"Read the metadata fields declared for a database.\"\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={a:`a`,code:`code`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Heading}=_components;if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Returns the database’s declared metadata fields in `,_jsx(_components.code,{children:`data.fields`}),`, including each field’s type and search settings. Use it to check which fields you can send in `,_jsx(_components.code,{children:`metadata`}),` before ingesting or updating context.`]}),`\n`,`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Field shape:`}),` The field definitions have the same shape that `,_jsx(_components.a,{href:`/api-reference/v2/endpoint/create-database`,children:`Create Database`}),` and `,_jsx(_components.a,{href:`/api-reference/v2/endpoint/update-metadata-schema`,children:`Update Metadata Schema`}),` accept.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Free-form fields:`}),` `,_jsx(_components.code,{children:`additional_metadata`}),` fields are not part of this schema.`]}),`\n`,_jsx(`div`,{className:`api-before-related-resources`}),`\n`,_jsx(Heading,{level:`2`,id:`related-resources`,children:`Related resources`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Before this:`}),` `,_jsx(_components.a,{href:`/api-reference/v2/endpoint/create-database`,children:`Create Database`}),`: declare the schema at creation`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`After this:`}),` `,_jsx(_components.a,{href:`/api-reference/v2/endpoint/update-metadata-schema`,children:`Update Metadata Schema`}),`: add fields`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Guide:`}),` `,_jsx(_components.a,{href:`/essentials/v2/metadata`,children:`Metadata Filters`}),`: declare and filter metadata`]}),`\n`]})]})}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":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Get Metadata Schema","description":"Read the metadata fields declared for a database.","openapi":"api-reference/v2/openapi.json GET /databases/{database}/metadata-schema","href":"/api-reference/v2/endpoint/get-metadata-schema"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,RequestExample}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Returns the database’s declared metadata fields in `,_jsx(_components.code,{children:`data.fields`}),`, including each field’s type and search settings. Use it to check which fields you can send in `,_jsx(_components.code,{children:`metadata`}),` before ingesting or updating context.`]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`Python SDK`,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`result = client.databases.get_metadata_schema(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`database`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"acme_corp\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript SDK`,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#4FC1FF`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#C586C0`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`databases`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`getMetadataSchema`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`database:`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"acme_corp\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.hydradb.com/databases/acme_corp/metadata-schema'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$HYDRADB_API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"API-Version: 2\"`})]}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Field shape:`}),` The field definitions have the same shape that `,_jsx(_components.a,{href:`/api-reference/v2/endpoint/create-database`,children:`Create Database`}),` and `,_jsx(_components.a,{href:`/api-reference/v2/endpoint/update-metadata-schema`,children:`Update Metadata Schema`}),` accept.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Free-form fields:`}),` `,_jsx(_components.code,{children:`additional_metadata`}),` fields are not part of this schema.`]}),`\n`,_jsx(`div`,{className:`api-before-related-resources`}),`\n`,_jsx(Heading,{level:`2`,id:`related-resources`,children:`Related resources`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Before this:`}),` `,_jsx(_components.a,{href:`/api-reference/v2/endpoint/create-database`,children:`Create Database`}),`: declare the schema at creation`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`After this:`}),` `,_jsx(_components.a,{href:`/api-reference/v2/endpoint/update-metadata-schema`,children:`Update Metadata Schema`}),`: add fields`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Guide:`}),` `,_jsx(_components.a,{href:`/essentials/v2/metadata`,children:`Metadata Filters`}),`: declare and filter metadata`]}),`\n`]})]})}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":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Get Metadata Schema","description":"Read the metadata fields declared for a database.","openapi":"api-reference/v2/openapi.json GET /databases/{database}/metadata-schema","href":"/api-reference/v2/endpoint/get-metadata-schema"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Related resources","slug":"related-resources","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"Python SDK","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"1\">\u003cspan class=\"line\">\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">result = client.databases.get_metadata_schema(\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">database\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"acme_corp\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"TypeScript SDK","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"typescript\">\u003ccode language=\"typescript\" numberOfLines=\"1\">\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#4FC1FF;--shiki-dark:#4FC1FF\"> result\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> = \u003c/span>\u003cspan style=\"color:#C586C0;--shiki-dark:#C586C0\">await\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\"> client\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">databases\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">getMetadataSchema\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\">({ \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">database:\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"acme_corp\"\u003c/span>\u003cspan style=\"color:#D4D4D4;--shiki-dark:#D4D4D4\"> });\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes dark-plus dark-plus\" style=\"background-color:#0B0C0E;--shiki-dark-bg:#0B0C0E;color:#D4D4D4;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#DCDCAA;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> 'https://api.hydradb.com/databases/acme_corp/metadata-schema'\u003c/span>\u003cspan style=\"color:#D7BA7D;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"Authorization: Bearer \u003c/span>\u003cspan style=\"color:#9CDCFE;--shiki-dark:#9CDCFE\">$HYDRADB_API_KEY\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#D7BA7D;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#569CD6;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#CE9178;--shiki-dark:#CE9178\"> \"API-Version: 2\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":["/_mintlify/custom/cortex-e852fafe/e7a491fa57f47ac4/reo.js","/_mintlify/custom/cortex-e852fafe/6addee7178460057/footer.js"],"openApiReferenceData":{"operation":{"description":"Read the metadata fields declared for a database.","parameters":["ca5a4994-2bfb-474b-8a69-de9134ba6615"],"responses":{"200":"7c466421-68c0-417c-98f0-fa8f4fd095be","400":"93bec0ae-87f2-4faa-b6a4-c3013f1e2835","404":"64ba4615-060e-4f6b-b901-1f171104fc46","500":"f07e2787-dbde-42e7-8c55-3c6a5ad49936"},"security":["9c9e104b-fc28-43d5-a032-60d770e1366e"],"summary":"Get metadata schema","tags":["database-management"],"x-fern-sdk-group-name":"databases","x-fern-sdk-method-name":"get_metadata_schema","method":"get","type":"path","servers":["1569c47f-c20d-40e2-b012-5f6812359fa5"],"path":"/databases/{database}/metadata-schema","baseUrlOptions":["https://api.hydradb.com"],"title":"Get metadata schema","codeSamples":[],"requestExampleLanguages":["python","javascript","bash"],"requiredOnlyExamples":false,"requestExamples":[{"dropdown":false,"language":"python","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"python","children":{"type":"code","key":null,"ref":null,"props":{"language":"python","numberOfLines":"1","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"result = client.databases.get_metadata_schema("}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"database"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\"acme_corp\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":")"}}]}},"\n"]}}}},"filename":"Python SDK"},{"dropdown":false,"language":"typescript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"typescript","children":{"type":"code","key":null,"ref":null,"props":{"language":"typescript","numberOfLines":"1","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#4FC1FF","--shiki-dark":"#4FC1FF"},"children":" result"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" = "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#C586C0","--shiki-dark":"#C586C0"},"children":"await"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":" client"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"databases"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#DCDCAA","--shiki-dark":"#DCDCAA"},"children":"getMetadataSchema"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":"({ "}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"database:"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"acme_corp\""}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"children":" });"}}]}},"\n"]}}}},"filename":"TypeScript SDK"},{"dropdown":false,"language":"shellscript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes dark-plus dark-plus","style":{"backgroundColor":"#0B0C0E","--shiki-dark-bg":"#0B0C0E","color":"#D4D4D4","--shiki-dark":"#D4D4D4"},"language":"shellscript","children":{"type":"code","key":null,"ref":null,"props":{"language":"shellscript","numberOfLines":"3","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#DCDCAA","--shiki-dark":"#DCDCAA"},"children":"curl"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" 'https://api.hydradb.com/databases/acme_corp/metadata-schema'"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D7BA7D","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"Authorization: Bearer "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#9CDCFE","--shiki-dark":"#9CDCFE"},"children":"$HYDRADB_API_KEY"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#D7BA7D","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#569CD6","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CE9178","--shiki-dark":"#CE9178"},"children":" \"API-Version: 2\""}}]}},"\n"]}}}},"filename":"cURL"}],"requestExampleType":"mdx","responseExampleType":"generated"},"dependencies":{"parameters":{"ca5a4994-2bfb-474b-8a69-de9134ba6615":{"description":"Database whose metadata schema to read.","in":"path","name":"database","required":true,"schema":{"example":"acme_corp","type":"string","isRequired":true,"description":"Database whose metadata schema to read.","uniqueKey":"","typeLabel":"string"}}},"responses":{"7c466421-68c0-417c-98f0-fa8f4fd095be":{"content":{"application/json":{"schema":{"properties":{"data":{"properties":{"database":{"description":"Owning database. Formerly `tenant_id`; the `tenant_id` alias is still accepted (deprecated).","example":"acme_corp","type":"string","isRequired":true,"uniqueKey":"data.database","typeLabel":"string"},"fields":{"description":"Fields declared in the database metadata schema.","example":[{"data_type":"VARCHAR","enable_dense_embedding":true,"enable_match":true,"enable_sparse_embedding":false,"max_length":256,"name":"category"}],"items":{"properties":{"data_type":{"type":"string","description":"Data type of the metadata field, for example `VARCHAR`.","enum":["BOOL","INT8","INT16","INT32","INT64","FLOAT","DOUBLE","VARCHAR","JSON","ARRAY"],"x-enum-varnames":["DataTypeBool","DataTypeInt8","DataTypeInt16","DataTypeInt32","DataTypeInt64","DataTypeFloat","DataTypeDouble","DataTypeVarchar","DataTypeJSON","DataTypeArray"],"example":"VARCHAR","uniqueKey":"data.fields.items.[INDEX].data_type","typeLabel":"enum\u003cstring>"},"enable_dense_embedding":{"description":"Whether to enable semantic (dense) embedding search on this field.","example":true,"type":"boolean","uniqueKey":"data.fields.items.[INDEX].enable_dense_embedding","typeLabel":"boolean"},"enable_match":{"description":"Whether to enable exact-match filtering on this field.","example":true,"type":"boolean","uniqueKey":"data.fields.items.[INDEX].enable_match","typeLabel":"boolean"},"enable_sparse_embedding":{"description":"Whether to enable BM25 (sparse) embedding search on this field.","example":false,"type":"boolean","uniqueKey":"data.fields.items.[INDEX].enable_sparse_embedding","typeLabel":"boolean"},"max_length":{"description":"Maximum string length in bytes for VARCHAR fields.","example":256,"type":"integer","uniqueKey":"data.fields.items.[INDEX].max_length","typeLabel":"integer"},"name":{"description":"Field name. Immutable after database creation.","example":"category","type":"string","uniqueKey":"data.fields.items.[INDEX].name","typeLabel":"string"}},"title":"TenantsCustomPropertyDefinition","type":"object","uniqueKey":"data.fields.items.[INDEX]","typeLabel":"TenantsCustomPropertyDefinition · object"},"type":"array","uniqueItems":false,"isRequired":true,"uniqueKey":"data.fields","typeLabel":"TenantsCustomPropertyDefinition · object[]"},"tenant_id":{"deprecated":true,"description":"Deprecated: use `database`.","example":"acme_corp","type":"string","x-deprecated":"true","uniqueKey":"data.tenant_id","typeLabel":"string"}},"required":["database","fields"],"title":"TenantsTenantMetadataSchemaResponse","type":"object","example":{"database":"acme_corp","fields":[{"data_type":"VARCHAR","enable_dense_embedding":true,"enable_match":true,"enable_sparse_embedding":false,"max_length":256,"name":"category"}],"tenant_id":"acme_corp"},"uniqueKey":"data","typeLabel":"TenantsTenantMetadataSchemaResponse · object"},"error":{"oneOf":[{"type":"object","title":"HandlerApiError","description":"Error details on failure, or null on success.","example":null,"properties":{"code":{"description":"Machine-readable error code (e.g. `DATABASE_NOT_FOUND`).","example":"DATABASE_NOT_FOUND","type":"string","uniqueKey":"error.oneOf.0.code","typeLabel":"string"},"details":{"additionalProperties":{"type":"string","uniqueKey":"error.oneOf.0.details.additionalProperties","typeLabel":"string"},"description":"Extra facts about the error, as string pairs. Omitted when there are none.","type":"object","uniqueKey":"error.oneOf.0.details","typeLabel":"object"},"message":{"description":"Human-readable description of the error.","example":"Database not found","type":"string","uniqueKey":"error.oneOf.0.message","typeLabel":"string"},"param":{"description":"The request field that caused the error. Omitted when no single field is at fault.","type":"string","uniqueKey":"error.oneOf.0.param","typeLabel":"string"}},"uniqueKey":"error.oneOf.0","typeLabel":"HandlerApiError · object"},{"type":"null","title":"No error","description":"Error details on failure, or null on success.","example":null,"uniqueKey":"error.oneOf.1","typeLabel":"null"}],"uniqueKey":"error","typeLabel":"HandlerApiError · object | null"},"meta":{"properties":{"api_version":{"description":"Version of the API that served the request, for example `2.0.1`. Always present.","type":"string","uniqueKey":"meta.api_version","typeLabel":"string"},"collection":{"description":"Collection scope. Defaults to the default collection when omitted. Formerly `sub_tenant_id`; the `sub_tenant_id` alias is still accepted (deprecated).","example":"team_docs","type":"string","uniqueKey":"meta.collection","typeLabel":"string"},"database":{"description":"Owning database. Formerly `tenant_id`; the `tenant_id` alias is still accepted (deprecated).","example":"acme_corp","type":"string","uniqueKey":"meta.database","typeLabel":"string"},"deprecation":{"description":"Migration notices for this request, present only when it used a deprecated route, field or selector. The status code is unaffected.","items":{"properties":{"deprecated":{"description":"Whether this response concerns a deprecated field or route.","example":true,"type":"boolean","uniqueKey":"meta.deprecation.items.[INDEX].deprecated","typeLabel":"boolean"},"deprecated_field":{"description":"The deprecated field name.","example":"tenant_id","type":"string","uniqueKey":"meta.deprecation.items.[INDEX].deprecated_field","typeLabel":"string"},"deprecated_since":{"description":"API version when the field was deprecated.","example":"2.0.1","type":"string","uniqueKey":"meta.deprecation.items.[INDEX].deprecated_since","typeLabel":"string"},"message":{"description":"Migration guidance message.","example":"tenant_id is deprecated; use database instead.","type":"string","uniqueKey":"meta.deprecation.items.[INDEX].message","typeLabel":"string"},"preferred_field":{"description":"The canonical replacement for the deprecated field.","example":"database","type":"string","uniqueKey":"meta.deprecation.items.[INDEX].preferred_field","typeLabel":"string"}},"title":"HandlerDeprecationNotice","type":"object","uniqueKey":"meta.deprecation.items.[INDEX]","typeLabel":"HandlerDeprecationNotice · object"},"type":"array","uniqueItems":false,"uniqueKey":"meta.deprecation","typeLabel":"HandlerDeprecationNotice · object[]"},"latency_ms":{"oneOf":[{"description":"Server-side processing time in milliseconds.","example":12.3,"type":"number","uniqueKey":"meta.latency_ms.oneOf.0","typeLabel":"number"},{"description":"Server-side processing time in milliseconds.","example":12.3,"type":"null","uniqueKey":"meta.latency_ms.oneOf.1","typeLabel":"null"}],"uniqueKey":"meta.latency_ms","typeLabel":"number | null"},"request_id":{"description":"Unique identifier for this request, useful for support and tracing.","example":"9d13aef4-02f4-4e73-8c62-4c2601d04f9d","type":"string","uniqueKey":"meta.request_id","typeLabel":"string"},"source_type":{"description":"Type of the parent source (e.g. `file`, `slack`, `notion`).","example":"file","type":"string","uniqueKey":"meta.source_type","typeLabel":"string"},"sub_tenant_id":{"deprecated":true,"description":"Deprecated: use `collection`.","example":"team_docs","type":"string","x-deprecated":"true","uniqueKey":"meta.sub_tenant_id","typeLabel":"string"},"tenant_id":{"deprecated":true,"description":"Deprecated: use `database`.","example":"acme_corp","type":"string","x-deprecated":"true","uniqueKey":"meta.tenant_id","typeLabel":"string"},"warnings":{"description":"Non-fatal notices. Failed search parts use `graph_read_failed`, `graph_ranking_failed`, `query_split_failed` or `vector_search_failed` (one per failed vector search).","example":[{"code":"acl_ignored_by_connector_enforcement","collections":["team_docs","engineering"],"message":"This connector enforces ACL, so the request's acl was ignored."}],"items":{"properties":{"code":{"description":"Code identifies the warning type, such as acl_ignored_by_connector_enforcement.","example":"acl_ignored_by_connector_enforcement","type":"string","uniqueKey":"meta.warnings.items.[INDEX].code","typeLabel":"string"},"collections":{"description":"Collections the warning is about, such as the collections a multi-collection query skipped because they are being deleted.","example":["team_docs","engineering"],"items":{"type":"string","uniqueKey":"meta.warnings.items.[INDEX].collections.items.[INDEX]","typeLabel":"string"},"type":"array","uniqueItems":false,"uniqueKey":"meta.warnings.items.[INDEX].collections","typeLabel":"string[]"},"message":{"description":"Human-readable explanation of the warning.","example":"This connector enforces ACL, so the request's acl was ignored.","type":"string","uniqueKey":"meta.warnings.items.[INDEX].message","typeLabel":"string"}},"title":"HandlerResponseWarning","type":"object","uniqueKey":"meta.warnings.items.[INDEX]","typeLabel":"HandlerResponseWarning · object"},"type":"array","uniqueItems":false,"uniqueKey":"meta.warnings","typeLabel":"HandlerResponseWarning · object[]"}},"title":"HandlerResponseMeta","type":"object","example":{"collection":"team_docs","database":"acme_corp","latency_ms":12.3,"request_id":"9d13aef4-02f4-4e73-8c62-4c2601d04f9d","source_type":"file","sub_tenant_id":"team_docs","tenant_id":"acme_corp","warnings":[{"code":"acl_ignored_by_connector_enforcement","collections":["team_docs","engineering"],"message":"This connector enforces ACL, so the request's acl was ignored."}]},"uniqueKey":"meta","typeLabel":"HandlerResponseMeta · object"},"success":{"description":"Whether the request succeeded.","example":true,"type":"boolean","uniqueKey":"success","typeLabel":"boolean"}},"title":"HandlerEnvelopeTenantsTenantMetadataSchemaResponse","type":"object","uniqueKey":"","typeLabel":"HandlerEnvelopeTenantsTenantMetadataSchemaResponse · object"},"examples":{"Example":{"title":"Example","value":{"data":{"database":"acme_corp","fields":[{"data_type":"VARCHAR","enable_dense_embedding":true,"enable_match":true,"enable_sparse_embedding":false,"max_length":256,"name":"category"}],"tenant_id":"acme_corp"},"error":null,"meta":{"collection":"team_docs","database":"acme_corp","latency_ms":12.3,"request_id":"9d13aef4-02f4-4e73-8c62-4c2601d04f9d","source_type":"file","sub_tenant_id":"team_docs","tenant_id":"acme_corp","warnings":[{"code":"acl_ignored_by_connector_enforcement","collections":["team_docs","engineering"],"message":"This connector enforces ACL, so the request's acl was ignored."}]},"success":true}}},"exampleType":"generated"}},"description":"OK","exampleType":"generated"},"93bec0ae-87f2-4faa-b6a4-c3013f1e2835":{"content":{"application/json":{"schema":{"properties":{"data":{"description":"Always `null` on this error response.","type":"null","uniqueKey":"data","typeLabel":"null"},"detail":{"properties":{"deprecated":{"description":"Whether this response concerns a deprecated field or route.","example":true,"type":"boolean","uniqueKey":"detail.deprecated","typeLabel":"boolean"},"deprecated_field":{"description":"The deprecated field name.","example":"tenant_id","type":"string","uniqueKey":"detail.deprecated_field","typeLabel":"string"},"deprecated_since":{"description":"API version that deprecated the conflicting selector.","example":"2.0.1","type":"string","uniqueKey":"detail.deprecated_since","typeLabel":"string"},"error_code":{"description":"Machine-readable error classification code.","example":"VALIDATION_ERROR","type":"string","uniqueKey":"detail.error_code","typeLabel":"string"},"message":{"description":"Human-readable description of the error.","example":"Request validation failed","type":"string","uniqueKey":"detail.message","typeLabel":"string"},"preferred_field":{"description":"The canonical replacement for the deprecated field.","example":"database","type":"string","uniqueKey":"detail.preferred_field","typeLabel":"string"},"retry_after_seconds":{"description":"Seconds to wait before retrying deletion of context that is still indexing.","example":1,"type":"integer","uniqueKey":"detail.retry_after_seconds","typeLabel":"integer"},"retryable":{"description":"Whether retrying this failed query can succeed. Present for search workflow failures.","example":true,"type":"boolean","uniqueKey":"detail.retryable","typeLabel":"boolean"},"success":{"deprecated":true,"description":"Deprecated: always `false`. Read the HTTP status, then `error.code` and `error.message`.","example":false,"type":"boolean","x-deprecated":"true","uniqueKey":"detail.success","typeLabel":"boolean"},"upgrade_url":{"description":"Upgrade link, present only for FREE_PLAN_DEPRECATED when the Free-plan gate is enabled.","example":"https://app.hydradb.com/upgrade","type":"string","uniqueKey":"detail.upgrade_url","typeLabel":"string"}},"title":"HandlerErrorDetail","type":"object","deprecated":true,"description":"Deprecated: compatibility object. Read `error.code` and `error.message`; optional fields carry retry, deprecation or upgrade guidance.","example":{"deprecated":true,"deprecated_field":"tenant_id","deprecated_since":"2.0.1","error_code":"VALIDATION_ERROR","message":"Request validation failed","preferred_field":"database","retry_after_seconds":1,"retryable":true},"uniqueKey":"detail","typeLabel":"HandlerErrorDetail · object"},"error":{"properties":{"code":{"description":"Machine-readable error code (e.g. `DATABASE_NOT_FOUND`).","example":"DATABASE_NOT_FOUND","type":"string","uniqueKey":"error.code","typeLabel":"string"},"details":{"additionalProperties":{"type":"string","uniqueKey":"error.details.additionalProperties","typeLabel":"string"},"description":"Extra facts about the error, as string pairs. Omitted when there are none.","type":"object","uniqueKey":"error.details","typeLabel":"object"},"message":{"description":"Human-readable description of the error.","example":"Database not found","type":"string","uniqueKey":"error.message","typeLabel":"string"},"param":{"description":"The request field that caused the error. Omitted when no single field is at fault.","type":"string","uniqueKey":"error.param","typeLabel":"string"}},"title":"HandlerApiError","type":"object","description":"Structured error object with a machine-readable `code` and human-readable `message`.","example":{"code":"DATABASE_NOT_FOUND","message":"Database not found"},"uniqueKey":"error","typeLabel":"HandlerApiError · object"},"meta":{"properties":{"api_version":{"description":"Version of the API that served the request, for example `2.0.1`.","type":"string","uniqueKey":"meta.api_version","typeLabel":"string"},"latency_ms":{"description":"Server-side processing time in milliseconds.","example":12.3,"type":"number","uniqueKey":"meta.latency_ms","typeLabel":"number"},"request_id":{"description":"Unique identifier for this request, useful for support and tracing.","example":"9d13aef4-02f4-4e73-8c62-4c2601d04f9d","type":"string","uniqueKey":"meta.request_id","typeLabel":"string"}},"title":"HandlerErrorMeta","type":"object","example":{"latency_ms":12.3,"request_id":"9d13aef4-02f4-4e73-8c62-4c2601d04f9d"},"uniqueKey":"meta","typeLabel":"HandlerErrorMeta · object"},"success":{"description":"Whether the request succeeded.","example":false,"type":"boolean","uniqueKey":"success","typeLabel":"boolean"}},"title":"HandlerErrorResponse","type":"object","uniqueKey":"","typeLabel":"HandlerErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"data":null,"detail":{"deprecated":true,"deprecated_field":"tenant_id","deprecated_since":"2.0.1","error_code":"VALIDATION_ERROR","message":"Request validation failed","preferred_field":"database","retry_after_seconds":1,"retryable":true},"error":{"code":"DATABASE_NOT_FOUND","message":"Database not found"},"meta":{"latency_ms":12.3,"request_id":"9d13aef4-02f4-4e73-8c62-4c2601d04f9d"},"success":false}}},"exampleType":"generated"}},"description":"Bad Request","exampleType":"generated"},"64ba4615-060e-4f6b-b901-1f171104fc46":{"content":{"application/json":{"schema":{"properties":{"data":{"description":"Always `null` on this error response.","type":"null","uniqueKey":"data","typeLabel":"null"},"detail":{"properties":{"deprecated":{"description":"Whether this response concerns a deprecated field or route.","example":true,"type":"boolean","uniqueKey":"detail.deprecated","typeLabel":"boolean"},"deprecated_field":{"description":"The deprecated field name.","example":"tenant_id","type":"string","uniqueKey":"detail.deprecated_field","typeLabel":"string"},"deprecated_since":{"description":"API version that deprecated the conflicting selector.","example":"2.0.1","type":"string","uniqueKey":"detail.deprecated_since","typeLabel":"string"},"error_code":{"description":"Machine-readable error classification code.","example":"VALIDATION_ERROR","type":"string","uniqueKey":"detail.error_code","typeLabel":"string"},"message":{"description":"Human-readable description of the error.","example":"Request validation failed","type":"string","uniqueKey":"detail.message","typeLabel":"string"},"preferred_field":{"description":"The canonical replacement for the deprecated field.","example":"database","type":"string","uniqueKey":"detail.preferred_field","typeLabel":"string"},"retry_after_seconds":{"description":"Seconds to wait before retrying deletion of context that is still indexing.","example":1,"type":"integer","uniqueKey":"detail.retry_after_seconds","typeLabel":"integer"},"retryable":{"description":"Whether retrying this failed query can succeed. Present for search workflow failures.","example":true,"type":"boolean","uniqueKey":"detail.retryable","typeLabel":"boolean"},"success":{"deprecated":true,"description":"Deprecated: always `false`. Read the HTTP status, then `error.code` and `error.message`.","example":false,"type":"boolean","x-deprecated":"true","uniqueKey":"detail.success","typeLabel":"boolean"},"upgrade_url":{"description":"Upgrade link, present only for FREE_PLAN_DEPRECATED when the Free-plan gate is enabled.","example":"https://app.hydradb.com/upgrade","type":"string","uniqueKey":"detail.upgrade_url","typeLabel":"string"}},"title":"HandlerErrorDetail","type":"object","deprecated":true,"description":"Deprecated: compatibility object. Read `error.code` and `error.message`; optional fields carry retry, deprecation or upgrade guidance.","example":{"deprecated":true,"deprecated_field":"tenant_id","deprecated_since":"2.0.1","error_code":"VALIDATION_ERROR","message":"Request validation failed","preferred_field":"database","retry_after_seconds":1,"retryable":true},"uniqueKey":"detail","typeLabel":"HandlerErrorDetail · object"},"error":{"properties":{"code":{"description":"Machine-readable error code (e.g. `DATABASE_NOT_FOUND`).","example":"DATABASE_NOT_FOUND","type":"string","uniqueKey":"error.code","typeLabel":"string"},"details":{"additionalProperties":{"type":"string","uniqueKey":"error.details.additionalProperties","typeLabel":"string"},"description":"Extra facts about the error, as string pairs. Omitted when there are none.","type":"object","uniqueKey":"error.details","typeLabel":"object"},"message":{"description":"Human-readable description of the error.","example":"Database not found","type":"string","uniqueKey":"error.message","typeLabel":"string"},"param":{"description":"The request field that caused the error. Omitted when no single field is at fault.","type":"string","uniqueKey":"error.param","typeLabel":"string"}},"title":"HandlerApiError","type":"object","description":"Structured error object with a machine-readable `code` and human-readable `message`.","example":{"code":"DATABASE_NOT_FOUND","message":"Database not found"},"uniqueKey":"error","typeLabel":"HandlerApiError · object"},"meta":{"properties":{"api_version":{"description":"Version of the API that served the request, for example `2.0.1`.","type":"string","uniqueKey":"meta.api_version","typeLabel":"string"},"latency_ms":{"description":"Server-side processing time in milliseconds.","example":12.3,"type":"number","uniqueKey":"meta.latency_ms","typeLabel":"number"},"request_id":{"description":"Unique identifier for this request, useful for support and tracing.","example":"9d13aef4-02f4-4e73-8c62-4c2601d04f9d","type":"string","uniqueKey":"meta.request_id","typeLabel":"string"}},"title":"HandlerErrorMeta","type":"object","example":{"latency_ms":12.3,"request_id":"9d13aef4-02f4-4e73-8c62-4c2601d04f9d"},"uniqueKey":"meta","typeLabel":"HandlerErrorMeta · object"},"success":{"description":"Whether the request succeeded.","example":false,"type":"boolean","uniqueKey":"success","typeLabel":"boolean"}},"title":"HandlerErrorResponse","type":"object","uniqueKey":"","typeLabel":"HandlerErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"data":null,"detail":{"deprecated":true,"deprecated_field":"tenant_id","deprecated_since":"2.0.1","error_code":"VALIDATION_ERROR","message":"Request validation failed","preferred_field":"database","retry_after_seconds":1,"retryable":true},"error":{"code":"DATABASE_NOT_FOUND","message":"Database not found"},"meta":{"latency_ms":12.3,"request_id":"9d13aef4-02f4-4e73-8c62-4c2601d04f9d"},"success":false}}},"exampleType":"generated"}},"description":"Not Found","exampleType":"generated"},"f07e2787-dbde-42e7-8c55-3c6a5ad49936":{"content":{"application/json":{"schema":{"properties":{"data":{"description":"Always `null` on this error response.","type":"null","uniqueKey":"data","typeLabel":"null"},"detail":{"properties":{"deprecated":{"description":"Whether this response concerns a deprecated field or route.","example":true,"type":"boolean","uniqueKey":"detail.deprecated","typeLabel":"boolean"},"deprecated_field":{"description":"The deprecated field name.","example":"tenant_id","type":"string","uniqueKey":"detail.deprecated_field","typeLabel":"string"},"deprecated_since":{"description":"API version that deprecated the conflicting selector.","example":"2.0.1","type":"string","uniqueKey":"detail.deprecated_since","typeLabel":"string"},"error_code":{"description":"Machine-readable error classification code.","example":"VALIDATION_ERROR","type":"string","uniqueKey":"detail.error_code","typeLabel":"string"},"message":{"description":"Human-readable description of the error.","example":"Request validation failed","type":"string","uniqueKey":"detail.message","typeLabel":"string"},"preferred_field":{"description":"The canonical replacement for the deprecated field.","example":"database","type":"string","uniqueKey":"detail.preferred_field","typeLabel":"string"},"retry_after_seconds":{"description":"Seconds to wait before retrying deletion of context that is still indexing.","example":1,"type":"integer","uniqueKey":"detail.retry_after_seconds","typeLabel":"integer"},"retryable":{"description":"Whether retrying this failed query can succeed. Present for search workflow failures.","example":true,"type":"boolean","uniqueKey":"detail.retryable","typeLabel":"boolean"},"success":{"deprecated":true,"description":"Deprecated: always `false`. Read the HTTP status, then `error.code` and `error.message`.","example":false,"type":"boolean","x-deprecated":"true","uniqueKey":"detail.success","typeLabel":"boolean"},"upgrade_url":{"description":"Upgrade link, present only for FREE_PLAN_DEPRECATED when the Free-plan gate is enabled.","example":"https://app.hydradb.com/upgrade","type":"string","uniqueKey":"detail.upgrade_url","typeLabel":"string"}},"title":"HandlerErrorDetail","type":"object","deprecated":true,"description":"Deprecated: compatibility object. Read `error.code` and `error.message`; optional fields carry retry, deprecation or upgrade guidance.","example":{"deprecated":true,"deprecated_field":"tenant_id","deprecated_since":"2.0.1","error_code":"VALIDATION_ERROR","message":"Request validation failed","preferred_field":"database","retry_after_seconds":1,"retryable":true},"uniqueKey":"detail","typeLabel":"HandlerErrorDetail · object"},"error":{"properties":{"code":{"description":"Machine-readable error code (e.g. `DATABASE_NOT_FOUND`).","example":"DATABASE_NOT_FOUND","type":"string","uniqueKey":"error.code","typeLabel":"string"},"details":{"additionalProperties":{"type":"string","uniqueKey":"error.details.additionalProperties","typeLabel":"string"},"description":"Extra facts about the error, as string pairs. Omitted when there are none.","type":"object","uniqueKey":"error.details","typeLabel":"object"},"message":{"description":"Human-readable description of the error.","example":"Database not found","type":"string","uniqueKey":"error.message","typeLabel":"string"},"param":{"description":"The request field that caused the error. Omitted when no single field is at fault.","type":"string","uniqueKey":"error.param","typeLabel":"string"}},"title":"HandlerApiError","type":"object","description":"Structured error object with a machine-readable `code` and human-readable `message`.","example":{"code":"DATABASE_NOT_FOUND","message":"Database not found"},"uniqueKey":"error","typeLabel":"HandlerApiError · object"},"meta":{"properties":{"api_version":{"description":"Version of the API that served the request, for example `2.0.1`.","type":"string","uniqueKey":"meta.api_version","typeLabel":"string"},"latency_ms":{"description":"Server-side processing time in milliseconds.","example":12.3,"type":"number","uniqueKey":"meta.latency_ms","typeLabel":"number"},"request_id":{"description":"Unique identifier for this request, useful for support and tracing.","example":"9d13aef4-02f4-4e73-8c62-4c2601d04f9d","type":"string","uniqueKey":"meta.request_id","typeLabel":"string"}},"title":"HandlerErrorMeta","type":"object","example":{"latency_ms":12.3,"request_id":"9d13aef4-02f4-4e73-8c62-4c2601d04f9d"},"uniqueKey":"meta","typeLabel":"HandlerErrorMeta · object"},"success":{"description":"Whether the request succeeded.","example":false,"type":"boolean","uniqueKey":"success","typeLabel":"boolean"}},"title":"HandlerErrorResponse","type":"object","uniqueKey":"","typeLabel":"HandlerErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"data":null,"detail":{"deprecated":true,"deprecated_field":"tenant_id","deprecated_since":"2.0.1","error_code":"VALIDATION_ERROR","message":"Request validation failed","preferred_field":"database","retry_after_seconds":1,"retryable":true},"error":{"code":"DATABASE_NOT_FOUND","message":"Database not found"},"meta":{"latency_ms":12.3,"request_id":"9d13aef4-02f4-4e73-8c62-4c2601d04f9d"},"success":false}}},"exampleType":"generated"}},"description":"Internal Server Error","exampleType":"generated"}},"security":{"9c9e104b-fc28-43d5-a032-60d770e1366e":{"BearerAuth":{"bearerFormat":"API key","description":"Send your API key as Authorization: Bearer \u003cyour_api_key>.","scheme":"bearer","type":"http","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"1569c47f-c20d-40e2-b012-5f6812359fa5":{"description":"Production server","url":"https://api.hydradb.com"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"bearerFormat":"API key","description":"Send your API key as Authorization: Bearer \u003cyour_api_key>.","scheme":"bearer","type":"http","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Send your API key as Authorization: Bearer \u003cyour_api_key>.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"api-reference/v2/openapi.json"},"subdomain":"cortex-e852fafe","siteName":"HydraDB","title":"Get Metadata Schema - HydraDB","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{"v2":{"href":"/api-reference/v2/endpoint/get-metadata-schema","matchLevel":0},"v1":{"href":"/get-started/introduction","matchLevel":4}},"firstHrefInLanguage":{}},"lastModified":"2026-11-11T17:11:50.423Z","originalFileLocation":"api-reference/v2/endpoint/get-metadata-schema.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=\"dark\"}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=\"Read the metadata fields declared for a database.\">\u003cmeta data-mint-head name=\"application-name\" content=\"HydraDB\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cortex-e852fafe/DBxDrAuXzUjAgIlJ/_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/cortex-e852fafe/DBxDrAuXzUjAgIlJ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cortex-e852fafe/DBxDrAuXzUjAgIlJ/_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/cortex-e852fafe/DBxDrAuXzUjAgIlJ/_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/cortex-e852fafe/DBxDrAuXzUjAgIlJ/_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/cortex-e852fafe/DBxDrAuXzUjAgIlJ/_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/cortex-e852fafe/DBxDrAuXzUjAgIlJ/_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/cortex-e852fafe/DBxDrAuXzUjAgIlJ/_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/cortex-e852fafe/DBxDrAuXzUjAgIlJ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get Metadata Schema - HydraDB\">\u003cmeta data-mint-head property=\"og:description\" content=\"Read the metadata fields declared for a database.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"HydraDB\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.hydradb.com/api-reference/v2/endpoint/get-metadata-schema\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cortex-e852fafe.mintlify.site/_mintlify/api/og/v2?division=Databases\u0026amp;title=Get+Metadata+Schema\u0026amp;description=Read+the+metadata+fields+declared+for+a+database.\u0026amp;theme=9098e130351f6ce0100471f1\u0026amp;signature=37f446fec16d1af00f1df3dcbcd0c8aa60bbe60b962fb945fde63b73fb63dbd8\">\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=\"Get Metadata Schema - HydraDB\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Read the metadata fields declared for a database.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cortex-e852fafe.mintlify.site/_mintlify/api/og/v2?division=Databases\u0026amp;title=Get+Metadata+Schema\u0026amp;description=Read+the+metadata+fields+declared+for+a+database.\u0026amp;theme=9098e130351f6ce0100471f1\u0026amp;signature=37f446fec16d1af00f1df3dcbcd0c8aa60bbe60b962fb945fde63b73fb63dbd8\">\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/cortex-e852fafe/DBxDrAuXzUjAgIlJ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"HydraDB\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FF571A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.hydradb.com/api-reference/v2/endpoint/get-metadata-schema\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/v2/endpoint/get-metadata-schema.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.hydradb.com/#organization\",\"name\":\"HydraDB\",\"url\":\"https://docs.hydradb.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cortex-e852fafe/BS0KyNLwX-6ZV20u/logo/logo.png?fit=max\u0026auto=format\u0026n=BS0KyNLwX-6ZV20u\u0026q=85\u0026s=8344dc832de70bde023451b8be681c27\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.hydradb.com#website\",\"name\":\"HydraDB\",\"url\":\"https://docs.hydradb.com\",\"publisher\":{\"@id\":\"https://docs.hydradb.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.hydradb.com/api-reference/v2/endpoint/get-metadata-schema#webpage\",\"url\":\"https://docs.hydradb.com/api-reference/v2/endpoint/get-metadata-schema\",\"name\":\"Get Metadata Schema\",\"description\":\"Read the metadata fields declared for a database.\",\"dateModified\":\"2026-11-11T17:11:50.423Z\",\"isPartOf\":{\"@id\":\"https://docs.hydradb.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.hydradb.com/api-reference/v2/endpoint/get-metadata-schema#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.hydradb.com/api-reference/v2/endpoint/get-metadata-schema#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Databases\",\"item\":\"https://docs.hydradb.com/api-reference/v2/endpoint/databases-overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get Metadata Schema\",\"item\":\"https://docs.hydradb.com/api-reference/v2/endpoint/get-metadata-schema\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.hydradb.com/api-reference/v2/endpoint/get-metadata-schema#apireference\",\"headline\":\"Get Metadata Schema\",\"name\":\"Get Metadata Schema\",\"description\":\"Read the metadata fields declared for a database.\",\"url\":\"https://docs.hydradb.com/api-reference/v2/endpoint/get-metadata-schema\",\"mainEntityOfPage\":{\"@id\":\"https://docs.hydradb.com/api-reference/v2/endpoint/get-metadata-schema#webpage\"},\"dateModified\":\"2026-11-11T17:11:50.423Z\",\"publisher\":{\"@id\":\"https://docs.hydradb.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.hydradb.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"HydraDB\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"HydraDB\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/v2/endpoint/get-metadata-schema.md","siteName":"HydraDB","nav":{"global":null,"versions":[{"version":"v2","tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/get-started/v2/introduction"}]},{"tab":"API Reference","groups":[{"group":"Overview","public":true,"pages":[{"title":"API Reference","href":"/api-reference/v2"},{"title":"SDKs: Python and TypeScript","href":"/api-reference/v2/sdks"},{"title":"Error Responses","href":"/api-reference/v2/error-responses"}]},{"group":"Databases","public":true,"pages":[{"title":"Databases: Overview","href":"/api-reference/v2/endpoint/databases-overview"},{"title":"Create Database","openapi":"api-reference/v2/openapi.json POST /databases","href":"/api-reference/v2/endpoint/create-database"},{"title":"Database Status","openapi":"api-reference/v2/openapi.json GET /databases/status","href":"/api-reference/v2/endpoint/database-status"},{"title":"List Databases","openapi":"api-reference/v2/openapi.json GET /databases","href":"/api-reference/v2/endpoint/list-databases"},{"title":"Database Stats","description":"Retrieve usage statistics for a database.","openapi":"api-reference/v2/openapi.json GET /databases/stats","href":"/api-reference/v2/endpoint/database-stats"},{"title":"Get Metadata Schema","openapi":"api-reference/v2/openapi.json GET /databases/{database}/metadata-schema","href":"/api-reference/v2/endpoint/get-metadata-schema"},{"title":"Update Metadata Schema","description":"Add new database metadata schema fields after database creation.","openapi":"api-reference/v2/openapi.json PATCH /databases/{database}/metadata-schema","href":"/api-reference/v2/endpoint/update-metadata-schema"},{"title":"List Collections","openapi":"api-reference/v2/openapi.json GET /databases/collections","href":"/api-reference/v2/endpoint/list-collections"},{"title":"Delete Collection","openapi":"api-reference/v2/openapi.json DELETE /databases/collections","href":"/api-reference/v2/endpoint/delete-collection"},{"title":"Delete Database","openapi":"api-reference/v2/openapi.json DELETE /databases","href":"/api-reference/v2/endpoint/delete-database"}]},{"group":"Context","public":true,"pages":[{"title":"Context: Overview","href":"/api-reference/v2/endpoint/context-overview"},{"title":"Ingest Context","openapi":"api-reference/v2/openapi.json POST /context/ingest","href":"/api-reference/v2/endpoint/ingest-context"},{"title":"Ingestion Status","openapi":"api-reference/v2/openapi.json GET /context/status","href":"/api-reference/v2/endpoint/source-status"},{"title":"List Context","openapi":"api-reference/v2/openapi.json POST /context/list","href":"/api-reference/v2/endpoint/list-context"},{"title":"Inspect Context","openapi":"api-reference/v2/openapi.json GET /context/inspect","href":"/api-reference/v2/endpoint/fetch-content"},{"title":"Update Source Metadata","openapi":"api-reference/v2/openapi.json PATCH /context/{id}/metadata","href":"/api-reference/v2/endpoint/update-source-metadata"},{"title":"Inspecting Context Relations","openapi":"api-reference/v2/openapi.json GET /context/relations","href":"/api-reference/v2/endpoint/source-relations"},{"title":"Connected Subgraph","openapi":"api-reference/v2/openapi.json GET /context/{id}/subgraph","href":"/api-reference/v2/endpoint/subgraph"},{"title":"Delete Context","openapi":"api-reference/v2/openapi.json DELETE /context","href":"/api-reference/v2/endpoint/delete-source"}]},{"group":"Query","public":true,"pages":[{"title":"Query: Overview","href":"/api-reference/v2/endpoint/query-overview"},{"title":"Query","openapi":"api-reference/v2/openapi.json POST /query","href":"/api-reference/v2/endpoint/query"},{"title":"Submit Feedback","openapi":"api-reference/v2/openapi.json POST /feedback","href":"/api-reference/v2/endpoint/submit-feedback"}]},{"group":"Connectors","public":true,"pages":[{"title":"Connectors: Overview","href":"/api-reference/v2/endpoint/connectors-overview"},{"title":"List Connector Providers","openapi":"api-reference/v2/openapi.json GET /connectors/providers","href":"/api-reference/v2/endpoint/list-connector-providers"},{"title":"Create Connector","openapi":"api-reference/v2/openapi.json POST /connectors","href":"/api-reference/v2/endpoint/create-connector"},{"title":"Discover Resources","openapi":"api-reference/v2/openapi.json GET /connectors/{id}/discover","href":"/api-reference/v2/endpoint/discover-connector-resources"},{"title":"Configure Connector","openapi":"api-reference/v2/openapi.json POST /connectors/{id}/configure","href":"/api-reference/v2/endpoint/configure-connector"},{"title":"Get Connector Status","openapi":"api-reference/v2/openapi.json GET /connectors/{id}/status","href":"/api-reference/v2/endpoint/get-connector-status"},{"title":"List Connectors","openapi":"api-reference/v2/openapi.json GET /connectors","href":"/api-reference/v2/endpoint/list-connectors"},{"title":"Update Connector","openapi":"api-reference/v2/openapi.json PATCH /connectors/{id}","href":"/api-reference/v2/endpoint/update-connector"},{"title":"Update Connector Resource","openapi":"api-reference/v2/openapi.json PATCH /connectors/{id}/resources/{resource_id}","href":"/api-reference/v2/endpoint/update-connector-resource"}]},{"group":"Webhooks","public":true,"pages":[{"title":"Webhooks: Overview","href":"/api-reference/v2/endpoint/webhooks-overview"},{"title":"Register Webhook","openapi":"api-reference/v2/openapi.json POST /webhooks/indexing","href":"/api-reference/v2/endpoint/register-webhook"},{"title":"Get Webhook","openapi":"api-reference/v2/openapi.json GET /webhooks/indexing","href":"/api-reference/v2/endpoint/get-webhook"},{"title":"Delete Webhook","openapi":"api-reference/v2/openapi.json DELETE /webhooks/indexing","href":"/api-reference/v2/endpoint/delete-webhook"},{"title":"Send Test Delivery","openapi":"api-reference/v2/openapi.json POST /webhooks/indexing/test","href":"/api-reference/v2/endpoint/test-webhook"},{"title":"List Deliveries","openapi":"api-reference/v2/openapi.json GET /webhooks/indexing/deliveries","href":"/api-reference/v2/endpoint/list-webhook-deliveries"},{"title":"Get Delivery","openapi":"api-reference/v2/openapi.json GET /webhooks/indexing/deliveries/{delivery_id}","href":"/api-reference/v2/endpoint/get-webhook-delivery"},{"title":"Retry Delivery","openapi":"api-reference/v2/openapi.json POST /webhooks/indexing/deliveries/{delivery_id}/retry","href":"/api-reference/v2/endpoint/retry-webhook-delivery"},{"title":"Set Signing Secret","openapi":"api-reference/v2/openapi.json POST /webhooks/indexing/signing-secret","href":"/api-reference/v2/endpoint/set-webhook-signing-secret"},{"title":"Disable Signing","openapi":"api-reference/v2/openapi.json DELETE /webhooks/indexing/signing-secret","href":"/api-reference/v2/endpoint/disable-webhook-signing"}]}]},{"tab":"Cookbooks","pages":[{"title":"Cookbooks","href":"/cookbooks/v2"}]}]},{"version":"v1","pages":[{"title":"v1","href":"/get-started/introduction"}]}]},"basePath":"","title":"Get Metadata Schema - HydraDB","deploymentId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","buildId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BuieBNTB.js","snippetPresets-alIv9Yoc.js","utils-BS41p-Nj.js","style-to-object-BY3JEAdk.js","utils-D0Za9LU_.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-Lx7TZ5XR.js","conditional-requirements-CFM0id0Q.js","cloneDeep-4e5CS5ZI.js","_Uint8Array-B2-W7EM3.js","isObject-FP1Yky1u.js","ApiExamples-sCe6z2hN.js","usePlaygroundInputsStore-cU_dFE5n.js","shallow-BwNCr__O.js","isEqual-Cnvzqd4L.js","CodeSnippets-CMIr49P8.js","CodeSnippet-BC-bKzyy.js","use-playground-group-access-c3bgmn-x.js","Page-Acw_JRP6.js","api-description-markdown-1o8U1kkQ.js","DynamicMarkdown-CvOkzads.js","SectionHeading-CJ97Kdt-.js","MethodPill-DynWltjQ.js","getPastedJson-CBCnXiWl.js","Check2Icon-CPHq_WNu.js","axios-CsQoIw0U.js","Markdown-4tjIF-hK.js","AssistantPageLink-BcChI7L3.js","dist-MIf_HGLZ.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}