{ "denied_access_rules": [ { "index": 0, "access_rule_id": 4211, "query_table": "narrative.rosetta_stone", "violations": [ { "type": "join_required", "required_join_keys": [ [ { "attribute": "email", "form": "raw" } ] ], "reason": "The query must join this access rule with your company's data on one of the keys its policy requires." } ] }, { "index": 2, "access_rule_name": "draft_rule", "query_table": "acme.draft_rule", "violations": [ { "type": "field_usage", "field": "email", "usage": "projection", "reason": "Field email cannot be selected." }, { "type": "field_usage", "field": "phone", "usage": "projection", "operator": "sha256", "reason": "Field phone can be selected only through a listed operator, and sha256 is not listed." } ] } ]}
NQL
Simulate an NQL query against access rules
Check which of a chosen set of access rules would deny a SELECT or MERGE statement, without running
it. Nothing is stored and no data is read: no job is created and no credits are charged.
The statement runs as the caller’s company, in the role of a buyer, against the listed access rules
only. An entry is a stored access rule that the caller’s company owns or can query, or an inline access
rule defined in the request. Each access rule moves, with the datasets it reads, to a placeholder company
named by its placeholder_owner_slug, and the statement reads it as
<placeholder_owner_slug>.<access_rule_name> or through narrative.rosetta_stone. The placeholder
company exists only for this request. Its slug can be the slug of a real company, such as the access
rule’s real owner, and that company’s data is never involved.
The statement reads the caller’s own active datasets only through company_data: by id, by name, or all
of them through company_data.rosetta_stone. The caller’s own slug is not a namespace in a simulation.
Views and derived mappings are not available, and opt-out datasets and dataset statistics are not loaded.
Query policies are evaluated before opt-out and sampling would apply, so neither changes which access
rules are denied. The policies are checked by the same query policy evaluation a normal query goes
through.
The response lists, per access rule and query table, the violations that denied it. A listed access rule
that is not in the list was not denied: its policy allowed the statement, or the statement did not read
it.
Requires a token with read access to subscriptions.
The statement to check: a SELECT, including WITH and UNION selects, or a MERGE into one of the
caller's datasets. INSERT, UPDATE and DELETE cannot read access rules, so they, CREATE MATERIALIZED VIEW and EXPLAIN return 422.
The statement runs as the caller's company, in the role of a buyer. It reads a listed access rule as
<placeholder_owner_slug>.<access_rule_name>, or through narrative.rosetta_stone. It reads the
caller's own datasets only through company_data: by id, by name, or through
company_data.rosetta_stone. The caller's own slug is not a namespace in a simulation.
The data plane the statement is compiled for. Every listed access rule, stored or inline, must be on
this data plane, and the statement reads the caller's datasets only from it.
The access rules the statement runs against. Apart from the caller's own datasets, the statement sees
only these access rules.
Show child attributes
Response
The statement compiled. denied_access_rules can be empty, which means no listed access rule denied the
statement. A listed access rule that is not in denied_access_rules was not denied by its policy: it allowed
the query or no table in the query reached it.
The access rules whose query policy denied the statement. A listed access rule that is not in
denied_access_rules was not denied: its policy allowed the statement, or the statement did not read it.
One entry per access rule and query table it was denied on, in the order of context.access_rules.
When the statement reads the same table more than once, such as in a self-join, each read that is
denied has its own entry.
An access rule denied on one query table. Set access_rule_id for a stored access rule and
access_rule_name for an inline one.
Option 1
Option 2
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Narrative I/O Knowledge Base","colors":{"primary":"#1438F5","light":"#F4F7FB","dark":"#010A28"},"logo":{"light":"https://mintcdn.com/narrative-07c7a1f7/ia6SQX79O4nc7uYf/logo/banner.png?fit=max\u0026auto=format\u0026n=ia6SQX79O4nc7uYf\u0026q=85\u0026s=99860b25011c79366624a87d1f648861","dark":"https://mintcdn.com/narrative-07c7a1f7/ia6SQX79O4nc7uYf/logo/banner-dark.png?fit=max\u0026auto=format\u0026n=ia6SQX79O4nc7uYf\u0026q=85\u0026s=604f9688855cf1123b9eddfc8a5bf0e5"},"favicon":"https://mintcdn.com/narrative-07c7a1f7/DaYE2y2_p0IkASZU/favicon.svg?fit=max\u0026auto=format\u0026n=DaYE2y2_p0IkASZU\u0026q=85\u0026s=9961047bdb2aaf9298577e1c3e624c24","navbar":{"links":[{"href":"mailto:[email protected]","label":"Support"}],"primary":{"type":"button","label":"Open Narrative","href":"https://app.narrative.io"}},"footer":{"socials":{"github":"https://github.com/narrative-io","linkedin":"https://linkedin.com/company/narrative-io"}},"seo":{"indexing":"navigable"},"integrations":{"fathom":{"siteId":"WELVPSSZ"},"ga4":{"measurementId":"G-27FP7EFNFW"},"cookies":{}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Release Notes","icon":"clock-rotate-left","href":"/release-notes"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"narrative-07c7a1f7","hasAudioNarration":false,"actualSubdomain":"narrative-07c7a1f7","customDomains":["docs.narrative.io"],"gitSource":{"type":"github","owner":"narrative-io","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aecc03975e8c9363388629a","collectionId":"15e2d7a3-e39d-480e-961c-46734d6901a7","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aecc03975e8c9363388629a"},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aee03ee637c395c8819f86d","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"API Documentation","count":228},{"language":"default","tag":"Connectors","count":112},{"language":"default","tag":"Reference","count":112},{"language":"default","tag":"All connectors","count":110},{"language":"default","tag":"Architecture Reference","count":77},{"language":"default","tag":"Agent Conversations","count":64},{"language":"default","tag":"Concepts","count":62},{"language":"default","tag":"Guides","count":58},{"language":"default","tag":"Errors","count":55},{"language":"default","tag":"API reference","count":43}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"[email protected]","showHelpButton":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":"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":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/nql/simulate-an-nql-query-against-access-rules","slug":"/api-reference/nql/simulate-an-nql-query-against-access-rules","pageMetadata":{"title":"Simulate an NQL query against access rules","description":"Check which of a chosen set of access rules would deny a `SELECT` or `MERGE` statement, without running\nit. Nothing is stored and no data is read: no job is created and no credits are charged.\n\nThe statement runs as the caller's company, in the role of a buyer, against the listed access rules\nonly. An entry is a stored access rule that the caller's company owns or can query, or an inline access\nrule defined in the request. Each access rule moves, with the datasets it reads, to a placeholder company\nnamed by its `placeholder_owner_slug`, and the statement reads it as\n`\u003cplaceholder_owner_slug>.\u003caccess_rule_name>` or through `narrative.rosetta_stone`. The placeholder\ncompany exists only for this request. Its slug can be the slug of a real company, such as the access\nrule's real owner, and that company's data is never involved.\n\nThe statement reads the caller's own active datasets only through `company_data`: by id, by name, or all\nof them through `company_data.rosetta_stone`. The caller's own slug is not a namespace in a simulation.\nViews and derived mappings are not available, and opt-out datasets and dataset statistics are not loaded.\nQuery policies are evaluated before opt-out and sampling would apply, so neither changes which access\nrules are denied. The policies are checked by the same query policy evaluation a normal query goes\nthrough.\n\nThe response lists, per access rule and query table, the violations that denied it. A listed access rule\nthat is not in the list was not denied: its policy allowed the statement, or the statement did not read\nit.\n\nRequires a token with read access to subscriptions.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/nql/simulate","href":"/api-reference/nql/simulate-an-nql-query-against-access-rules","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Check which of a chosen set of access rules would deny a \", _jsx(_components.code, {\n children: \"SELECT\"\n }), \" or \", _jsx(_components.code, {\n children: \"MERGE\"\n }), \" statement, without running\\nit. Nothing is stored and no data is read: no job is created and no credits are charged.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The statement runs as the caller’s company, in the role of a buyer, against the listed access rules\\nonly. An entry is a stored access rule that the caller’s company owns or can query, or an inline access\\nrule defined in the request. Each access rule moves, with the datasets it reads, to a placeholder company\\nnamed by its \", _jsx(_components.code, {\n children: \"placeholder_owner_slug\"\n }), \", and the statement reads it as\\n\", _jsx(_components.code, {\n children: \"\u003cplaceholder_owner_slug>.\u003caccess_rule_name>\"\n }), \" or through \", _jsx(_components.code, {\n children: \"narrative.rosetta_stone\"\n }), \". The placeholder\\ncompany exists only for this request. Its slug can be the slug of a real company, such as the access\\nrule’s real owner, and that company’s data is never involved.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The statement reads the caller’s own active datasets only through \", _jsx(_components.code, {\n children: \"company_data\"\n }), \": by id, by name, or all\\nof them through \", _jsx(_components.code, {\n children: \"company_data.rosetta_stone\"\n }), \". The caller’s own slug is not a namespace in a simulation.\\nViews and derived mappings are not available, and opt-out datasets and dataset statistics are not loaded.\\nQuery policies are evaluated before opt-out and sampling would apply, so neither changes which access\\nrules are denied. The policies are checked by the same query policy evaluation a normal query goes\\nthrough.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"The response lists, per access rule and query table, the violations that denied it. A listed access rule\\nthat is not in the list was not denied: its policy allowed the statement, or the statement did not read\\nit.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Requires a token with read access to subscriptions.\"\n })]\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Simulate an NQL query against access rules","description":"Check which of a chosen set of access rules would deny a `SELECT` or `MERGE` statement, without running\nit. Nothing is stored and no data is read: no job is created and no credits are charged.\n\nThe statement runs as the caller's company, in the role of a buyer, against the listed access rules\nonly. An entry is a stored access rule that the caller's company owns or can query, or an inline access\nrule defined in the request. Each access rule moves, with the datasets it reads, to a placeholder company\nnamed by its `placeholder_owner_slug`, and the statement reads it as\n`\u003cplaceholder_owner_slug>.\u003caccess_rule_name>` or through `narrative.rosetta_stone`. The placeholder\ncompany exists only for this request. Its slug can be the slug of a real company, such as the access\nrule's real owner, and that company's data is never involved.\n\nThe statement reads the caller's own active datasets only through `company_data`: by id, by name, or all\nof them through `company_data.rosetta_stone`. The caller's own slug is not a namespace in a simulation.\nViews and derived mappings are not available, and opt-out datasets and dataset statistics are not loaded.\nQuery policies are evaluated before opt-out and sampling would apply, so neither changes which access\nrules are denied. The policies are checked by the same query policy evaluation a normal query goes\nthrough.\n\nThe response lists, per access rule and query table, the violations that denied it. A listed access rule\nthat is not in the list was not denied: its policy allowed the statement, or the statement did not read\nit.\n\nRequires a token with read access to subscriptions.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/nql/simulate","href":"/api-reference/nql/simulate-an-nql-query-against-access-rules","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/narrative-07c7a1f7/d5d45b2d00effc8b/secure-privacy.js"],"openApiReferenceData":{"operation":{"summary":"Simulate an NQL query against access rules","description":"Check which of a chosen set of access rules would deny a `SELECT` or `MERGE` statement, without running\nit. Nothing is stored and no data is read: no job is created and no credits are charged.\n\nThe statement runs as the caller's company, in the role of a buyer, against the listed access rules\nonly. An entry is a stored access rule that the caller's company owns or can query, or an inline access\nrule defined in the request. Each access rule moves, with the datasets it reads, to a placeholder company\nnamed by its `placeholder_owner_slug`, and the statement reads it as\n`\u003cplaceholder_owner_slug>.\u003caccess_rule_name>` or through `narrative.rosetta_stone`. The placeholder\ncompany exists only for this request. Its slug can be the slug of a real company, such as the access\nrule's real owner, and that company's data is never involved.\n\nThe statement reads the caller's own active datasets only through `company_data`: by id, by name, or all\nof them through `company_data.rosetta_stone`. The caller's own slug is not a namespace in a simulation.\nViews and derived mappings are not available, and opt-out datasets and dataset statistics are not loaded.\nQuery policies are evaluated before opt-out and sampling would apply, so neither changes which access\nrules are denied. The policies are checked by the same query policy evaluation a normal query goes\nthrough.\n\nThe response lists, per access rule and query table, the violations that denied it. A listed access rule\nthat is not in the list was not denied: its policy allowed the statement, or the statement did not read\nit.\n\nRequires a token with read access to subscriptions.","tags":["NQL"],"security":["674c7c02-6f85-423c-9ec2-6b169f7cd310"],"requestBody":"3fda7a80-4a17-4a8d-9019-4be6e03bc8df","responses":{"200":"1e3e612b-4819-40b1-ad9d-8105a17c694f","400":"e92e5580-26dc-4740-9789-6c355999a397","403":"e43f37db-36ce-45b1-99d5-81d28c8f2f08","422":"2c6874b2-54c2-4762-bc70-deb477b05e50"},"method":"post","type":"path","servers":["a1bfa9d9-a03b-4517-a858-421808f1bc38","b36da9a2-c147-44d5-81da-4bd4f5889fcf"],"path":"/v2/nql/simulate","baseUrlOptions":["https://api-dev.narrative.io","https://api.narrative.io"],"title":"Simulate an NQL query against access rules","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["nql","data_plane_id","context"],"properties":{"nql":{"type":"string","description":"The statement to check: a `SELECT`, including `WITH` and `UNION` selects, or a `MERGE` into one of the\ncaller's datasets. `INSERT`, `UPDATE` and `DELETE` cannot read access rules, so they, `CREATE\nMATERIALIZED VIEW` and `EXPLAIN` return 422.\n\nThe statement runs as the caller's company, in the role of a buyer. It reads a listed access rule as\n`\u003cplaceholder_owner_slug>.\u003caccess_rule_name>`, or through `narrative.rosetta_stone`. It reads the\ncaller's own datasets only through `company_data`: by id, by name, or through\n`company_data.rosetta_stone`. The caller's own slug is not a namespace in a simulation.","isRequired":true,"uniqueKey":"nql","typeLabel":"string"},"data_plane_id":{"type":"string","description":"The data plane the statement is compiled for. Every listed access rule, stored or inline, must be on\nthis data plane, and the statement reads the caller's datasets only from it.","format":"uuid","isRequired":true,"uniqueKey":"data_plane_id","typeLabel":"string\u003cuuid>"},"context":{"type":"object","description":"The access rules the statement runs against. Apart from the caller's own datasets, the statement sees\nonly these access rules.","required":["access_rules"],"properties":{"access_rules":{"type":"array","minItems":1,"maxItems":50,"description":"From 1 to 50 entries. Each entry is either a stored access rule (`access_rule_id`) or an inline\naccess rule (`access_rule`), and each moves to the placeholder company named by its\n`placeholder_owner_slug`.","items":{"oneOf":[{"type":"object","description":"One access rule in a simulation. Set exactly one of `access_rule_id` and `access_rule`, and always set\n`placeholder_owner_slug`. An entry that sets both or neither of the first two is rejected.","required":["placeholder_owner_slug","access_rule_id"],"properties":{"access_rule_id":{"type":"integer","description":"A stored access rule that the caller's company owns or can query. An archived access rule counts as\nnot queryable. Every dataset the access rule reads must be active.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule_id","typeLabel":"integer"},"placeholder_owner_slug":{"type":"string","description":"The slug of the placeholder company that owns the access rule, and the datasets it reads, during this\nsimulation. The statement reads the access rule as `\u003cplaceholder_owner_slug>.\u003caccess_rule_name>`.\n\nThe placeholder company exists only for this request. Any valid company slug works except\n`company_data` and `narrative`, including the slug of a real company, such as the access rule's real\nowner; that company's data is never involved. The slug is compared in lower case, and entries with the\nsame slug share one placeholder company. A dataset can have only one owner, so two access rules that\nread the same dataset need the same `placeholder_owner_slug`.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.placeholder_owner_slug","typeLabel":"string"},"access_rule":{"type":"object","description":"An access rule defined in the request instead of stored. It is checked the way `POST /v2/access-rules`\nchecks a new access rule, and it is not saved. Its `nql` can read only the caller's own active datasets,\nnot views, and must reference them by id, such as `company_data.\"2001\"`: the datasets move to the\nplaceholder company, so a dataset name no longer resolves.","required":["name","nql","query_policy"],"properties":{"name":{"type":"string","description":"It should be unique.\nAlso should not intersect with Dataset names.\nMust be \u003c= 256 characters and consist of only alphanumeric characters and underscores.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.name","typeLabel":"string"},"nql":{"type":"string","description":"NQL query of access rule.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.nql","typeLabel":"string"},"query_policy":{"type":"object","description":"Limits how a querying company may use the attributes and fields this access rule selects. An attribute is a\nRosetta Stone attribute that the access rule selects from `_rosetta_stone`. A field is any other column of the\naccess rule, such as a dataset column it selects directly. A query that breaks the policy reads no rows from the\naccess rule.","additionalProperties":false,"properties":{"default":{"oneOf":[{"type":"object","description":"Rules for every attribute and field that no `usage_rules` entry names. A usage left out is denied.","properties":{"projection":{"oneOf":[{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","enum":["allow","deny","restrict"],"description":"`allow` permits every use. `deny` permits none. `restrict` permits only the functions the rule's lists name, and\nnever the raw value.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.mode","typeLabel":"enum\u003cstring>"},"scalar_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.scalar_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Scalar functions, such as `SHA2` or `UPPER`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.scalar_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"Scalar functions, such as `SHA2` or `UPPER`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.scalar_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.scalar_operators","typeLabel":"string[] | null"},"aggregate_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.aggregate_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Aggregate functions, such as `COUNT`, `SUM`, `COUNT_DISTINCT`, `APPROX_COUNT_DISTINCT`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.aggregate_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"Aggregate functions, such as `COUNT`, `SUM`, `COUNT_DISTINCT`, `APPROX_COUNT_DISTINCT`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.aggregate_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.aggregate_operators","typeLabel":"string[] | null"},"external_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.external_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Functions that send values outside the query: `AI_COMPLETE`, `AI_CONVERSATION`, `AI_EMBED`,\n`CALL_MODEL_FUNCTION`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.external_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"Functions that send values outside the query: `AI_COMPLETE`, `AI_CONVERSATION`, `AI_EMBED`,\n`CALL_MODEL_FUNCTION`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.external_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.external_operators","typeLabel":"string[] | null"}},"additionalProperties":false,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.projection.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.projection.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.projection","typeLabel":"object | null"},"group_by":{"oneOf":[{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","enum":["allow","deny","restrict"],"description":"`allow` permits every use. `deny` permits none. `restrict` permits only the functions the rule's lists name, and\nnever the raw value.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.group_by.oneOf.0.mode","typeLabel":"enum\u003cstring>"},"scalar_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.group_by.oneOf.0.scalar_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.group_by.oneOf.0.scalar_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.group_by.oneOf.0.scalar_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.group_by.oneOf.0.scalar_operators","typeLabel":"string[] | null"}},"additionalProperties":false,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.group_by.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.group_by.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.group_by","typeLabel":"object | null"},"join":{"oneOf":[{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","enum":["allow","deny","restrict"],"description":"`allow` permits every use. `deny` permits none. `restrict` permits only the functions the rule's lists name, and\nnever the raw value.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.join.oneOf.0.mode","typeLabel":"enum\u003cstring>"},"scalar_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.join.oneOf.0.scalar_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.join.oneOf.0.scalar_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.join.oneOf.0.scalar_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.join.oneOf.0.scalar_operators","typeLabel":"string[] | null"}},"additionalProperties":false,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.join.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.join.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0.join","typeLabel":"object | null"}},"additionalProperties":false,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.0","typeLabel":"object"},{"type":"null","description":"Rules for every attribute and field that no `usage_rules` entry names. A usage left out is denied.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.default","typeLabel":"object | null"},"usage_rules":{"oneOf":[{"type":"array","items":{"type":"object","description":"Rules for one attribute or field. Set exactly one of `attribute` and `field`. The access rule must select the\nattribute or field. A field that renames an attribute refers to that attribute. For example, when the access rule\nselects `_rosetta_stone.email as email`, `{\"field\": \"email\"}` and `{\"attribute\": \"email\"}` name the same column,\nso a policy can have a rule for only one of them.","additionalProperties":false,"properties":{"attribute":{"type":"string","description":"Rosetta Stone attribute path, such as `email` or `id.value`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].attribute","typeLabel":"string"},"field":{"type":"string","description":"Access rule column path, such as `hashed_email`. Use a dot for a nested property of a column, such as\n`address.zip`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].field","typeLabel":"string"},"projection":{"type":"object","additionalProperties":false,"required":["mode"],"properties":{"mode":{"type":"string","enum":["allow","deny","restrict"],"description":"`allow` permits every use. `deny` permits none. `restrict` permits only the functions the rule's lists name, and\nnever the raw value.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.mode","typeLabel":"enum\u003cstring>"},"scalar_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.scalar_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Scalar functions, such as `SHA2` or `UPPER`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.scalar_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"Scalar functions, such as `SHA2` or `UPPER`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.scalar_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.scalar_operators","typeLabel":"string[] | null"},"aggregate_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.aggregate_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Aggregate functions, such as `COUNT`, `SUM`, `COUNT_DISTINCT`, `APPROX_COUNT_DISTINCT`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.aggregate_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"Aggregate functions, such as `COUNT`, `SUM`, `COUNT_DISTINCT`, `APPROX_COUNT_DISTINCT`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.aggregate_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.aggregate_operators","typeLabel":"string[] | null"},"external_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.external_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Functions that send values outside the query: `AI_COMPLETE`, `AI_CONVERSATION`, `AI_EMBED`,\n`CALL_MODEL_FUNCTION`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.external_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"Functions that send values outside the query: `AI_COMPLETE`, `AI_CONVERSATION`, `AI_EMBED`,\n`CALL_MODEL_FUNCTION`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.external_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.external_operators","typeLabel":"string[] | null"}},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection","typeLabel":"object"},"group_by":{"type":"object","additionalProperties":false,"required":["mode"],"properties":{"mode":{"type":"string","enum":["allow","deny","restrict"],"description":"`allow` permits every use. `deny` permits none. `restrict` permits only the functions the rule's lists name, and\nnever the raw value.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].group_by.mode","typeLabel":"enum\u003cstring>"},"scalar_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].group_by.scalar_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].group_by.scalar_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].group_by.scalar_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].group_by.scalar_operators","typeLabel":"string[] | null"}},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].group_by","typeLabel":"object"},"join":{"type":"object","additionalProperties":false,"required":["mode"],"properties":{"mode":{"type":"string","enum":["allow","deny","restrict"],"description":"`allow` permits every use. `deny` permits none. `restrict` permits only the functions the rule's lists name, and\nnever the raw value.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].join.mode","typeLabel":"enum\u003cstring>"},"scalar_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].join.scalar_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].join.scalar_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].join.scalar_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].join.scalar_operators","typeLabel":"string[] | null"}},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].join","typeLabel":"object"}},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.0","typeLabel":"object[]"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.usage_rules","typeLabel":"object[] | null"},"join_required_rule":{"oneOf":[{"type":"object","description":"Requires every query to inner join this access rule to a dataset the querying company owns, matching on the keys\nof one `match` entry.","required":["match"],"properties":{"match":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["keys"],"properties":{"keys":{"type":"array","minItems":1,"items":{"type":"object","description":"One key of a match. Set exactly one of `attribute` and `field`. The access rule must select the attribute or\nfield. As in `UsageRule`, a field that renames an attribute refers to that attribute.","additionalProperties":false,"required":["form"],"properties":{"form":{"oneOf":[{"type":"string","enum":["raw"],"isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX].keys.items.[INDEX].form.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","required":["operator"],"properties":{"operator":{"type":"string","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX].keys.items.[INDEX].form.oneOf.1.operator","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX].keys.items.[INDEX].form.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX].keys.items.[INDEX].form","typeLabel":"enum\u003cstring> | object"},"attribute":{"type":"string","description":"Rosetta Stone attribute path, such as `email` or `id.value`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX].keys.items.[INDEX].attribute","typeLabel":"string"},"field":{"type":"string","description":"Access rule column path, such as `hashed_email`. Use a dot for a nested property of a column, such as\n`address.zip`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX].keys.items.[INDEX].field","typeLabel":"string"}},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX].keys.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX].keys","typeLabel":"object[]"}},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.join_required_rule.oneOf.0.match","typeLabel":"object[]"}},"additionalProperties":false,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.join_required_rule.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.join_required_rule.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy.join_required_rule","typeLabel":"object | null"}},"isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule.query_policy","typeLabel":"object"}},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0.access_rule","typeLabel":"object"}},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"One access rule in a simulation. Set exactly one of `access_rule_id` and `access_rule`, and always set\n`placeholder_owner_slug`. An entry that sets both or neither of the first two is rejected.","required":["placeholder_owner_slug","access_rule"],"properties":{"access_rule":{"type":"object","description":"An access rule defined in the request instead of stored. It is checked the way `POST /v2/access-rules`\nchecks a new access rule, and it is not saved. Its `nql` can read only the caller's own active datasets,\nnot views, and must reference them by id, such as `company_data.\"2001\"`: the datasets move to the\nplaceholder company, so a dataset name no longer resolves.","required":["name","nql","query_policy"],"properties":{"name":{"type":"string","description":"It should be unique.\nAlso should not intersect with Dataset names.\nMust be \u003c= 256 characters and consist of only alphanumeric characters and underscores.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.name","typeLabel":"string"},"nql":{"type":"string","description":"NQL query of access rule.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.nql","typeLabel":"string"},"query_policy":{"type":"object","description":"Limits how a querying company may use the attributes and fields this access rule selects. An attribute is a\nRosetta Stone attribute that the access rule selects from `_rosetta_stone`. A field is any other column of the\naccess rule, such as a dataset column it selects directly. A query that breaks the policy reads no rows from the\naccess rule.","additionalProperties":false,"properties":{"default":{"oneOf":[{"type":"object","description":"Rules for every attribute and field that no `usage_rules` entry names. A usage left out is denied.","properties":{"projection":{"oneOf":[{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","enum":["allow","deny","restrict"],"description":"`allow` permits every use. `deny` permits none. `restrict` permits only the functions the rule's lists name, and\nnever the raw value.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.mode","typeLabel":"enum\u003cstring>"},"scalar_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.scalar_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Scalar functions, such as `SHA2` or `UPPER`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.scalar_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"Scalar functions, such as `SHA2` or `UPPER`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.scalar_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.scalar_operators","typeLabel":"string[] | null"},"aggregate_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.aggregate_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Aggregate functions, such as `COUNT`, `SUM`, `COUNT_DISTINCT`, `APPROX_COUNT_DISTINCT`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.aggregate_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"Aggregate functions, such as `COUNT`, `SUM`, `COUNT_DISTINCT`, `APPROX_COUNT_DISTINCT`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.aggregate_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.aggregate_operators","typeLabel":"string[] | null"},"external_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.external_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Functions that send values outside the query: `AI_COMPLETE`, `AI_CONVERSATION`, `AI_EMBED`,\n`CALL_MODEL_FUNCTION`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.external_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"Functions that send values outside the query: `AI_COMPLETE`, `AI_CONVERSATION`, `AI_EMBED`,\n`CALL_MODEL_FUNCTION`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.external_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.projection.oneOf.0.external_operators","typeLabel":"string[] | null"}},"additionalProperties":false,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.projection.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.projection.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.projection","typeLabel":"object | null"},"group_by":{"oneOf":[{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","enum":["allow","deny","restrict"],"description":"`allow` permits every use. `deny` permits none. `restrict` permits only the functions the rule's lists name, and\nnever the raw value.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.group_by.oneOf.0.mode","typeLabel":"enum\u003cstring>"},"scalar_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.group_by.oneOf.0.scalar_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.group_by.oneOf.0.scalar_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.group_by.oneOf.0.scalar_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.group_by.oneOf.0.scalar_operators","typeLabel":"string[] | null"}},"additionalProperties":false,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.group_by.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.group_by.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.group_by","typeLabel":"object | null"},"join":{"oneOf":[{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","enum":["allow","deny","restrict"],"description":"`allow` permits every use. `deny` permits none. `restrict` permits only the functions the rule's lists name, and\nnever the raw value.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.join.oneOf.0.mode","typeLabel":"enum\u003cstring>"},"scalar_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.join.oneOf.0.scalar_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.join.oneOf.0.scalar_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.join.oneOf.0.scalar_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.join.oneOf.0.scalar_operators","typeLabel":"string[] | null"}},"additionalProperties":false,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.join.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.join.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0.join","typeLabel":"object | null"}},"additionalProperties":false,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.0","typeLabel":"object"},{"type":"null","description":"Rules for every attribute and field that no `usage_rules` entry names. A usage left out is denied.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.default","typeLabel":"object | null"},"usage_rules":{"oneOf":[{"type":"array","items":{"type":"object","description":"Rules for one attribute or field. Set exactly one of `attribute` and `field`. The access rule must select the\nattribute or field. A field that renames an attribute refers to that attribute. For example, when the access rule\nselects `_rosetta_stone.email as email`, `{\"field\": \"email\"}` and `{\"attribute\": \"email\"}` name the same column,\nso a policy can have a rule for only one of them.","additionalProperties":false,"properties":{"attribute":{"type":"string","description":"Rosetta Stone attribute path, such as `email` or `id.value`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].attribute","typeLabel":"string"},"field":{"type":"string","description":"Access rule column path, such as `hashed_email`. Use a dot for a nested property of a column, such as\n`address.zip`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].field","typeLabel":"string"},"projection":{"type":"object","additionalProperties":false,"required":["mode"],"properties":{"mode":{"type":"string","enum":["allow","deny","restrict"],"description":"`allow` permits every use. `deny` permits none. `restrict` permits only the functions the rule's lists name, and\nnever the raw value.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.mode","typeLabel":"enum\u003cstring>"},"scalar_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.scalar_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Scalar functions, such as `SHA2` or `UPPER`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.scalar_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"Scalar functions, such as `SHA2` or `UPPER`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.scalar_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.scalar_operators","typeLabel":"string[] | null"},"aggregate_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.aggregate_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Aggregate functions, such as `COUNT`, `SUM`, `COUNT_DISTINCT`, `APPROX_COUNT_DISTINCT`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.aggregate_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"Aggregate functions, such as `COUNT`, `SUM`, `COUNT_DISTINCT`, `APPROX_COUNT_DISTINCT`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.aggregate_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.aggregate_operators","typeLabel":"string[] | null"},"external_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.external_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Functions that send values outside the query: `AI_COMPLETE`, `AI_CONVERSATION`, `AI_EMBED`,\n`CALL_MODEL_FUNCTION`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.external_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"Functions that send values outside the query: `AI_COMPLETE`, `AI_CONVERSATION`, `AI_EMBED`,\n`CALL_MODEL_FUNCTION`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.external_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection.external_operators","typeLabel":"string[] | null"}},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].projection","typeLabel":"object"},"group_by":{"type":"object","additionalProperties":false,"required":["mode"],"properties":{"mode":{"type":"string","enum":["allow","deny","restrict"],"description":"`allow` permits every use. `deny` permits none. `restrict` permits only the functions the rule's lists name, and\nnever the raw value.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].group_by.mode","typeLabel":"enum\u003cstring>"},"scalar_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].group_by.scalar_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].group_by.scalar_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].group_by.scalar_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].group_by.scalar_operators","typeLabel":"string[] | null"}},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].group_by","typeLabel":"object"},"join":{"type":"object","additionalProperties":false,"required":["mode"],"properties":{"mode":{"type":"string","enum":["allow","deny","restrict"],"description":"`allow` permits every use. `deny` permits none. `restrict` permits only the functions the rule's lists name, and\nnever the raw value.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].join.mode","typeLabel":"enum\u003cstring>"},"scalar_operators":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].join.scalar_operators.oneOf.0.items.[INDEX]","typeLabel":"string"},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].join.scalar_operators.oneOf.0","typeLabel":"string[]"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].join.scalar_operators.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].join.scalar_operators","typeLabel":"string[] | null"}},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX].join","typeLabel":"object"}},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.0","typeLabel":"object[]"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.usage_rules","typeLabel":"object[] | null"},"join_required_rule":{"oneOf":[{"type":"object","description":"Requires every query to inner join this access rule to a dataset the querying company owns, matching on the keys\nof one `match` entry.","required":["match"],"properties":{"match":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["keys"],"properties":{"keys":{"type":"array","minItems":1,"items":{"type":"object","description":"One key of a match. Set exactly one of `attribute` and `field`. The access rule must select the attribute or\nfield. As in `UsageRule`, a field that renames an attribute refers to that attribute.","additionalProperties":false,"required":["form"],"properties":{"form":{"oneOf":[{"type":"string","enum":["raw"],"isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX].keys.items.[INDEX].form.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","required":["operator"],"properties":{"operator":{"type":"string","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX].keys.items.[INDEX].form.oneOf.1.operator","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX].keys.items.[INDEX].form.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX].keys.items.[INDEX].form","typeLabel":"enum\u003cstring> | object"},"attribute":{"type":"string","description":"Rosetta Stone attribute path, such as `email` or `id.value`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX].keys.items.[INDEX].attribute","typeLabel":"string"},"field":{"type":"string","description":"Access rule column path, such as `hashed_email`. Use a dot for a nested property of a column, such as\n`address.zip`.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX].keys.items.[INDEX].field","typeLabel":"string"}},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX].keys.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX].keys","typeLabel":"object[]"}},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.join_required_rule.oneOf.0.match.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.join_required_rule.oneOf.0.match","typeLabel":"object[]"}},"additionalProperties":false,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.join_required_rule.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.join_required_rule.oneOf.1","typeLabel":"null"}],"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy.join_required_rule","typeLabel":"object | null"}},"isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule.query_policy","typeLabel":"object"}},"isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule","typeLabel":"object"},"placeholder_owner_slug":{"type":"string","description":"The slug of the placeholder company that owns the access rule, and the datasets it reads, during this\nsimulation. The statement reads the access rule as `\u003cplaceholder_owner_slug>.\u003caccess_rule_name>`.\n\nThe placeholder company exists only for this request. Any valid company slug works except\n`company_data` and `narrative`, including the slug of a real company, such as the access rule's real\nowner; that company's data is never involved. The slug is compared in lower case, and entries with the\nsame slug share one placeholder company. A dataset can have only one owner, so two access rules that\nread the same dataset need the same `placeholder_owner_slug`.","isRequired":true,"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.placeholder_owner_slug","typeLabel":"string"},"access_rule_id":{"type":"integer","description":"A stored access rule that the caller's company owns or can query. An archived access rule counts as\nnot queryable. Every dataset the access rule reads must be active.","uniqueKey":"context.access_rules.items.[INDEX].oneOf.1.access_rule_id","typeLabel":"integer"}},"uniqueKey":"context.access_rules.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"context.access_rules.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"context.access_rules","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"context","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"simulate":{"title":"simulate","value":{"nql":"SELECT r.\"email\" FROM acme.\"draft_rule\" r JOIN company_data.\"2001\" c ON r.\"email\" = c.\"email\"","data_plane_id":"f79cbdae-4848-47ca-95e8-69588364d185","context":{"access_rules":[{"access_rule_id":4211,"placeholder_owner_slug":"seller"},{"access_rule_id":4212,"placeholder_owner_slug":"acme"},{"access_rule":{"name":"draft_rule","nql":"SELECT t.\"email\" FROM company_data.\"11370\" t","query_policy":{"default":{"projection":{"mode":"allow"}}}},"placeholder_owner_slug":"acme"}]}}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"1e3e612b-4819-40b1-ad9d-8105a17c694f":{"description":"The statement compiled. `denied_access_rules` can be empty, which means no listed access rule denied the\nstatement. A listed access rule that is not in `denied_access_rules` was not denied by its policy: it allowed\nthe query or no table in the query reached it.","content":{"application/json":{"schema":{"type":"object","description":"The access rules whose query policy denied the statement. A listed access rule that is not in\n`denied_access_rules` was not denied: its policy allowed the statement, or the statement did not read it.","required":["denied_access_rules"],"properties":{"denied_access_rules":{"type":"array","description":"One entry per access rule and query table it was denied on, in the order of `context.access_rules`.\nWhen the statement reads the same table more than once, such as in a self-join, each read that is\ndenied has its own entry.","items":{"oneOf":[{"type":"object","description":"An access rule denied on one query table. Set `access_rule_id` for a stored access rule and\n`access_rule_name` for an inline one.","required":["index","query_table","violations","access_rule_id"],"properties":{"index":{"type":"integer","minimum":0,"description":"The position of the access rule in `context.access_rules`, starting at 0.","isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.index","typeLabel":"integer"},"access_rule_id":{"type":"integer","description":"Present for a stored access rule.","isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.access_rule_id","typeLabel":"integer"},"query_table":{"type":"string","description":"The table of the statement the access rule was reached through, such as\n`\u003cplaceholder_owner_slug>.\u003caccess_rule_name>`, `narrative.rosetta_stone` or\n`\u003cplaceholder_owner_slug>.rosetta_stone`.","example":"acme.draft_rule","isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.query_table","typeLabel":"string"},"violations":{"type":"array","description":"The reasons the access rule was denied on this table, in no particular order.","items":{"type":"object","required":["type","reason"],"properties":{"type":{"type":"string","enum":["field_usage","join_required","invalid_query_policy"],"description":"- `field_usage`: the statement uses a field or attribute in a way the query policy does not allow.\n `field` names it.\n- `join_required`: the statement does not join as the query policy requires. `required_join_keys`\n lists the keys that would satisfy it.\n- `invalid_query_policy`: the access rule's query policy does not compile, so it denies every\n statement. It is then the only violation of the access rule on that table.","isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.violations.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"reason":{"type":"string","description":"A description of the violation. The text can change; do not parse it.","isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.violations.items.[INDEX].reason","typeLabel":"string"},"field":{"type":"string","description":"Present on `field_usage`. The attribute path for a field read through `rosetta_stone`, the column\npath of the access rule for a field read through an access rule table.","uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.violations.items.[INDEX].field","typeLabel":"string"},"usage":{"type":"string","enum":["projection","group_by","join","operator","derived_attribute"],"description":"Present on `field_usage`. How the statement used the field in a way the policy does not allow:\nselecting it, grouping by it, joining on it, applying an operator the policy does not list, or reading\nit through a derived attribute.","uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.violations.items.[INDEX].usage","typeLabel":"enum\u003cstring>"},"operator":{"type":"string","description":"Present on `field_usage` when an operator is not listed for the field, such as `sha256`.","example":"sha256","uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.violations.items.[INDEX].operator","typeLabel":"string"},"required_join_keys":{"type":"array","description":"Present on `join_required`. Join on all keys of any one group to satisfy the policy. Each key has the\nsame shape as in the query policy's `join_required_rule`.","items":{"type":"array","items":{"type":"object","description":"One key of a match. Set exactly one of `attribute` and `field`. The access rule must select the attribute or\nfield. As in `UsageRule`, a field that renames an attribute refers to that attribute.","additionalProperties":false,"required":["form"],"properties":{"form":{"oneOf":[{"type":"string","enum":["raw"],"isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.violations.items.[INDEX].required_join_keys.items.[INDEX].items.[INDEX].form.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","required":["operator"],"properties":{"operator":{"type":"string","isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.violations.items.[INDEX].required_join_keys.items.[INDEX].items.[INDEX].form.oneOf.1.operator","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.violations.items.[INDEX].required_join_keys.items.[INDEX].items.[INDEX].form.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.violations.items.[INDEX].required_join_keys.items.[INDEX].items.[INDEX].form","typeLabel":"enum\u003cstring> | object"},"attribute":{"type":"string","description":"Rosetta Stone attribute path, such as `email` or `id.value`.","uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.violations.items.[INDEX].required_join_keys.items.[INDEX].items.[INDEX].attribute","typeLabel":"string"},"field":{"type":"string","description":"Access rule column path, such as `hashed_email`. Use a dot for a nested property of a column, such as\n`address.zip`.","uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.violations.items.[INDEX].required_join_keys.items.[INDEX].items.[INDEX].field","typeLabel":"string"}},"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.violations.items.[INDEX].required_join_keys.items.[INDEX].items.[INDEX]","typeLabel":"object"},"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.violations.items.[INDEX].required_join_keys.items.[INDEX]","typeLabel":"object[]"},"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.violations.items.[INDEX].required_join_keys","typeLabel":"object[][]"}},"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.violations.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.violations","typeLabel":"object[]"},"access_rule_name":{"type":"string","description":"Present for an inline access rule.","uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0.access_rule_name","typeLabel":"string"}},"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"An access rule denied on one query table. Set `access_rule_id` for a stored access rule and\n`access_rule_name` for an inline one.","required":["index","query_table","violations","access_rule_name"],"properties":{"index":{"type":"integer","minimum":0,"description":"The position of the access rule in `context.access_rules`, starting at 0.","isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.index","typeLabel":"integer"},"access_rule_name":{"type":"string","description":"Present for an inline access rule.","isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.access_rule_name","typeLabel":"string"},"query_table":{"type":"string","description":"The table of the statement the access rule was reached through, such as\n`\u003cplaceholder_owner_slug>.\u003caccess_rule_name>`, `narrative.rosetta_stone` or\n`\u003cplaceholder_owner_slug>.rosetta_stone`.","example":"acme.draft_rule","isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.query_table","typeLabel":"string"},"violations":{"type":"array","description":"The reasons the access rule was denied on this table, in no particular order.","items":{"type":"object","required":["type","reason"],"properties":{"type":{"type":"string","enum":["field_usage","join_required","invalid_query_policy"],"description":"- `field_usage`: the statement uses a field or attribute in a way the query policy does not allow.\n `field` names it.\n- `join_required`: the statement does not join as the query policy requires. `required_join_keys`\n lists the keys that would satisfy it.\n- `invalid_query_policy`: the access rule's query policy does not compile, so it denies every\n statement. It is then the only violation of the access rule on that table.","isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.violations.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"reason":{"type":"string","description":"A description of the violation. The text can change; do not parse it.","isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.violations.items.[INDEX].reason","typeLabel":"string"},"field":{"type":"string","description":"Present on `field_usage`. The attribute path for a field read through `rosetta_stone`, the column\npath of the access rule for a field read through an access rule table.","uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.violations.items.[INDEX].field","typeLabel":"string"},"usage":{"type":"string","enum":["projection","group_by","join","operator","derived_attribute"],"description":"Present on `field_usage`. How the statement used the field in a way the policy does not allow:\nselecting it, grouping by it, joining on it, applying an operator the policy does not list, or reading\nit through a derived attribute.","uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.violations.items.[INDEX].usage","typeLabel":"enum\u003cstring>"},"operator":{"type":"string","description":"Present on `field_usage` when an operator is not listed for the field, such as `sha256`.","example":"sha256","uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.violations.items.[INDEX].operator","typeLabel":"string"},"required_join_keys":{"type":"array","description":"Present on `join_required`. Join on all keys of any one group to satisfy the policy. Each key has the\nsame shape as in the query policy's `join_required_rule`.","items":{"type":"array","items":{"type":"object","description":"One key of a match. Set exactly one of `attribute` and `field`. The access rule must select the attribute or\nfield. As in `UsageRule`, a field that renames an attribute refers to that attribute.","additionalProperties":false,"required":["form"],"properties":{"form":{"oneOf":[{"type":"string","enum":["raw"],"isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.violations.items.[INDEX].required_join_keys.items.[INDEX].items.[INDEX].form.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","required":["operator"],"properties":{"operator":{"type":"string","isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.violations.items.[INDEX].required_join_keys.items.[INDEX].items.[INDEX].form.oneOf.1.operator","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.violations.items.[INDEX].required_join_keys.items.[INDEX].items.[INDEX].form.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.violations.items.[INDEX].required_join_keys.items.[INDEX].items.[INDEX].form","typeLabel":"enum\u003cstring> | object"},"attribute":{"type":"string","description":"Rosetta Stone attribute path, such as `email` or `id.value`.","uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.violations.items.[INDEX].required_join_keys.items.[INDEX].items.[INDEX].attribute","typeLabel":"string"},"field":{"type":"string","description":"Access rule column path, such as `hashed_email`. Use a dot for a nested property of a column, such as\n`address.zip`.","uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.violations.items.[INDEX].required_join_keys.items.[INDEX].items.[INDEX].field","typeLabel":"string"}},"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.violations.items.[INDEX].required_join_keys.items.[INDEX].items.[INDEX]","typeLabel":"object"},"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.violations.items.[INDEX].required_join_keys.items.[INDEX]","typeLabel":"object[]"},"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.violations.items.[INDEX].required_join_keys","typeLabel":"object[][]"}},"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.violations.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.violations","typeLabel":"object[]"},"access_rule_id":{"type":"integer","description":"Present for a stored access rule.","uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1.access_rule_id","typeLabel":"integer"}},"uniqueKey":"denied_access_rules.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"denied_access_rules.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"denied_access_rules","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"simulate":{"title":"simulate","value":{"denied_access_rules":[{"index":0,"access_rule_id":4211,"query_table":"narrative.rosetta_stone","violations":[{"type":"join_required","required_join_keys":[[{"attribute":"email","form":"raw"}]],"reason":"The query must join this access rule with your company's data on one of the keys its policy requires."}]},{"index":2,"access_rule_name":"draft_rule","query_table":"acme.draft_rule","violations":[{"type":"field_usage","field":"email","usage":"projection","reason":"Field email cannot be selected."},{"type":"field_usage","field":"phone","usage":"projection","operator":"sha256","reason":"Field phone can be selected only through a listed operator, and sha256 is not listed."}]}]}}},"exampleType":"examples"}},"exampleType":"examples"},"e92e5580-26dc-4740-9789-6c355999a397":{"description":"The request cannot be simulated as sent. The cases are:\n\n- The body did not decode, including a `context.access_rules` entry that sets both or neither of\n `access_rule_id` and `access_rule`. This returns the `error` / `error_description` shape with\n `error` set to `bad_payload`.\n- An `access_rule_id` does not exist, is archived, or belongs to another company that does not let the\n caller query it. This returns an RFC 7807 problem titled `Access Rules Not Queryable` that lists every\n such id.\n- `data_plane_id` does not exist or the company cannot use it. This returns an RFC 7807 problem titled\n `Data Plane not found`.\n- The statement did not parse, references a table or column the company cannot see, or is\n semantically invalid, for example an unsupported output column type. This returns an RFC 7807\n problem with the title and status `POST /nql/validate` returns for the same problem: 400 for a\n statement that does not parse or reads something the company cannot see, 422 for a semantic error.\n- An inline access rule's `nql` fails the checks of `POST /v2/access-rules`, including reading from a\n view dataset. This returns the error `POST /v2/access-rules` returns.\n\nvisit https://docs.narrative.io/guides/nql/troubleshooting for more details","content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"An RFC 7807 problem. `title` names the kind of error and `detail` explains this occurrence;\nhttps://docs.narrative.io/guides/nql/troubleshooting walks through the NQL titles.","required":["title","status","detail","instance","log_id"],"example":{"type":null,"title":"Failed to Parse Query","status":400,"detail":"Invalid query format.","instance":"/nql/validate","log_id":"c06fea02-0950-45c6-aaff-07ab07c0d04c","debug":null},"properties":{"title":{"type":"string","description":"a summary of the error","isRequired":true,"uniqueKey":"oneOf.0.title","typeLabel":"string"},"status":{"type":"integer","description":"http status code","isRequired":true,"uniqueKey":"oneOf.0.status","typeLabel":"integer"},"detail":{"type":"string","description":"a longer description of the error","isRequired":true,"uniqueKey":"oneOf.0.detail","typeLabel":"string"},"instance":{"type":"string","description":"path of the query","isRequired":true,"uniqueKey":"oneOf.0.instance","typeLabel":"string"},"log_id":{"type":"string","format":"uuid","description":"an internal logging id, Narrative can use to help debug a problem.","isRequired":true,"uniqueKey":"oneOf.0.log_id","typeLabel":"string\u003cuuid>"},"type":{"oneOf":[{"description":"A URL naming the class of error.","type":"string","format":"uri","uniqueKey":"oneOf.0.type.oneOf.0","typeLabel":"string\u003curi>"},{"description":"A URL naming the class of error.","type":"null","format":"uri","uniqueKey":"oneOf.0.type.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.type","typeLabel":"string\u003curi> | null"},"debug":{"oneOf":[{"description":"Extra detail shaped by the error, for example the column and type name of an unsupported-type\nerror. Null when the error has nothing to add. Most errors only include it for admin tokens.","type":"object","additionalProperties":true,"uniqueKey":"oneOf.0.debug.oneOf.0","typeLabel":"object"},{"description":"Extra detail shaped by the error, for example the column and type name of an unsupported-type\nerror. Null when the error has nothing to add. Most errors only include it for admin tokens.","type":"null","additionalProperties":true,"uniqueKey":"oneOf.0.debug.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.debug","typeLabel":"object | null"},"app":{"oneOf":[{"description":"The connector app that raised the error, on errors a connector returned. Otherwise null or absent.","type":"string","uniqueKey":"oneOf.0.app.oneOf.0","typeLabel":"string"},{"description":"The connector app that raised the error, on errors a connector returned. Otherwise null or absent.","type":"null","uniqueKey":"oneOf.0.app.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.0.app","typeLabel":"string | null"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["error","error_description"],"properties":{"error":{"type":"string","example":"Unauthorized","isRequired":true,"uniqueKey":"oneOf.1.error","typeLabel":"string"},"error_description":{"type":"string","example":"You are not authorized to use this endpoint.","isRequired":true,"uniqueKey":"oneOf.1.error_description","typeLabel":"string"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"access_rules_not_queryable":{"title":"access_rules_not_queryable","value":{"type":null,"title":"Access Rules Not Queryable","status":400,"detail":"Access rules 4211 and 4213 can't be used in a simulation because your company can't query them. List only access rules your company owns or can query.","instance":"/v2/nql/simulate","log_id":"5f1c9b2e-7a44-4d18-9c3f-2b6e0a15d7c4","debug":null}},"data_plane_not_found":{"title":"data_plane_not_found","value":{"type":null,"title":"Data Plane not found","status":400,"detail":"f79cbdae-4848-47ca-95e8-69588364d185 data plane not found","instance":"/v2/nql/simulate","log_id":"5f1c9b2e-7a44-4d18-9c3f-2b6e0a15d7c4","debug":null}}},"exampleType":"examples"}},"exampleType":"examples"},"e43f37db-36ce-45b1-99d5-81d28c8f2f08":{"description":"The request is not allowed with the token sent, or no valid token was sent.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["error","error_description"],"properties":{"error":{"type":"string","example":"Unauthorized","isRequired":true,"uniqueKey":"oneOf.0.error","typeLabel":"string"},"error_description":{"type":"string","example":"You are not authorized to use this endpoint.","isRequired":true,"uniqueKey":"oneOf.0.error_description","typeLabel":"string"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"An RFC 7807 problem. `title` names the kind of error and `detail` explains this occurrence;\nhttps://docs.narrative.io/guides/nql/troubleshooting walks through the NQL titles.","required":["title","status","detail","instance","log_id"],"example":{"type":null,"title":"Failed to Parse Query","status":400,"detail":"Invalid query format.","instance":"/nql/validate","log_id":"c06fea02-0950-45c6-aaff-07ab07c0d04c","debug":null},"properties":{"title":{"type":"string","description":"a summary of the error","isRequired":true,"uniqueKey":"oneOf.1.title","typeLabel":"string"},"status":{"type":"integer","description":"http status code","isRequired":true,"uniqueKey":"oneOf.1.status","typeLabel":"integer"},"detail":{"type":"string","description":"a longer description of the error","isRequired":true,"uniqueKey":"oneOf.1.detail","typeLabel":"string"},"instance":{"type":"string","description":"path of the query","isRequired":true,"uniqueKey":"oneOf.1.instance","typeLabel":"string"},"log_id":{"type":"string","format":"uuid","description":"an internal logging id, Narrative can use to help debug a problem.","isRequired":true,"uniqueKey":"oneOf.1.log_id","typeLabel":"string\u003cuuid>"},"type":{"oneOf":[{"description":"A URL naming the class of error.","type":"string","format":"uri","uniqueKey":"oneOf.1.type.oneOf.0","typeLabel":"string\u003curi>"},{"description":"A URL naming the class of error.","type":"null","format":"uri","uniqueKey":"oneOf.1.type.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.type","typeLabel":"string\u003curi> | null"},"debug":{"oneOf":[{"description":"Extra detail shaped by the error, for example the column and type name of an unsupported-type\nerror. Null when the error has nothing to add. Most errors only include it for admin tokens.","type":"object","additionalProperties":true,"uniqueKey":"oneOf.1.debug.oneOf.0","typeLabel":"object"},{"description":"Extra detail shaped by the error, for example the column and type name of an unsupported-type\nerror. Null when the error has nothing to add. Most errors only include it for admin tokens.","type":"null","additionalProperties":true,"uniqueKey":"oneOf.1.debug.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.debug","typeLabel":"object | null"},"app":{"oneOf":[{"description":"The connector app that raised the error, on errors a connector returned. Otherwise null or absent.","type":"string","uniqueKey":"oneOf.1.app.oneOf.0","typeLabel":"string"},{"description":"The connector app that raised the error, on errors a connector returned. Otherwise null or absent.","type":"null","uniqueKey":"oneOf.1.app.oneOf.1","typeLabel":"null"}],"uniqueKey":"oneOf.1.app","typeLabel":"string | null"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Unauthorized","error_description":"You are not authorized to use this endpoint."}}},"exampleType":"generated"}},"exampleType":"generated"},"2c6874b2-54c2-4762-bc70-deb477b05e50":{"description":"The request decoded but cannot be simulated, or the statement is semantically invalid. For the cases\nbelow the problem's `title` is `Invalid Simulation` and `detail` names the cause. A semantic error in\nthe statement itself returns the problem described under 400, with its own title.\nThe cases are:\n\n- `context.access_rules` holds no entries or more than 50.\n- An entry has no `placeholder_owner_slug`.\n- A `placeholder_owner_slug` is not a valid company slug (`a-z`, `A-Z`, `0-9` and `_`, at most 256 characters).\n- A `placeholder_owner_slug` is `company_data` or `narrative`.\n- Two access rules over the same dataset have different owners.\n- An `access_rule_id` is listed twice, or two entries share a `placeholder_owner_slug` and an access rule name.\n- A stored access rule's `nql` no longer parses.\n- An access rule the caller's company owns, stored or inline, names a dataset in its `nql` instead of\n using the dataset id.\n- A listed access rule, stored or inline, is on another data plane than the request.\n- A listed access rule, stored or inline, reads a dataset that is not active.\n- An inline `query_policy` is not valid for its access rule.\n- The statement is an `INSERT`, `UPDATE`, `DELETE`, `CREATE MATERIALIZED VIEW` or `EXPLAIN`.\n\nvisit https://docs.narrative.io/guides/nql/troubleshooting for more details","content":{"application/json":{"schema":{"type":"object","description":"An RFC 7807 problem. `title` names the kind of error and `detail` explains this occurrence;\nhttps://docs.narrative.io/guides/nql/troubleshooting walks through the NQL titles.","required":["title","status","detail","instance","log_id"],"properties":{"title":{"type":"string","description":"a summary of the error","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","description":"http status code","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","description":"a longer description of the error","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","description":"path of the query","isRequired":true,"uniqueKey":"instance","typeLabel":"string"},"log_id":{"type":"string","format":"uuid","description":"an internal logging id, Narrative can use to help debug a problem.","isRequired":true,"uniqueKey":"log_id","typeLabel":"string\u003cuuid>"},"type":{"oneOf":[{"description":"A URL naming the class of error.","type":"string","format":"uri","uniqueKey":"type.oneOf.0","typeLabel":"string\u003curi>"},{"description":"A URL naming the class of error.","type":"null","format":"uri","uniqueKey":"type.oneOf.1","typeLabel":"null"}],"uniqueKey":"type","typeLabel":"string\u003curi> | null"},"debug":{"oneOf":[{"description":"Extra detail shaped by the error, for example the column and type name of an unsupported-type\nerror. Null when the error has nothing to add. Most errors only include it for admin tokens.","type":"object","additionalProperties":true,"uniqueKey":"debug.oneOf.0","typeLabel":"object"},{"description":"Extra detail shaped by the error, for example the column and type name of an unsupported-type\nerror. Null when the error has nothing to add. Most errors only include it for admin tokens.","type":"null","additionalProperties":true,"uniqueKey":"debug.oneOf.1","typeLabel":"null"}],"uniqueKey":"debug","typeLabel":"object | null"},"app":{"oneOf":[{"description":"The connector app that raised the error, on errors a connector returned. Otherwise null or absent.","type":"string","uniqueKey":"app.oneOf.0","typeLabel":"string"},{"description":"The connector app that raised the error, on errors a connector returned. Otherwise null or absent.","type":"null","uniqueKey":"app.oneOf.1","typeLabel":"null"}],"uniqueKey":"app","typeLabel":"string | null"}},"example":{"type":null,"title":"Failed to Parse Query","status":400,"detail":"Invalid query format.","instance":"/nql/validate","log_id":"c06fea02-0950-45c6-aaff-07ab07c0d04c","debug":null},"uniqueKey":"","typeLabel":"object"},"examples":{"missing_placeholder_owner_slug":{"title":"missing_placeholder_owner_slug","value":{"type":null,"title":"Invalid Simulation","status":422,"detail":"context.access_rules[1] needs a placeholder_owner_slug: every access rule is simulated under a placeholder owner company.","instance":"/v2/nql/simulate","log_id":"c904b703-d41e-4372-9276-9f4bdc8ad031","debug":null}},"other_data_plane":{"title":"other_data_plane","value":{"type":null,"title":"Invalid Simulation","status":422,"detail":"Access rule 4212 is on another data plane than the request.","instance":"/v2/nql/simulate","log_id":"8d2f6a10-3b57-4e0c-a1f4-6c9e7d2b5a38","debug":null}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"674c7c02-6f85-423c-9ec2-6b169f7cd310":{"BearerAuth":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"a1bfa9d9-a03b-4517-a858-421808f1bc38":{"url":"https://api-dev.narrative.io"},"b36da9a2-c147-44d5-81da-4bd4f5889fcf":{"url":"https://api.narrative.io"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"https://docs-cdn.narrative.io/api-reference/main/openapi.json"},"subdomain":"narrative-07c7a1f7","siteName":"Narrative I/O Knowledge Base","title":"Simulate an NQL query against access rules - Narrative I/O Knowledge Base","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-06T07:57:11.691Z","originalFileLocation":"api-reference/nql/simulate-an-nql-query-against-access-rules.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Check which of a chosen set of access rules would deny a SELECT or MERGE statement, without running it. Nothing is stored and no data is read: no job is created and no credits are charged. The statement runs as the caller\u0026#x27;s company, in the role of a buyer, against the listed access rules only. An entry is a stored access rule that the caller\u0026#x27;s company owns or can query, or an inline access rule defined in the request. Each access rule moves, with the datasets it reads, to a placeholder company named by its placeholder_owner_slug, and the statement reads it as . or through narrative.rosetta_stone. The placeholder company exists only for this request. Its slug can be the slug of a real company, such as the access rule\u0026#x27;s real owner, and that company\u0026#x27;s data is never involved. The statement reads the caller\u0026#x27;s own active datasets only through company_data: by id, by name, or all of them through company_data.rosetta_stone. The caller\u0026#x27;s own slug is not a namespace in a simulation. Views and derived mappings are not available, and opt-out datasets and dataset statistics are not loaded. Query policies are evaluated before opt-out and sampling would apply, so neither changes which access rules are denied. The policies are checked by the same query policy evaluation a normal query goes through. The response lists, per access rule and query table, the violations that denied it. A listed access rule that is not in the list was not denied: its policy allowed the statement, or the statement did not read it. Requires a token with read access to subscriptions.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Narrative I/O Knowledge Base\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_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/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/narrative-07c7a1f7/OOk68seBU2ePTAv6/_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/narrative-07c7a1f7/OOk68seBU2ePTAv6/_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/narrative-07c7a1f7/OOk68seBU2ePTAv6/_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/narrative-07c7a1f7/OOk68seBU2ePTAv6/_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/narrative-07c7a1f7/OOk68seBU2ePTAv6/_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/narrative-07c7a1f7/OOk68seBU2ePTAv6/_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/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Simulate an NQL query against access rules - Narrative I/O Knowledge Base\">\u003cmeta data-mint-head property=\"og:description\" content=\"Check which of a chosen set of access rules would deny a SELECT or MERGE statement, without running it. Nothing is stored and no data is read: no job is created and no credits are charged. The statement runs as the caller\u0026#x27;s company, in the role of a buyer, against the listed access rules only. An entry is a stored access rule that the caller\u0026#x27;s company owns or can query, or an inline access rule defined in the request. Each access rule moves, with the datasets it reads, to a placeholder company named by its placeholder_owner_slug, and the statement reads it as . or through narrative.rosetta_stone. The placeholder company exists only for this request. Its slug can be the slug of a real company, such as the access rule\u0026#x27;s real owner, and that company\u0026#x27;s data is never involved. The statement reads the caller\u0026#x27;s own active datasets only through company_data: by id, by name, or all of them through company_data.rosetta_stone. The caller\u0026#x27;s own slug is not a namespace in a simulation. Views and derived mappings are not available, and opt-out datasets and dataset statistics are not loaded. Query policies are evaluated before opt-out and sampling would apply, so neither changes which access rules are denied. The policies are checked by the same query policy evaluation a normal query goes through. The response lists, per access rule and query table, the violations that denied it. A listed access rule that is not in the list was not denied: its policy allowed the statement, or the statement did not read it. Requires a token with read access to subscriptions.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Narrative I/O Knowledge Base\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.narrative.io/api-reference/nql/simulate-an-nql-query-against-access-rules\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://narrative-07c7a1f7.mintlify.site/_mintlify/api/og/v2?division=NQL\u0026amp;title=Simulate+an+NQL+query+against+access+rules\u0026amp;description=Check+which+of+a+chosen+set+of+access+rules+would+deny+a+%60SELECT%60+or+%60MERGE%60+statement%2C+without+running%0Ait.+Nothing+is+stored+and+no+data+is+read%3A+no+job+is+cre\u0026amp;theme=ee973f81a9436b7406ccdb45\u0026amp;signature=b03ab2d6cb553d220acda131888f2b8ebcbf6310139c94d594b674430546b901\">\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=\"Simulate an NQL query against access rules - Narrative I/O Knowledge Base\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Check which of a chosen set of access rules would deny a SELECT or MERGE statement, without running it. Nothing is stored and no data is read: no job is created and no credits are charged. The statement runs as the caller\u0026#x27;s company, in the role of a buyer, against the listed access rules only. An entry is a stored access rule that the caller\u0026#x27;s company owns or can query, or an inline access rule defined in the request. Each access rule moves, with the datasets it reads, to a placeholder company named by its placeholder_owner_slug, and the statement reads it as . or through narrative.rosetta_stone. The placeholder company exists only for this request. Its slug can be the slug of a real company, such as the access rule\u0026#x27;s real owner, and that company\u0026#x27;s data is never involved. The statement reads the caller\u0026#x27;s own active datasets only through company_data: by id, by name, or all of them through company_data.rosetta_stone. The caller\u0026#x27;s own slug is not a namespace in a simulation. Views and derived mappings are not available, and opt-out datasets and dataset statistics are not loaded. Query policies are evaluated before opt-out and sampling would apply, so neither changes which access rules are denied. The policies are checked by the same query policy evaluation a normal query goes through. The response lists, per access rule and query table, the violations that denied it. A listed access rule that is not in the list was not denied: its policy allowed the statement, or the statement did not read it. Requires a token with read access to subscriptions.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://narrative-07c7a1f7.mintlify.site/_mintlify/api/og/v2?division=NQL\u0026amp;title=Simulate+an+NQL+query+against+access+rules\u0026amp;description=Check+which+of+a+chosen+set+of+access+rules+would+deny+a+%60SELECT%60+or+%60MERGE%60+statement%2C+without+running%0Ait.+Nothing+is+stored+and+no+data+is+read%3A+no+job+is+cre\u0026amp;theme=ee973f81a9436b7406ccdb45\u0026amp;signature=b03ab2d6cb553d220acda131888f2b8ebcbf6310139c94d594b674430546b901\">\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/narrative-07c7a1f7/OOk68seBU2ePTAv6/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Narrative I/O Knowledge Base\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1438F5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.narrative.io/api-reference/nql/simulate-an-nql-query-against-access-rules\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/nql/simulate-an-nql-query-against-access-rules.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.narrative.io/#organization\",\"name\":\"Narrative I/O Knowledge Base\",\"url\":\"https://docs.narrative.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/narrative-07c7a1f7/ia6SQX79O4nc7uYf/logo/banner.png?fit=max\u0026auto=format\u0026n=ia6SQX79O4nc7uYf\u0026q=85\u0026s=99860b25011c79366624a87d1f648861\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.narrative.io#website\",\"name\":\"Narrative I/O Knowledge Base\",\"url\":\"https://docs.narrative.io\",\"publisher\":{\"@id\":\"https://docs.narrative.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.narrative.io/api-reference/nql/simulate-an-nql-query-against-access-rules#webpage\",\"url\":\"https://docs.narrative.io/api-reference/nql/simulate-an-nql-query-against-access-rules\",\"name\":\"Simulate an NQL query against access rules\",\"description\":\"Check which of a chosen set of access rules would deny a SELECT or MERGE statement, without running it. Nothing is stored and no data is read: no job is created and no credits are charged. The statement runs as the caller's company, in the role of a buyer, against the listed access rules only. An entry is a stored access rule that the caller's company owns or can query, or an inline access rule defined in the request. Each access rule moves, with the datasets it reads, to a placeholder company named by its placeholder_owner_slug, and the statement reads it as . or through narrative.rosetta_stone. The placeholder company exists only for this request. Its slug can be the slug of a real company, such as the access rule's real owner, and that company's data is never involved. The statement reads the caller's own active datasets only through company_data: by id, by name, or all of them through company_data.rosetta_stone. The caller's own slug is not a namespace in a simulation. Views and derived mappings are not available, and opt-out datasets and dataset statistics are not loaded. Query policies are evaluated before opt-out and sampling would apply, so neither changes which access rules are denied. The policies are checked by the same query policy evaluation a normal query goes through. The response lists, per access rule and query table, the violations that denied it. A listed access rule that is not in the list was not denied: its policy allowed the statement, or the statement did not read it. Requires a token with read access to subscriptions.\",\"dateModified\":\"2026-11-06T07:57:11.691Z\",\"isPartOf\":{\"@id\":\"https://docs.narrative.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.narrative.io/api-reference/nql/simulate-an-nql-query-against-access-rules#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.narrative.io/api-reference/nql/simulate-an-nql-query-against-access-rules#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"NQL\",\"item\":\"https://docs.narrative.io/api-reference/nql/validate-an-nql-statement\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Simulate an NQL query against access rules\",\"item\":\"https://docs.narrative.io/api-reference/nql/simulate-an-nql-query-against-access-rules\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.narrative.io/api-reference/nql/simulate-an-nql-query-against-access-rules#apireference\",\"headline\":\"Simulate an NQL query against access rules\",\"name\":\"Simulate an NQL query against access rules\",\"description\":\"Check which of a chosen set of access rules would deny a SELECT or MERGE statement, without running it. Nothing is stored and no data is read: no job is created and no credits are charged. The statement runs as the caller's company, in the role of a buyer, against the listed access rules only. An entry is a stored access rule that the caller's company owns or can query, or an inline access rule defined in the request. Each access rule moves, with the datasets it reads, to a placeholder company named by its placeholder_owner_slug, and the statement reads it as . or through narrative.rosetta_stone. The placeholder company exists only for this request. Its slug can be the slug of a real company, such as the access rule's real owner, and that company's data is never involved. The statement reads the caller's own active datasets only through company_data: by id, by name, or all of them through company_data.rosetta_stone. The caller's own slug is not a namespace in a simulation. Views and derived mappings are not available, and opt-out datasets and dataset statistics are not loaded. Query policies are evaluated before opt-out and sampling would apply, so neither changes which access rules are denied. The policies are checked by the same query policy evaluation a normal query goes through. The response lists, per access rule and query table, the violations that denied it. A listed access rule that is not in the list was not denied: its policy allowed the statement, or the statement did not read it. Requires a token with read access to subscriptions.\",\"url\":\"https://docs.narrative.io/api-reference/nql/simulate-an-nql-query-against-access-rules\",\"mainEntityOfPage\":{\"@id\":\"https://docs.narrative.io/api-reference/nql/simulate-an-nql-query-against-access-rules#webpage\"},\"dateModified\":\"2026-11-06T07:57:11.691Z\",\"publisher\":{\"@id\":\"https://docs.narrative.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.narrative.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Narrative I/O Knowledge Base\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Narrative I/O Knowledge Base","nav":{"global":{"anchors":[{"anchor":"Release Notes","icon":"clock-rotate-left","href":"/release-notes"}]},"tabs":[{"tab":"Getting Started","pages":[{"title":"Getting Started","href":"/getting-started/create-account"}]},{"tab":"Concepts","pages":[{"title":"Concepts","href":"/concepts"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides"}]},{"tab":"Cookbooks","pages":[{"title":"Cookbooks","href":"/cookbooks"}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/reference"}]},{"tab":"Connectors","pages":[{"title":"Connectors","href":"/reference/connectors"}]},{"tab":"NQL","pages":[{"title":"NQL","href":"/nql"}]},{"tab":"API Documentation","groups":[{"group":"Overview","pages":[{"title":"REST API","href":"/api-reference/introduction"}]},{"group":"Access Rules","pages":[{"title":"Get an Access Rule by id (V2)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/access-rules/{access_rule_id}","href":"/api-reference/access-rules/get-an-access-rule-by-id-v2"},{"title":"Update an Access Rule by id (V2)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /v2/access-rules/{access_rule_id}","href":"/api-reference/access-rules/update-an-access-rule-by-id-v2"},{"title":"Delete an access rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/access-rules/{access_rule_id}","href":"/api-reference/access-rules/delete-an-access-rule"},{"title":"Get the query policy of an Access Rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/access-rules/{access_rule_id}/query-policy","href":"/api-reference/access-rules/get-the-query-policy-of-an-access-rule"},{"title":"Set the query policy of an Access Rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /v2/access-rules/{access_rule_id}/query-policy","href":"/api-reference/access-rules/set-the-query-policy-of-an-access-rule"},{"title":"Remove the query policy of an Access Rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/access-rules/{access_rule_id}/query-policy","href":"/api-reference/access-rules/remove-the-query-policy-of-an-access-rule"},{"title":"Get an Access Rule by name (V2)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/access-rules/{company_slug}/{access_rule_name}","href":"/api-reference/access-rules/get-an-access-rule-by-name-v2"},{"title":"Get all accessible Access Rules (V2)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/access-rules","href":"/api-reference/access-rules/get-all-accessible-access-rules-v2"},{"title":"Create a new Access Rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/access-rules","href":"/api-reference/access-rules/create-a-new-access-rule"}]},{"group":"Access Tokens","pages":[{"title":"List System Access Tokens","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /access-tokens/tokens","href":"/api-reference/access-tokens/list-system-access-tokens"},{"title":"Create a System Access Token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /access-tokens/tokens","href":"/api-reference/access-tokens/create-a-system-access-token"},{"title":"Get a System Access Token by id","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /access-tokens/tokens/{access_token_id}","href":"/api-reference/access-tokens/get-a-system-access-token-by-id"},{"title":"Update a System Access Token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /access-tokens/tokens/{access_token_id}","href":"/api-reference/access-tokens/update-a-system-access-token"},{"title":"Delete a System Access Token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /access-tokens/tokens/{access_token_id}","href":"/api-reference/access-tokens/delete-a-system-access-token"}]},{"group":"Agent Conversations","pages":[{"title":"List the calling user's agent conversations","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /agents/conversations","href":"/api-reference/agent-conversations/list-the-calling-users-agent-conversations"},{"title":"Create an agent conversation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /agents/conversations","href":"/api-reference/agent-conversations/create-an-agent-conversation"},{"title":"Get an agent conversation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /agents/conversations/{id}","href":"/api-reference/agent-conversations/get-an-agent-conversation"},{"title":"List conversation messages (delta read by version cursor)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /agents/conversations/{id}/messages","href":"/api-reference/agent-conversations/list-conversation-messages-delta-read-by-version-cursor"},{"title":"Start a new run on the conversation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /agents/conversations/{id}/runs","href":"/api-reference/agent-conversations/start-a-new-run-on-the-conversation"},{"title":"Stop waiting on a handle","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /agents/conversations/{id}/waitables/{handle}/cancel","href":"/api-reference/agent-conversations/stop-waiting-on-a-handle"},{"title":"Get a run's current state","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /agents/runs/{id}","href":"/api-reference/agent-conversations/get-a-runs-current-state"}]},{"group":"App API","pages":[{"title":"Delivery Commands","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v1/app/commands/delivery","href":"/api-reference/app-api/delivery-commands"},{"title":"Delivery Files","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v1/app/commands/delivery/{delivery_id}/files","href":"/api-reference/app-api/delivery-files"},{"title":"Download file","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v1/app/commands/delivery/{delivery_id}/download/{filename}","href":"/api-reference/app-api/download-file"}]},{"group":"App Invites","pages":[{"title":"List App Invites","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /app-invites","href":"/api-reference/app-invites/list-app-invites"},{"title":"Create App Invite","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /app-invites","href":"/api-reference/app-invites/create-app-invite"},{"title":"Get App Invite","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /app-invites/{id}","href":"/api-reference/app-invites/get-app-invite"},{"title":"Archive App Invite","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /app-invites/{id}","href":"/api-reference/app-invites/archive-app-invite"},{"title":"Activate App Invite","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /app-invites/{id}/activate","href":"/api-reference/app-invites/activate-app-invite"},{"title":"Get App Invite By Code","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /app-invites/codes/{code}","href":"/api-reference/app-invites/get-app-invite-by-code"}]},{"group":"Apps","pages":[{"title":"Lists apps","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps","href":"/api-reference/apps/lists-apps"},{"title":"Publish app event","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /apps/events","href":"/api-reference/apps/publish-app-event"},{"title":"List installed app interfaces","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps/installed/interfaces","href":"/api-reference/apps/list-installed-app-interfaces"},{"title":"List app interfaces","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps/{app_id}/interfaces","href":"/api-reference/apps/list-app-interfaces"},{"title":"Get an app interface","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps/{app_id}/interfaces/{interface_id}","href":"/api-reference/apps/get-an-app-interface"},{"title":"Lists profiles","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps/{app_slug}/profiles","href":"/api-reference/apps/lists-profiles"},{"title":"Get an app's v1 manifest","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /apps/{app_slug}/manifest","href":"/api-reference/apps/get-an-apps-v1-manifest"},{"title":"List Apps","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/apps","href":"/api-reference/apps/list-apps"},{"title":"Create App","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/apps","href":"/api-reference/apps/create-app"},{"title":"Get App","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/apps/{slug}","href":"/api-reference/apps/get-app"},{"title":"Archive App","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/apps/{slug}","href":"/api-reference/apps/archive-app"},{"title":"Replace App Manifest","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /v2/apps/{slug}/manifest","href":"/api-reference/apps/replace-app-manifest"},{"title":"Patch App Manifest","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json patch /v2/apps/{slug}/manifest","href":"/api-reference/apps/patch-app-manifest"},{"title":"Generate App Credentials","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/apps/{slug}/credentials/generate","href":"/api-reference/apps/generate-app-credentials"}]},{"group":"Attributes","pages":[{"title":"Get attributes","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /attributes","href":"/api-reference/attributes/get-attributes"},{"title":"Create an attribute","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /attributes","href":"/api-reference/attributes/create-an-attribute"},{"title":"Get an attribute","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /attributes/{attribute_name_or_id}","href":"/api-reference/attributes/get-an-attribute"},{"title":"Update an attribute","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /attributes/{attribute_name_or_id}","href":"/api-reference/attributes/update-an-attribute"},{"title":"Delete an attribute","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /attributes/{attribute_name_or_id}","href":"/api-reference/attributes/delete-an-attribute"},{"title":"Get attribute references.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /attributes/{attribute_name_or_id}/references","href":"/api-reference/attributes/get-attribute-references"},{"title":"Get the derivation graph around an attribute.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /attributes/{attribute_name_or_id}/derivation-graph","href":"/api-reference/attributes/get-the-derivation-graph-around-an-attribute"}]},{"group":"Auth","pages":[{"title":"Request or refresh an OAuth token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /oauth/token","href":"/api-reference/auth/request-or-refresh-an-oauth-token"}]},{"group":"Authentication","pages":[{"title":"Sign in with a Stytch B2B session token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/b2b/login","href":"/api-reference/authentication/sign-in-with-a-stytch-b2b-session-token"},{"title":"Register with a Stytch B2B session token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/b2b/register","href":"/api-reference/authentication/register-with-a-stytch-b2b-session-token"},{"title":"Check whether a Stytch B2B member is registered on Narrative","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/b2b/registration-status","href":"/api-reference/authentication/check-whether-a-stytch-b2b-member-is-registered-on-narrative"},{"title":"Exchange a user token for one scoped to another company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/exchange-token","href":"/api-reference/authentication/exchange-a-user-token-for-one-scoped-to-another-company"},{"title":"Sign in with a Stytch session token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/login","href":"/api-reference/authentication/sign-in-with-a-stytch-session-token"},{"title":"Register with a Stytch session token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/register","href":"/api-reference/authentication/register-with-a-stytch-session-token"},{"title":"Check whether a Stytch Magic Links or OAuth user is registered on Narrative","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /authentication/registration-status","href":"/api-reference/authentication/check-whether-a-stytch-magic-links-or-oauth-user-is-registered-on-narrative"}]},{"group":"Billings","pages":[{"title":"Get dataset storage billing","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /admin/billings/dataset-storage-billing","href":"/api-reference/billings/get-dataset-storage-billing"},{"title":"Get dataset storage billing for company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /billings/dataset-storage-billing","href":"/api-reference/billings/get-dataset-storage-billing-for-company"}]},{"group":"Companies","pages":[{"title":"Lists Company Domains","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /companies/{company_id}/domains","href":"/api-reference/companies/lists-company-domains"},{"title":"Get a presigned URL to upload company logo","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /admin/companies/logo-upload-url","href":"/api-reference/companies/get-a-presigned-url-to-upload-company-logo"}]},{"group":"Company","pages":[{"title":"Get a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /companies/{company_id}","href":"/api-reference/company/get-a-company"},{"title":"Get a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /company/{company_id}","href":"/api-reference/company/get-a-company-1"},{"title":"Update a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /company/{company_id}","href":"/api-reference/company/update-a-company"},{"title":"Delete (archive) a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /company/{company_id}","href":"/api-reference/company/delete-archive-a-company"},{"title":"Clear the company's default compute pool for a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /company/{company_id}/data-planes/{data_plane_id}/default-compute-pool","href":"/api-reference/company/clear-the-companys-default-compute-pool-for-a-data-plane"},{"title":"Set the company's default compute pool for a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /company/{company_id}/data-planes/{data_plane_id}/default-compute-pool/{compute_pool_id}","href":"/api-reference/company/set-the-companys-default-compute-pool-for-a-data-plane"},{"title":"Update a user","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /users/{user_id}","href":"/api-reference/company/update-a-user"}]},{"group":"Company Marketing Information","pages":[{"title":"Returns the company and user associated with the token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /company-info/whoami","href":"/api-reference/company-marketing-information/returns-the-company-and-user-associated-with-the-token"},{"title":"Get marketing details on a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /company-info/{company_id}","href":"/api-reference/company-marketing-information/get-marketing-details-on-a-company"}]},{"group":"Compute Pools","pages":[{"title":"List compute pools","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /data-planes/{data_plane_id}/compute-pools","href":"/api-reference/compute-pools/list-compute-pools"},{"title":"Create a compute pool","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /data-planes/{data_plane_id}/compute-pools","href":"/api-reference/compute-pools/create-a-compute-pool"},{"title":"Get a compute pool by ID","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /data-planes/{data_plane_id}/compute-pools/{compute_pool_id}","href":"/api-reference/compute-pools/get-a-compute-pool-by-id"},{"title":"Update a compute pool","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /data-planes/{data_plane_id}/compute-pools/{compute_pool_id}","href":"/api-reference/compute-pools/update-a-compute-pool"},{"title":"Archive a compute pool","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /data-planes/{data_plane_id}/compute-pools/{compute_pool_id}","href":"/api-reference/compute-pools/archive-a-compute-pool"}]},{"group":"Connections","pages":[{"title":"List connections","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/connections","href":"/api-reference/connections/list-connections"},{"title":"Create a connection","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/connections","href":"/api-reference/connections/create-a-connection"},{"title":"Get a connection","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/connections/{connection_id}","href":"/api-reference/connections/get-a-connection"},{"title":"Archive a connection","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/connections/{connection_id}","href":"/api-reference/connections/archive-a-connection"}]},{"group":"Data Planes","pages":[{"title":"List data planes","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /data-planes","href":"/api-reference/data-planes/list-data-planes"},{"title":"Create a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /data-planes","href":"/api-reference/data-planes/create-a-data-plane"},{"title":"Get a data plane by ID","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /data-planes/{data_plane_id}","href":"/api-reference/data-planes/get-a-data-plane-by-id"},{"title":"Archive a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /data-planes/{data_plane_id}","href":"/api-reference/data-planes/archive-a-data-plane"},{"title":"Update a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json patch /data-planes/{data_plane_id}","href":"/api-reference/data-planes/update-a-data-plane"},{"title":"Data plane heartbeat","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /data-planes/{data_plane_id}/heartbeat","href":"/api-reference/data-planes/data-plane-heartbeat"},{"title":"Trigger a health check","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /data-planes/{data_plane_id}/health-check","href":"/api-reference/data-planes/trigger-a-health-check"},{"title":"Replace the collaborators on a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /data-planes/{data_plane_id}/collaborators","href":"/api-reference/data-planes/replace-the-collaborators-on-a-data-plane"},{"title":"Add a collaborator to a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /data-planes/{data_plane_id}/collaborators/{collaborator_company_id}","href":"/api-reference/data-planes/add-a-collaborator-to-a-data-plane"},{"title":"Remove a collaborator from a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /data-planes/{data_plane_id}/collaborators/{collaborator_company_id}","href":"/api-reference/data-planes/remove-a-collaborator-from-a-data-plane"},{"title":"Set the default compute pool for a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /data-planes/{data_plane_id}/default-compute-pool/{compute_pool_id}","href":"/api-reference/data-planes/set-the-default-compute-pool-for-a-data-plane"},{"title":"Clear the default compute pool for a data plane","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /data-planes/{data_plane_id}/default-compute-pool","href":"/api-reference/data-planes/clear-the-default-compute-pool-for-a-data-plane"}]},{"group":"Dataset Configuration","pages":[{"title":"Preview snapshot expirations","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/retention-policy/preview","href":"/api-reference/dataset-configuration/preview-snapshot-expirations"},{"title":"Upsert retention policies for a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/retention-policy","href":"/api-reference/dataset-configuration/upsert-retention-policies-for-a-dataset"}]},{"group":"Dataset Files","pages":[{"title":"Files added","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/snapshots/{snapshot_id}/files-added","href":"/api-reference/dataset-files/files-added"},{"title":"Find snapshots","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/find-snapshots","href":"/api-reference/dataset-files/find-snapshots"},{"title":"Find files","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/find-files","href":"/api-reference/dataset-files/find-files"},{"title":"Issue file download url","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/snapshots/{snapshot_id}/files-added/{file_id}/download","href":"/api-reference/dataset-files/issue-file-download-url"}]},{"group":"Dataset Refresh","pages":[{"title":"Update the materialized view refresh configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/refresh-schedule","href":"/api-reference/dataset-refresh/update-the-materialized-view-refresh-configuration"},{"title":"Create a refresh schedule for an existing materialized view","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/refresh-schedule","href":"/api-reference/dataset-refresh/create-a-refresh-schedule-for-an-existing-materialized-view"},{"title":"Archive the materialized view refresh configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}/refresh-schedule","href":"/api-reference/dataset-refresh/archive-the-materialized-view-refresh-configuration"},{"title":"Run a materialized view refresh now","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/refresh-materialized-view","href":"/api-reference/dataset-refresh/run-a-materialized-view-refresh-now"}]},{"group":"Dataset Samples","pages":[{"title":"Sample a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/sample","href":"/api-reference/dataset-samples/sample-a-dataset"},{"title":"Upload a sample","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/sample","href":"/api-reference/dataset-samples/upload-a-sample"},{"title":"Delete a sample","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}/sample","href":"/api-reference/dataset-samples/delete-a-sample"},{"title":"Sample a dataset (Admin)","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/admin/sample","href":"/api-reference/dataset-samples/sample-a-dataset-admin"},{"title":"Request Dataset Sample","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/request-sample","href":"/api-reference/dataset-samples/request-dataset-sample"},{"title":"Sample a dataset and redact the sample","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/datasets/{dataset_id}/request-sample","href":"/api-reference/dataset-samples/sample-a-dataset-and-redact-the-sample"},{"title":"Get a dataset's sample redaction","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/redaction","href":"/api-reference/dataset-samples/get-a-datasets-sample-redaction"},{"title":"Upload a dataset's sample redaction","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/redaction","href":"/api-reference/dataset-samples/upload-a-datasets-sample-redaction"},{"title":"Delete a dataset's sample redaction","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}/redaction","href":"/api-reference/dataset-samples/delete-a-datasets-sample-redaction"},{"title":"Sample a dataset with its redaction applied","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/sample/redacted","href":"/api-reference/dataset-samples/sample-a-dataset-with-its-redaction-applied"},{"title":"Sampled Mappings","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/sample/mappings","href":"/api-reference/dataset-samples/sampled-mappings"}]},{"group":"Dataset Statistics","pages":[{"title":"Get Statistics Configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/statistics-configuration","href":"/api-reference/dataset-statistics/get-statistics-configuration"},{"title":"Put Statistics Configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/statistics-configuration","href":"/api-reference/dataset-statistics/put-statistics-configuration"},{"title":"Disable Statistics Configuration","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}/statistics-configuration","href":"/api-reference/dataset-statistics/disable-statistics-configuration"}]},{"group":"Datasets","pages":[{"title":"Get datasets","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets","href":"/api-reference/datasets/get-datasets"},{"title":"Create a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets","href":"/api-reference/datasets/create-a-dataset"},{"title":"Get a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}","href":"/api-reference/datasets/get-a-dataset"},{"title":"Update a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}","href":"/api-reference/datasets/update-a-dataset"},{"title":"Delete a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /datasets/{dataset_id}","href":"/api-reference/datasets/delete-a-dataset"},{"title":"Activate a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/activate","href":"/api-reference/datasets/activate-a-dataset"},{"title":"Activate a dataset","deprecated":true,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/activate","href":"/api-reference/datasets/activate-a-dataset-1"},{"title":"Truncate a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/truncate","href":"/api-reference/datasets/truncate-a-dataset"},{"title":"Get admin info for a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/admin","href":"/api-reference/datasets/get-admin-info-for-a-dataset"},{"title":"Update a dataset's partition spec","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/admin/partition-spec","href":"/api-reference/datasets/update-a-datasets-partition-spec"},{"title":"Get dataset statistics","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/stats","href":"/api-reference/datasets/get-dataset-statistics"},{"title":"Get detailed statistics","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/column-stats","href":"/api-reference/datasets/get-detailed-statistics"},{"title":"Create or Update detailed statistics","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /datasets/{dataset_id}/column-stats","href":"/api-reference/datasets/create-or-update-detailed-statistics"},{"title":"Submit recalculation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/column-stats/recalculate","href":"/api-reference/datasets/submit-recalculation"},{"title":"Ingest a file","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/upload","href":"/api-reference/datasets/ingest-a-file"},{"title":"Issue an ingestion token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /datasets/{dataset_id}/upload/token","href":"/api-reference/datasets/issue-an-ingestion-token"},{"title":"List connector interfaces compatible with a dataset","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /datasets/{dataset_id}/interfaces","href":"/api-reference/datasets/list-connector-interfaces-compatible-with-a-dataset"}]},{"group":"Derivations","pages":[{"title":"Get derivation rules","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /derivations","href":"/api-reference/derivations/get-derivation-rules"},{"title":"Create a derivation rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /derivations","href":"/api-reference/derivations/create-a-derivation-rule"},{"title":"Get a derivation rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /derivations/{derivation_id}","href":"/api-reference/derivations/get-a-derivation-rule"},{"title":"Delete a derivation rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /derivations/{derivation_id}","href":"/api-reference/derivations/delete-a-derivation-rule"},{"title":"Update a derivation rule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json patch /derivations/{derivation_id}","href":"/api-reference/derivations/update-a-derivation-rule"}]},{"group":"Encryption Materials","pages":[{"title":"List encryption materials","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /encryption-materials","href":"/api-reference/encryption-materials/list-encryption-materials"},{"title":"Create an encryption material","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /encryption-materials","href":"/api-reference/encryption-materials/create-an-encryption-material"},{"title":"List decrypted encryption materials","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /encryption-materials/decrypted","href":"/api-reference/encryption-materials/list-decrypted-encryption-materials"},{"title":"Get an encryption material","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /encryption-materials/{encryption_material_id}","href":"/api-reference/encryption-materials/get-an-encryption-material"},{"title":"Update an encryption material","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /encryption-materials/{encryption_material_id}","href":"/api-reference/encryption-materials/update-an-encryption-material"},{"title":"Archive an encryption material","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /encryption-materials/{encryption_material_id}","href":"/api-reference/encryption-materials/archive-an-encryption-material"}]},{"group":"Installations","pages":[{"title":"List Installations","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /installations","href":"/api-reference/installations/list-installations"},{"title":"Create Installation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations","href":"/api-reference/installations/create-installation"},{"title":"Whoami Installation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /installations/whoami","href":"/api-reference/installations/whoami-installation"},{"title":"Get Installation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /installations/{id}","href":"/api-reference/installations/get-installation"},{"title":"Delete Installation","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /installations/{id}","href":"/api-reference/installations/delete-installation"},{"title":"Create Installation Token","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations/{id}/token","href":"/api-reference/installations/create-installation-token"}]},{"group":"Jobs","pages":[{"title":"Get jobs","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /jobs","href":"/api-reference/jobs/get-jobs"},{"title":"Get a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /jobs/{job_id}","href":"/api-reference/jobs/get-a-job"},{"title":"Run a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/run","href":"/api-reference/jobs/run-a-job"},{"title":"Schedule a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/schedule","href":"/api-reference/jobs/schedule-a-job"},{"title":"Complete a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/complete","href":"/api-reference/jobs/complete-a-job"},{"title":"Fail a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/fail","href":"/api-reference/jobs/fail-a-job"},{"title":"Request cancellation of a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/request-cancellation","href":"/api-reference/jobs/request-cancellation-of-a-job"},{"title":"Cancel a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/cancel","href":"/api-reference/jobs/cancel-a-job"},{"title":"Reschedule a job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /jobs/{job_id}/reschedule","href":"/api-reference/jobs/reschedule-a-job"}]},{"group":"Mappings","pages":[{"title":"Get mappings","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mappings","href":"/api-reference/mappings/get-mappings"},{"title":"Get mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mappings/{mapping_id}","href":"/api-reference/mappings/get-mapping"},{"title":"Update a mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /mappings/{mapping_id}","href":"/api-reference/mappings/update-a-mapping"},{"title":"Delete a mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /mappings/{mapping_id}","href":"/api-reference/mappings/delete-a-mapping"},{"title":"Accept a mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /mappings/{mapping_id}/accept","href":"/api-reference/mappings/accept-a-mapping"},{"title":"Get mappings for a company","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mappings/companies/{company_id}","href":"/api-reference/mappings/get-mappings-for-a-company"},{"title":"Create a mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /mappings/companies/{company_id}","href":"/api-reference/mappings/create-a-mapping"},{"title":"Get mapping preview","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mappings/{mapping_id}/sample","href":"/api-reference/mappings/get-mapping-preview"},{"title":"Test Mapping","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /mappings/test","href":"/api-reference/mappings/test-mapping"}]},{"group":"MCP Connections","pages":[{"title":"List the calling user's external MCP connections","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mcp-connections","href":"/api-reference/mcp-connections/list-the-calling-users-external-mcp-connections"},{"title":"Begin connecting an external MCP server","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /mcp-connections","href":"/api-reference/mcp-connections/begin-connecting-an-external-mcp-server"},{"title":"OAuth redirect target that receives the authorization code","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mcp-connections/callback","href":"/api-reference/mcp-connections/oauth-redirect-target-that-receives-the-authorization-code"},{"title":"Finish connecting an external MCP server","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /mcp-connections/complete","href":"/api-reference/mcp-connections/finish-connecting-an-external-mcp-server"},{"title":"Get one of the calling user's MCP connections","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /mcp-connections/{id}","href":"/api-reference/mcp-connections/get-one-of-the-calling-users-mcp-connections"},{"title":"Delete one of the calling user's MCP connections","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /mcp-connections/{id}","href":"/api-reference/mcp-connections/delete-one-of-the-calling-users-mcp-connections"}]},{"group":"Model Inference","pages":[{"title":"Run model inference","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /model-inference/run","href":"/api-reference/model-inference/run-model-inference"}]},{"group":"Model Training","pages":[{"title":"Fine-tune a model","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /model-training/run","href":"/api-reference/model-training/fine-tune-a-model"},{"title":"Train a classifier","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v1/model-training/train-classifier","href":"/api-reference/model-training/train-a-classifier"}]},{"group":"Models","pages":[{"title":"Get models","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /models","href":"/api-reference/models/get-models"},{"title":"Get a model","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /models/{model_id}","href":"/api-reference/models/get-a-model"},{"title":"Update a model","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /models/{model_id}","href":"/api-reference/models/update-a-model"},{"title":"Archive a model","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /models/{model_id}","href":"/api-reference/models/archive-a-model"}]},{"group":"NQL","pages":[{"title":"Validate an NQL statement","description":"Parse and validate an NQL statement without running it. The statement is parsed with the SQL dialect of\nthe given data plane and checked against the datasets, access rules and views the token's company can\nsee. A valid statement returns its AST (see the `Ast` schema). An invalid one returns an RFC 7807\nproblem whose `title` and `detail` say what is wrong, with the status code `/v1/nql/execute`\nreturns for the same problem.\n\nRequires a token with read access to subscriptions. `POST /nql/parse` does the same check for any\ntoken, or for no token at all.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /nql/validate","href":"/api-reference/nql/validate-an-nql-statement"},{"title":"Simulate an NQL query against access rules","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/nql/simulate","href":"/api-reference/nql/simulate-an-nql-query-against-access-rules"},{"title":"Parse an NQL statement","description":"The same check as `POST /nql/validate`, open to any token and to callers with no token at all, so a\nquery editor can report problems as the user types. The response and error shapes are those of\n`/nql/validate`.\n\nWith a bearer token the statement is checked against the datasets, access rules and views of the\ntoken's company, exactly as `/nql/validate` does, and the token needs no particular permission.\n\nWithout a token there is no company context. The statement is still parsed with the dialect of the\ngiven data plane and type-checked, but it can only resolve tables that need no company, such as\n`narrative.rosetta_stone`, and statements that write data (`CREATE MATERIALIZED VIEW`, `INSERT`,\n`UPDATE`, `DELETE`, `MERGE`) are rejected with a 400 titled\n`Cannot validate certain queries when unauthentified`.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /nql/parse","href":"/api-reference/nql/parse-an-nql-statement"},{"title":"Check Name Availability","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /nql/name-availability","href":"/api-reference/nql/check-name-availability"},{"title":"Execute an NQL statement","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v1/nql/execute","href":"/api-reference/nql/execute-an-nql-statement"},{"title":"Get a forecast job","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /nql/{job_id}","href":"/api-reference/nql/get-a-forecast-job"}]},{"group":"Permissions","pages":[{"title":"Create a permission","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /admin/permissions","href":"/api-reference/permissions/create-a-permission"}]},{"group":"Profiles","pages":[{"title":"Returns app profiles","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /installations/{installation_id}/profiles","href":"/api-reference/profiles/returns-app-profiles"},{"title":"Creates an app profile","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations/{installation_id}/profiles","href":"/api-reference/profiles/creates-an-app-profile"},{"title":"Returns profile with {profile_id}","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /installations/{installation_id}/profiles/{app_profile_id}","href":"/api-reference/profiles/returns-profile-with-"},{"title":"Updates an existing app profile","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /installations/{installation_id}/profiles/{app_profile_id}","href":"/api-reference/profiles/updates-an-existing-app-profile"},{"title":"Enables a profile","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations/{installation_id}/profiles/{app_profile_id}/enable","href":"/api-reference/profiles/enables-a-profile"},{"title":"Disables a profile","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations/{installation_id}/profiles/{app_profile_id}/disable","href":"/api-reference/profiles/disables-a-profile"},{"title":"Archives a profile","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /installations/{installation_id}/profiles/{app_profile_id}/archive","href":"/api-reference/profiles/archives-a-profile"}]},{"group":"Queries","pages":[{"title":"Get a query by id","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/queries/{query_id}","href":"/api-reference/queries/get-a-query-by-id"},{"title":"Deletes a query","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/queries/{query_id}","href":"/api-reference/queries/deletes-a-query"},{"title":"Get accessible queries","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/queries","href":"/api-reference/queries/get-accessible-queries"},{"title":"Create a query","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/queries","href":"/api-reference/queries/create-a-query"}]},{"group":"Resources","pages":[{"title":"Get buckets","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /resources/buckets","href":"/api-reference/resources/get-buckets"},{"title":"Create bucket","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /resources/buckets","href":"/api-reference/resources/create-bucket"},{"title":"Update access type","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /resources/update-access","href":"/api-reference/resources/update-access-type"}]},{"group":"Schema Inference","pages":[{"title":"Infer the dataset schema of a file passed by multipart file.","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/inference","href":"/api-reference/schema-inference/infer-the-dataset-schema-of-a-file-passed-by-multipart-file"}]},{"group":"Uploads","pages":[{"title":"Upload a file","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /uploads/{upload_path}","href":"/api-reference/uploads/upload-a-file"}]},{"group":"Usage","pages":[{"title":"Create a usage event","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /usage","href":"/api-reference/usage/create-a-usage-event"}]},{"group":"Views","pages":[{"title":"Get a view by id","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/views/{view_id}","href":"/api-reference/views/get-a-view-by-id"},{"title":"Updates a view","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json put /v2/views/{view_id}","href":"/api-reference/views/updates-a-view"},{"title":"Archives a view","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /v2/views/{view_id}","href":"/api-reference/views/archives-a-view"},{"title":"Get accessible views","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /v2/views","href":"/api-reference/views/get-accessible-views"},{"title":"Create a view","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /v2/views","href":"/api-reference/views/create-a-view"}]},{"group":"Webhooks","pages":[{"title":"List webhook subscriptions","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /webhooks","href":"/api-reference/webhooks/list-webhook-subscriptions"},{"title":"Create a webhook subscription","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /webhooks","href":"/api-reference/webhooks/create-a-webhook-subscription"},{"title":"Get a webhook subscription by ID","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /webhooks/{webhook_subscription_id}","href":"/api-reference/webhooks/get-a-webhook-subscription-by-id"},{"title":"Archive a webhook subscription","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /webhooks/{webhook_subscription_id}","href":"/api-reference/webhooks/archive-a-webhook-subscription"},{"title":"Event delivery","version":null,"deprecated":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json webhook webhookDelivery","href":"/api-reference/webhooks/event-delivery"}]},{"group":"Whoami","pages":[{"title":"Get a current user","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /whoami","href":"/api-reference/whoami/get-a-current-user"}]},{"group":"Workflows","pages":[{"title":"List workflows","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /workflows","href":"/api-reference/workflows/list-workflows"},{"title":"Create a workflow","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /workflows","href":"/api-reference/workflows/create-a-workflow"},{"title":"Get a workflow","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /workflows/{workflow_id}","href":"/api-reference/workflows/get-a-workflow"},{"title":"Archive a workflow","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /workflows/{workflow_id}","href":"/api-reference/workflows/archive-a-workflow"},{"title":"Trigger a workflow","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /workflows/{workflow_id}/trigger","href":"/api-reference/workflows/trigger-a-workflow"},{"title":"Schedule a workflow","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /workflows/{workflow_id}/schedule","href":"/api-reference/workflows/schedule-a-workflow"},{"title":"Remove a workflow schedule","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json delete /workflows/{workflow_id}/schedule","href":"/api-reference/workflows/remove-a-workflow-schedule"},{"title":"Cancel a workflow execution","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /workflows/{workflow_id}/cancel","href":"/api-reference/workflows/cancel-a-workflow-execution"},{"title":"List workflow runs","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json get /workflows/{workflow_id}/runs","href":"/api-reference/workflows/list-workflow-runs"},{"title":"Cancel a specific workflow run","deprecated":null,"version":null,"openapi":"https://docs-cdn.narrative.io/api-reference/main/openapi.json post /workflows/{workflow_id}/runs/{run_id}/cancel","href":"/api-reference/workflows/cancel-a-specific-workflow-run"}]}]}]},"basePath":"","title":"Simulate an NQL query against access rules - Narrative I/O Knowledge Base","buildId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","deploymentId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Myd8dsju.js","utils-C2HkQgW0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-8rSppmTv.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B6MjiCFm.js","snippetPresets-DwrSAONL.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-1-a5UQKQ.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C541m7wZ.js","shallow-CWELCZ77.js","getApiPlaygroundDisplay-CTo5Zn03.js","CodeSnippet-D--dzvnl.js","CodeSnippets-DM3cXEDh.js","Page-CxAy5y67.js","getPastedJson-C-VECgcL.js","icon-BPq2-Mg3.js","MethodPill-D9J5cUHd.js","DuplicateIcon-BqHaxUnD.js","createIcon-CIbcZHp9.js","DynamicMarkdown-BKiHAm_d.js","SectionHeading-DstQXt3H.js","axios-vUo_bRtp.js","Markdown-CpxgzsKA.js","clsx-C5EfhVm0.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CJ9Oly2E.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Mk6P3qvh.js"]}