{ "queries": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "organization_id": "20000000-0000-4000-8000-000000000001", "title": "Monthly Order Value", "description": "Total order value grouped by month for a selected year", "prompt": "Summarize monthly order value and highlight notable changes.", "sql": "SELECT DATEFROMPARTS(YEAR(CreatedAt), MONTH(CreatedAt), 1) AS [Month], SUM(Amount) AS TotalAmount FROM dbo.Orders WHERE YEAR(CreatedAt) = {{year}} GROUP BY YEAR(CreatedAt), MONTH(CreatedAt) ORDER BY [Month]", "parameters": ["year"], "last_updated_by": "30000000-0000-4000-8000-000000000001", "last_updated_by_name": "John Doe", "created_at": "2026-08-01T10:00:00+00:00", "updated_at": "2026-08-02T15:30:00+00:00" } ]}
Saved Queries
List Saved Queries
Retrieve all saved queries for your organization
curl -X GET https://api.trellis.sh/v1/queries \ -H "Authorization: Bearer YOUR_TOKEN"
{ "queries": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "organization_id": "20000000-0000-4000-8000-000000000001", "title": "Monthly Order Value", "description": "Total order value grouped by month for a selected year", "prompt": "Summarize monthly order value and highlight notable changes.", "sql": "SELECT DATEFROMPARTS(YEAR(CreatedAt), MONTH(CreatedAt), 1) AS [Month], SUM(Amount) AS TotalAmount FROM dbo.Orders WHERE YEAR(CreatedAt) = {{year}} GROUP BY YEAR(CreatedAt), MONTH(CreatedAt) ORDER BY [Month]", "parameters": ["year"], "last_updated_by": "30000000-0000-4000-8000-000000000001", "last_updated_by_name": "John Doe", "created_at": "2026-08-01T10:00:00+00:00", "updated_at": "2026-08-02T15:30:00+00:00" } ]}
Saved queries store reusable, parameterized SQL Server queries paired with a natural-language formatting instruction. Run one as a chat turn over the WebSocket or the durable REST turn endpoint. The server executes the stored SQL through the same datasource permission gates used by the agent, emits synthetic tool_call and tool_result frames, then asks the model to format the result using the stored prompt. There is no standalone saved-query execution endpoint.The turn must have a datasource integration. Supply every parameter value as a string. The turn’s free-text message is persisted for display, but the stored saved-query prompt is the instruction passed to the model.This endpoint returns only user-visible queries (display = true), ordered by most recent update. It is not paginated.
The SQL Server statement stored for this query. It may contain {{param_name}} placeholders. Although the storage API accepts null, a saved query needs SQL to run as a chat turn.
{ "queries": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "organization_id": "20000000-0000-4000-8000-000000000001", "title": "Monthly Order Value", "description": "Total order value grouped by month for a selected year", "prompt": "Summarize monthly order value and highlight notable changes.", "sql": "SELECT DATEFROMPARTS(YEAR(CreatedAt), MONTH(CreatedAt), 1) AS [Month], SUM(Amount) AS TotalAmount FROM dbo.Orders WHERE YEAR(CreatedAt) = {{year}} GROUP BY YEAR(CreatedAt), MONTH(CreatedAt) ORDER BY [Month]", "parameters": ["year"], "last_updated_by": "30000000-0000-4000-8000-000000000001", "last_updated_by_name": "John Doe", "created_at": "2026-08-01T10:00:00+00:00", "updated_at": "2026-08-02T15:30:00+00:00" } ]}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Trellis API","description":"Operational intelligence for the physical economy.","colors":{"primary":"#5c6b2d","light":"#859947","dark":"#5c6b2d"},"favicon":"https://mintcdn.com/trellis-bde0f177/-eu_aewctE7y-quZ/favicon.ico?fit=max\u0026auto=format\u0026n=-eu_aewctE7y-quZ\u0026q=85\u0026s=f181f16cd7303c359e55f63487b51008","appearance":{"default":"dark"},"background":{"decoration":"grid","color":{"light":"#f4f5f1","dark":"#121416"}},"navbar":{"links":[{"href":"mailto:support@trellis.sh","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.trellis.sh"}},"footer":{"links":[{"header":"Trellis","items":[{"label":"Home","href":"https://trellis.sh"},{"label":"Dashboard","href":"https://app.trellis.sh"},{"label":"Support","href":"mailto:support@trellis.sh"}]}]},"fonts":{"heading":{"family":"IBM Plex Mono","weight":700},"body":{"family":"IBM Plex Sans","weight":400}},"styling":{"codeblocks":{"theme":{"light":"github-light","dark":"github-dark"}},"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"trellis-bde0f177","hasAudioNarration":false,"actualSubdomain":"trellis-bde0f177","customDomains":["docs.trellis.sh"],"gitSource":{"type":"github","owner":"trellisdynamics","repo":"trellis-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a8399dae6773e7f01cf64e2","collectionId":"f3f67320-9e13-4a90-9241-6ee172f34d55","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6a8399dae6773e7f01cf64e2"},"entitlements":{},"buildId":"6a8399dae6773e7f01cf64e2:success","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"default","tag":"API Reference","count":57},{"language":"default","tag":"Chats","count":21},{"language":"default","tag":"Organization Rules","count":6},{"language":"default","tag":"User Memories","count":6},{"language":"default","tag":"Admin","count":5},{"language":"default","tag":"Saved Queries","count":5},{"language":"default","tag":"Datasources","count":3},{"language":"default","tag":"Documentation","count":3},{"language":"default","tag":"Getting Started","count":3},{"language":"default","tag":"Artifacts","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","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":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":true},"customCss":[{"filePath":"styles.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'IBM Plex Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/ibmplexmono/v20/-F63fjptAgt5VM-kVkqdyU8n1iIq129k.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'IBM Plex Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/ibmplexmono/v20/-F63fjptAgt5VM-kVkqdyU8n1isq129k.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* vietnamese */\n@font-face {\n font-family: 'IBM Plex Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/ibmplexmono/v20/-F63fjptAgt5VM-kVkqdyU8n1iAq129k.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'IBM Plex Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/ibmplexmono/v20/-F63fjptAgt5VM-kVkqdyU8n1iEq129k.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'IBM Plex Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/ibmplexmono/v20/-F63fjptAgt5VM-kVkqdyU8n1i8q1w.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'IBM Plex Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3twJwl1FgtIU.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'IBM Plex Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3twJwlRFgtIU.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* vietnamese */\n@font-face {\n font-family: 'IBM Plex Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3twJwl9FgtIU.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'IBM Plex Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3twJwl5FgtIU.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'IBM Plex Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3twJwlBFgg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'IBM Plex Mono';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3pQPwl1FgtIU.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'IBM Plex Mono';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3pQPwlRFgtIU.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* vietnamese */\n@font-face {\n font-family: 'IBM Plex Mono';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3pQPwl9FgtIU.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'IBM Plex Mono';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3pQPwl5FgtIU.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'IBM Plex Mono';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3pQPwlBFgg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n*,::after,::before{border-radius:0!important}[class*=shadow],[style*=box-shadow]{box-shadow:none!important}h1,h2,h3,h4,h5,h6{font-family:\"IBM Plex Mono\",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace!important;text-transform:uppercase;letter-spacing:.05em;font-weight:700}.eyebrow,[class*=badge],[class*=eyebrow],[class*=label]:not(label){letter-spacing:.2em;text-transform:uppercase;font-family:\"IBM Plex Mono\",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace!important}code,code *,kbd,pre,pre *,samp{font-family:\"IBM Plex Mono\",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace!important;font-weight:400!important}:root,:root[data-theme=dark],html.dark{--background:#121416;--surface:#121416;--surface-container-low:#1a1c1e;--surface-container-high:#282a2c;--surface-container-highest:#333537;--on-surface:#e2e2e5;--on-surface-variant:#a0a0a3;--outline:#909282;--outline-variant:#46483b}[class*=navbar] a[href*=\"app.trellis.sh\"],a[class*=primary-button],button[class*=primary]{clip-path:polygon(0 0,calc(100% - 12px) 0,100% 12px,100% 100%,0 100%)}.status-dot,[class*=status-indicator]{clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}"}],"page":{"pagePath":"api-reference/queries/list-queries","slug":"/api-reference/queries/list-queries","pageMetadata":{"title":"List Saved Queries","description":"Retrieve all saved queries for your organization","href":"/api-reference/queries/list-queries"},"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: \"Retrieve all saved queries for your organization\"\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`,p:`p`,..._provideComponents(),...props.components},{Expandable,Heading,ParamField,ResponseField}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Saved queries store reusable, parameterized SQL Server queries paired with a natural-language formatting instruction. Run one as a chat turn over the `,_jsx(_components.a,{href:`/api-reference/chats/websocket#send-a-message`,children:`WebSocket`}),` or the durable REST turn endpoint. The server executes the stored SQL through the same datasource permission gates used by the agent, emits synthetic `,_jsx(_components.code,{children:`tool_call`}),` and `,_jsx(_components.code,{children:`tool_result`}),` frames, then asks the model to format the result using the stored `,_jsx(_components.code,{children:`prompt`}),`. There is no standalone saved-query execution endpoint.`]}),`\n`,_jsxs(_components.p,{children:[`The turn must have a datasource integration. Supply every parameter value as a string. The turn’s free-text `,_jsx(_components.code,{children:`message`}),` is persisted for display, but the stored saved-query `,_jsx(_components.code,{children:`prompt`}),` is the instruction passed to the model.`]}),`\n`,_jsxs(_components.p,{children:[`This endpoint returns only user-visible queries (`,_jsx(_components.code,{children:`display = true`}),`), ordered by most recent update. It is not paginated.`]}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsx(_components.p,{children:`Bearer token obtained from the authenticate endpoint.`})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(ResponseField,{name:`queries`,type:`array`,required:true,id:`param-queries`,children:[_jsx(_components.p,{children:`List of saved queries.`}),_jsxs(Expandable,{title:`Query object`,children:[_jsx(ResponseField,{name:`id`,type:`string`,required:true,id:`param-id`,children:_jsx(_components.p,{children:`Unique identifier for the saved query.`})}),_jsx(ResponseField,{name:`organization_id`,type:`string`,required:true,id:`param-organization-id`,children:_jsx(_components.p,{children:`Organization the query belongs to.`})}),_jsx(ResponseField,{name:`title`,type:`string`,required:true,id:`param-title`,children:_jsx(_components.p,{children:`Display title for the query.`})}),_jsx(ResponseField,{name:`description`,type:`string | null`,id:`param-description`,children:_jsx(_components.p,{children:`Optional human-readable description of what the query does.`})}),_jsx(ResponseField,{name:`prompt`,type:`string`,required:true,id:`param-prompt`,children:_jsx(_components.p,{children:`The natural language instruction passed to the AI agent when this query is invoked.`})}),_jsx(ResponseField,{name:`sql`,type:`string | null`,id:`param-sql`,children:_jsxs(_components.p,{children:[`The SQL Server statement stored for this query. It may contain `,_jsx(_components.code,{children:`{{param_name}}`}),` placeholders. Although the storage API accepts `,_jsx(_components.code,{children:`null`}),`, a saved query needs SQL to run as a chat turn.`]})}),_jsx(ResponseField,{name:`parameters`,type:`string[]`,required:true,id:`param-parameters`,children:_jsxs(_components.p,{children:[`Unique placeholder names found in `,_jsx(_components.code,{children:`sql`}),`, in first-appearance order. Supply every value as a string when running the query over WebSocket or REST.`]})}),_jsx(ResponseField,{name:`last_updated_by`,type:`string`,required:true,id:`param-last-updated-by`,children:_jsx(_components.p,{children:`Member ID of the user who last modified this query.`})}),_jsx(ResponseField,{name:`last_updated_by_name`,type:`string`,id:`param-last-updated-by-name`,children:_jsx(_components.p,{children:`Display name of the user who last modified this query.`})}),_jsx(ResponseField,{name:`created_at`,type:`string`,required:true,id:`param-created-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp when the query was created.`})}),_jsx(ResponseField,{name:`updated_at`,type:`string`,required:true,id:`param-updated-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp when the query was last modified.`})})]})]})]})}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":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"List Saved Queries","description":"Retrieve all saved queries for your organization","href":"/api-reference/queries/list-queries"}}},"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`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,RequestExample,ResponseExample,ResponseField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Saved queries store reusable, parameterized SQL Server queries paired with a natural-language formatting instruction. Run one as a chat turn over the `,_jsx(_components.a,{href:`/api-reference/chats/websocket#send-a-message`,children:`WebSocket`}),` or the durable REST turn endpoint. The server executes the stored SQL through the same datasource permission gates used by the agent, emits synthetic `,_jsx(_components.code,{children:`tool_call`}),` and `,_jsx(_components.code,{children:`tool_result`}),` frames, then asks the model to format the result using the stored `,_jsx(_components.code,{children:`prompt`}),`. There is no standalone saved-query execution endpoint.`]}),`\n`,_jsxs(_components.p,{children:[`The turn must have a datasource integration. Supply every parameter value as a string. The turn’s free-text `,_jsx(_components.code,{children:`message`}),` is persisted for display, but the stored saved-query `,_jsx(_components.code,{children:`prompt`}),` is the instruction passed to the model.`]}),`\n`,_jsxs(_components.p,{children:[`This endpoint returns only user-visible queries (`,_jsx(_components.code,{children:`display = true`}),`), ordered by most recent update. It is not paginated.`]}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsx(_components.p,{children:`Bearer token obtained from the authenticate endpoint.`})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(ResponseField,{name:`queries`,type:`array`,required:true,id:`param-queries`,children:[_jsx(_components.p,{children:`List of saved queries.`}),_jsxs(Expandable,{title:`Query object`,children:[_jsx(ResponseField,{name:`id`,type:`string`,required:true,id:`param-id`,children:_jsx(_components.p,{children:`Unique identifier for the saved query.`})}),_jsx(ResponseField,{name:`organization_id`,type:`string`,required:true,id:`param-organization-id`,children:_jsx(_components.p,{children:`Organization the query belongs to.`})}),_jsx(ResponseField,{name:`title`,type:`string`,required:true,id:`param-title`,children:_jsx(_components.p,{children:`Display title for the query.`})}),_jsx(ResponseField,{name:`description`,type:`string | null`,id:`param-description`,children:_jsx(_components.p,{children:`Optional human-readable description of what the query does.`})}),_jsx(ResponseField,{name:`prompt`,type:`string`,required:true,id:`param-prompt`,children:_jsx(_components.p,{children:`The natural language instruction passed to the AI agent when this query is invoked.`})}),_jsx(ResponseField,{name:`sql`,type:`string | null`,id:`param-sql`,children:_jsxs(_components.p,{children:[`The SQL Server statement stored for this query. It may contain `,_jsx(_components.code,{children:`{{param_name}}`}),` placeholders. Although the storage API accepts `,_jsx(_components.code,{children:`null`}),`, a saved query needs SQL to run as a chat turn.`]})}),_jsx(ResponseField,{name:`parameters`,type:`string[]`,required:true,id:`param-parameters`,children:_jsxs(_components.p,{children:[`Unique placeholder names found in `,_jsx(_components.code,{children:`sql`}),`, in first-appearance order. Supply every value as a string when running the query over WebSocket or REST.`]})}),_jsx(ResponseField,{name:`last_updated_by`,type:`string`,required:true,id:`param-last-updated-by`,children:_jsx(_components.p,{children:`Member ID of the user who last modified this query.`})}),_jsx(ResponseField,{name:`last_updated_by_name`,type:`string`,id:`param-last-updated-by-name`,children:_jsx(_components.p,{children:`Display name of the user who last modified this query.`})}),_jsx(ResponseField,{name:`created_at`,type:`string`,required:true,id:`param-created-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp when the query was created.`})}),_jsx(ResponseField,{name:`updated_at`,type:`string`,required:true,id:`param-updated-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp when the query was last modified.`})})]})]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -X`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` GET`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` https://api.trellis.sh/v1/queries`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"Authorization: Bearer YOUR_TOKEN\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`7`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`response `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` requests.get(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` \"https://api.trellis.sh/v1/queries\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:` headers`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Bearer YOUR_TOKEN\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`queries `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response.json()[`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"queries\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`]`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`4`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` response`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` fetch`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"https://api.trellis.sh/v1/queries\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` headers: { Authorization: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Bearer YOUR_TOKEN\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`queries`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` response.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`json`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`();`})]}),`\n`]})})})]}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`200`,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"queries\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"organization_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"20000000-0000-4000-8000-000000000001\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Monthly Order Value\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Total order value grouped by month for a selected year\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Summarize monthly order value and highlight notable changes.\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"sql\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"SELECT DATEFROMPARTS(YEAR(CreatedAt), MONTH(CreatedAt), 1) AS [Month], SUM(Amount) AS TotalAmount FROM dbo.Orders WHERE YEAR(CreatedAt) = {{year}} GROUP BY YEAR(CreatedAt), MONTH(CreatedAt) ORDER BY [Month]\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"parameters\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: [`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"year\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"last_updated_by\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"30000000-0000-4000-8000-000000000001\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"last_updated_by_name\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"John Doe\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-08-01T10:00:00+00:00\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"updated_at\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"2026-08-02T15:30:00+00:00\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\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":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"List Saved Queries","description":"Retrieve all saved queries for your organization","href":"/api-reference/queries/list-queries"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Response","slug":"response","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"2\">\u003cspan class=\"line\">\u003cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">curl\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -X\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> GET\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> https://api.trellis.sh/v1/queries\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"Authorization: Bearer YOUR_TOKEN\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"7\">\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">import\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">response \u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> requests.get(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> \"https://api.trellis.sh/v1/queries\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#E36209;--shiki-dark:#FFAB70\"> headers\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">{\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"Authorization\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"Bearer YOUR_TOKEN\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">queries \u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> response.json()[\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"queries\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">]\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"JavaScript","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">const\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> response\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\"> =\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\"> await\u003c/span>\u003cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\"> fetch\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">(\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"https://api.trellis.sh/v1/queries\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> headers: { Authorization: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"Bearer YOUR_TOKEN\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">const\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">queries\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> } \u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\">=\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#F97583\"> await\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> response.\u003c/span>\u003cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">json\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">();\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200","html":"\u003cpre class=\"shiki shiki-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"17\">\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"queries\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"organization_id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"20000000-0000-4000-8000-000000000001\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"title\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"Monthly Order Value\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"description\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"Total order value grouped by month for a selected year\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"prompt\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"Summarize monthly order value and highlight notable changes.\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"sql\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"SELECT DATEFROMPARTS(YEAR(CreatedAt), MONTH(CreatedAt), 1) AS [Month], SUM(Amount) AS TotalAmount FROM dbo.Orders WHERE YEAR(CreatedAt) = {{year}} GROUP BY YEAR(CreatedAt), MONTH(CreatedAt) ORDER BY [Month]\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"parameters\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"year\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"last_updated_by\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"30000000-0000-4000-8000-000000000001\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"last_updated_by_name\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"John Doe\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"2026-08-01T10:00:00+00:00\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"updated_at\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"2026-08-02T15:30:00+00:00\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":[],"subdomain":"trellis-bde0f177","siteName":"Trellis API","title":"List Saved Queries - Trellis API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-10T04:12:22.787Z","originalFileLocation":"api-reference/queries/list-queries.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=\"Retrieve all saved queries for your organization\">\u003cmeta data-mint-head name=\"application-name\" content=\"Trellis API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/trellis-bde0f177/f4s_qyEtr4VJ9yhE/_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/trellis-bde0f177/f4s_qyEtr4VJ9yhE/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/trellis-bde0f177/f4s_qyEtr4VJ9yhE/_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/trellis-bde0f177/f4s_qyEtr4VJ9yhE/_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/trellis-bde0f177/f4s_qyEtr4VJ9yhE/_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/trellis-bde0f177/f4s_qyEtr4VJ9yhE/_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/trellis-bde0f177/f4s_qyEtr4VJ9yhE/_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/trellis-bde0f177/f4s_qyEtr4VJ9yhE/_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/trellis-bde0f177/f4s_qyEtr4VJ9yhE/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"List Saved Queries - Trellis API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Retrieve all saved queries for your organization\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Trellis API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.trellis.sh/api-reference/queries/list-queries\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://trellis-bde0f177.mintlify.app/_mintlify/api/og/v2?division=Saved+Queries\u0026amp;title=List+Saved+Queries\u0026amp;description=Retrieve+all+saved+queries+for+your+organization\u0026amp;theme=e7171dc783ab916fda63b88d\u0026amp;signature=ffa8acc377abc15f9e575bd55b30b57f0e73a313ece2c9adcd7c8aba8f748c0c\">\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=\"List Saved Queries - Trellis API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Retrieve all saved queries for your organization\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://trellis-bde0f177.mintlify.app/_mintlify/api/og/v2?division=Saved+Queries\u0026amp;title=List+Saved+Queries\u0026amp;description=Retrieve+all+saved+queries+for+your+organization\u0026amp;theme=e7171dc783ab916fda63b88d\u0026amp;signature=ffa8acc377abc15f9e575bd55b30b57f0e73a313ece2c9adcd7c8aba8f748c0c\">\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/trellis-bde0f177/f4s_qyEtr4VJ9yhE/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Trellis API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5c6b2d\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.trellis.sh/api-reference/queries/list-queries\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/queries/list-queries.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.trellis.sh/#organization\",\"name\":\"Trellis API\",\"url\":\"https://docs.trellis.sh\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.trellis.sh#website\",\"name\":\"Trellis API\",\"url\":\"https://docs.trellis.sh\",\"publisher\":{\"@id\":\"https://docs.trellis.sh/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.trellis.sh/api-reference/queries/list-queries#webpage\",\"url\":\"https://docs.trellis.sh/api-reference/queries/list-queries\",\"name\":\"List Saved Queries\",\"description\":\"Retrieve all saved queries for your organization\",\"dateModified\":\"2026-08-10T04:12:22.787Z\",\"isPartOf\":{\"@id\":\"https://docs.trellis.sh#website\"},\"breadcrumb\":{\"@id\":\"https://docs.trellis.sh/api-reference/queries/list-queries#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.trellis.sh/api-reference/queries/list-queries#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Trellis API\",\"item\":\"https://docs.trellis.sh\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"List Saved Queries\",\"item\":\"https://docs.trellis.sh/api-reference/queries/list-queries\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.trellis.sh/api-reference/queries/list-queries#article\",\"headline\":\"List Saved Queries\",\"name\":\"List Saved Queries\",\"description\":\"Retrieve all saved queries for your organization\",\"url\":\"https://docs.trellis.sh/api-reference/queries/list-queries\",\"mainEntityOfPage\":{\"@id\":\"https://docs.trellis.sh/api-reference/queries/list-queries#webpage\"},\"dateModified\":\"2026-08-10T04:12:22.787Z\",\"publisher\":{\"@id\":\"https://docs.trellis.sh/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.trellis.sh#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Trellis API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Trellis API","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API reference","href":"/api-reference/introduction"}]},{"group":"Authentication","pages":[{"title":"Authenticate","href":"/api-reference/authentication/authenticate"}]},{"group":"Agents","pages":[{"title":"List Agents","href":"/api-reference/agents/list-agents"}]},{"group":"Datasources","pages":[{"title":"List Integrations","href":"/api-reference/datasources/list-integrations"},{"title":"List Projects","href":"/api-reference/datasources/list-projects"},{"title":"Get Project","description":"Retrieve a specific project by ID","href":"/api-reference/datasources/get-project"}]},{"group":"Saved Queries","pages":[{"title":"List Saved Queries","href":"/api-reference/queries/list-queries"},{"title":"Get Saved Query","description":"Retrieve a specific saved query by ID","href":"/api-reference/queries/get-query"},{"title":"Create Saved Query","href":"/api-reference/queries/create-query"},{"title":"Update Saved Query","href":"/api-reference/queries/update-query"},{"title":"Delete Saved Query","href":"/api-reference/queries/delete-query"}]},{"group":"Models","pages":[{"title":"List Models","href":"/api-reference/models"}]},{"group":"Chats","pages":[{"title":"Chat Overview","href":"/api-reference/chats/overview"},{"title":"WebSocket Chat","href":"/api-reference/chats/websocket"},{"title":"Create Durable Turn","href":"/api-reference/chats/create-turn"},{"title":"Get Durable Turn","href":"/api-reference/chats/get-turn"},{"title":"Cancel Durable Turn","href":"/api-reference/chats/cancel-turn"},{"title":"Structured Output","href":"/api-reference/chats/visualizations"},{"title":"List Chats","href":"/api-reference/chats/list-chats"},{"title":"Get Chat","href":"/api-reference/chats/get-chat"},{"title":"Create Chat","href":"/api-reference/chats/create-chat"},{"title":"Upload Files","href":"/api-reference/chats/upload-files"},{"title":"List Uploads","href":"/api-reference/chats/list-uploads"},{"title":"Delete Upload","href":"/api-reference/chats/delete-upload"},{"title":"Update Chat","href":"/api-reference/chats/update-chat"},{"title":"Delete Chat","href":"/api-reference/chats/delete-chat"},{"title":"Delete Multiple Chats","href":"/api-reference/chats/delete-chats"},{"title":"Delete Message","href":"/api-reference/chats/delete-message"},{"title":"Get Message","href":"/api-reference/chats/get-message"},{"title":"Message Feedback","href":"/api-reference/chats/message-feedback"},{"title":"Get Follow-ups","href":"/api-reference/chats/get-followups"},{"title":"Stream Message Audio","href":"/api-reference/chats/get-message-audio"},{"title":"Get Panel","href":"/api-reference/chats/get-panel"}]},{"group":"Artifacts","pages":[{"title":"Get Artifact","href":"/api-reference/artifacts/get-artifact"},{"title":"Get Artifact Payload","href":"/api-reference/artifacts/get-artifact-payload"}]},{"group":"Jobs","pages":[{"title":"Get Job","href":"/api-reference/jobs/get-job"},{"title":"Cancel Job","href":"/api-reference/jobs/cancel-job"}]},{"group":"Voice","pages":[{"title":"Create Voice Session","href":"/api-reference/voice/create-session"},{"title":"Voice Timing","href":"/api-reference/voice/voice-timing"}]},{"group":"Audio","pages":[{"title":"Transcribe Audio","href":"/api-reference/audio/transcribe"}]},{"group":"User Memories","pages":[{"title":"List User Memories","href":"/api-reference/user-memories/list-user-memories"},{"title":"Get User Memory","href":"/api-reference/user-memories/get-user-memory"},{"title":"Create User Memory","href":"/api-reference/user-memories/create-user-memory"},{"title":"Update User Memory","href":"/api-reference/user-memories/update-user-memory"},{"title":"Delete User Memory","href":"/api-reference/user-memories/delete-user-memory"},{"title":"Reorder User Memories","href":"/api-reference/user-memories/reorder-user-memories"}]},{"group":"Organization Rules","pages":[{"title":"List Organization Rules","href":"/api-reference/organization-rules/list-organization-rules"},{"title":"Get Organization Rule","href":"/api-reference/organization-rules/get-organization-rule"},{"title":"Create Organization Rule","href":"/api-reference/organization-rules/create-organization-rule"},{"title":"Update Organization Rule","href":"/api-reference/organization-rules/update-organization-rule"},{"title":"Delete Organization Rule","href":"/api-reference/organization-rules/delete-organization-rule"},{"title":"Reorder Organization Rules","href":"/api-reference/organization-rules/reorder-organization-rules"}]},{"group":"Admin","pages":[{"title":"List User Memories","href":"/api-reference/admin/list-user-memories"},{"title":"Create User Memory","href":"/api-reference/admin/create-user-memory"},{"title":"Update User Memory","href":"/api-reference/admin/update-user-memory"},{"title":"Delete User Memory","href":"/api-reference/admin/delete-user-memory"},{"title":"Reorder User Memories","href":"/api-reference/admin/reorder-user-memories"}]}]}]},"title":"List Saved Queries - Trellis API","buildId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","deploymentId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","dynamics":["2b790eda92"],"chunks":["ApiExamples-CY2WdoTl.js","utils-ChMov4Kr.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","cloneDeep-izs3Hzxb.js","utils-_REmC2bI.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-DwYG-Q4l.js","shallow-BXQIGwv4.js","snippetPresets-DZadmXoU.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","getApiPlaygroundDisplay-CK5nK5B9.js","CodeSnippet-TH4a2aGW.js","CodeSnippets-DwsQiOFS.js"]}