using OsoCloud;
string? apiKey = Environment.GetEnvironmentVariable("OSO_CLOUD_API_KEY");
var oso = new Oso("https://api.osohq.com", apiKey);
// Batch multiple operations
var user = new Value("User", "alice");
var org = new Value("Organization", "acme");
var repo = new Value("Repository", "anvils");
await oso.Batch(tx => {
// Insert new facts
tx.Insert("has_role", user, "owner", org);
tx.Insert("has_permission", user, "admin", repo);
// Delete old facts
tx.Delete("has_role", user, "maintainer", repo);
tx.Delete("has_role", user, "member", org);
});
{ "message": "<string>"}
{
"message": "<string>"
}
Facts
Post batch
Deletes and adds many facts in one atomic batch. Facts are inserted and deleted in-order (ie: inserted facts may be deleted in the same transaction). null can be used as a wildcard in deleted facts. Does not throw an error when the facts to delete are not found.
using OsoCloud;
string? apiKey = Environment.GetEnvironmentVariable("OSO_CLOUD_API_KEY");
var oso = new Oso("https://api.osohq.com", apiKey);
// Batch multiple operations
var user = new Value("User", "alice");
var org = new Value("Organization", "acme");
var repo = new Value("Repository", "anvils");
await oso.Batch(tx => {
// Insert new facts
tx.Insert("has_role", user, "owner", org);
tx.Insert("has_permission", user, "admin", repo);
// Delete old facts
tx.Delete("has_role", user, "maintainer", repo);
tx.Delete("has_role", user, "member", org);
});
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Oso Cloud Documentation","colors":{"primary":"#392396","light":"#A78BFA","dark":"#392396"},"logo":{"light":"https://mintcdn.com/osoinc/IZptQQUcDTzNnhFZ/logo/logo_black.svg?fit=max\u0026auto=format\u0026n=IZptQQUcDTzNnhFZ\u0026q=85\u0026s=a23ba87f23f09fee12a107724078979d","dark":"https://mintcdn.com/osoinc/IZptQQUcDTzNnhFZ/logo/logo_white.svg?fit=max\u0026auto=format\u0026n=IZptQQUcDTzNnhFZ\u0026q=85\u0026s=f243e8e50bd0474e6481419e6c602335"},"favicon":"https://mintcdn.com/osoinc/HuMviHxd0NHscL55/favicon.png?fit=max\u0026auto=format\u0026n=HuMviHxd0NHscL55\u0026q=85\u0026s=462aeacb44be5e00705afebb98f0ea1b","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","javascript","go","java","ruby","csharp"]}},"navbar":{"links":[{"href":"https://www.osohq.com/meet-oso","label":"Meet an Engineer"}],"primary":{"type":"button","label":"Try Oso for free","href":"https://ui.osohq.com/"}},"footer":{"socials":{"x":"https://x.com/osohq","github":"https://github.com/osohq","linkedin":"https://www.linkedin.com/company/osohq","slack":"https://join-slack.osohq.com/","youtube":"https://www.youtube.com/@oso-authorization"}},"fonts":{"family":"Inter"},"integrations":{"gtm":{"tagId":"GTM-MK29QFG"}},"banner":{"content":"**AI agents are everywhere.** [See what yours are doing →](https://www.osohq.com/post/introducing-oso-for-coding-agents)","dismissible":true},"contextual":{"options":["copy","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://osohq.com/blog"},{"anchor":"Status Page","icon":"wifi","href":"https://oso.statuspage.io/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"osoinc","hasAudioNarration":false,"actualSubdomain":"osoinc","customDomains":["www.osohq.com"],"gitSource":{"type":"github","owner":"osohq","repo":"oso-cloud-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adf92850461319c0aa1df69","collectionId":"41c75d83-80b3-44ae-9561-b735be5940e9","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adf92850461319c0aa1df69"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adf92850461319c0aa1df69","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Oso for Apps","count":123},{"language":"default","tag":"Reference","count":71},{"language":"default","tag":"Docs","count":43},{"language":"default","tag":"HTTP API","count":40},{"language":"default","tag":"Develop","count":34},{"language":"default","tag":"Oso for Agents","count":30},{"language":"default","tag":"SDKs","count":20},{"language":"default","tag":"Write Policies","count":16},{"language":"default","tag":"Learn","count":11},{"language":"default","tag":"Changelog","count":11}]},"assistantConfig":{},"basePath":"/docs","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":"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":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"reference/api/centralized-authorization-data/post-batch","slug":"/reference/api/centralized-authorization-data/post-batch","pageMetadata":{"openapi":"post /batch","title":null,"description":"Deletes and adds many facts in one atomic batch. Facts are inserted and deleted in-order (ie: `insert`ed facts may be `delete`d in the same transaction). `null` can be used as a wildcard in deleted facts. Does not throw an error when the facts to delete are not found.","href":"/reference/api/centralized-authorization-data/post-batch"},"description":{"compiledSource":"\"use strict\";\nconst {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(_components.p, {\n children: [\"Deletes and adds many facts in one atomic batch. Facts are inserted and deleted in-order (ie: \", _jsx(_components.code, {\n children: \"insert\"\n }), \"ed facts may be \", _jsx(_components.code, {\n children: \"delete\"\n }), \"d in the same transaction). \", _jsx(_components.code, {\n children: \"null\"\n }), \" can be used as a wildcard in deleted facts. Does not throw an error when the facts to delete are not found.\"]\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":{"openapi":"post /batch","title":null,"description":"Deletes and adds many facts in one atomic batch. Facts are inserted and deleted in-order (ie: `insert`ed facts may be `delete`d in the same transaction). `null` can be used as a wildcard in deleted facts. Does not throw an error when the facts to delete are not found.","href":"/reference/api/centralized-authorization-data/post-batch"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/osoinc/1de558d9e172e6f8/_nav-example.js"],"openApiReferenceData":{"operation":{"tags":["Centralized Authorization Data"],"description":"Deletes and adds many facts in one atomic batch. Facts are inserted and deleted in-order (ie: `insert`ed facts may be `delete`d in the same transaction). `null` can be used as a wildcard in deleted facts. Does not throw an error when the facts to delete are not found.","operationId":"post_batch","requestBody":"a175b62d-ae08-4545-8154-b70067e5670e","responses":{"200":"20a498a6-2995-4445-b008-1a836ee3014d","default":"66e229dc-4385-43f3-b8bc-199ed8babf77"},"security":["be9dabb2-61c2-4a92-9c76-6fa321b6eec7"],"x-codeSamples":[{"lang":"javascript","label":"Node.js","source":"import { Oso } from 'oso-cloud';\n\nconst apiKey = process.env.OSO_CLOUD_API_KEY;\nconst oso = new Oso(\"https://cloud.osohq.com\", apiKey);\n\n// Batch multiple operations\nconst user = { type: \"User\", id: \"alice\" };\nconst org = { type: \"Organization\", id: \"acme\" };\nconst repo = { type: \"Repository\", id: \"anvils\" };\n\nawait oso.batch((tx) => {\n // Insert new facts\n tx.insert([\"has_role\", user, \"owner\", org]);\n tx.insert([\"has_permission\", user, \"admin\", repo]);\n \n // Delete old facts\n tx.delete([\"has_role\", user, \"maintainer\", repo]);\n tx.delete([\"has_role\", user, \"member\", org]);\n});\n"},{"lang":"python","label":"Python","source":"import os\nfrom oso_cloud import Oso, Value\n\noso = Oso(api_key=os.environ.get('OSO_CLOUD_API_KEY', None))\n\n# Batch multiple operations\nuser = Value(\"User\", \"alice\")\norg = Value(\"Organization\", \"acme\")\nrepo = Value(\"Repository\", \"anvils\")\n\nwith oso.batch() as tx:\n # Insert new facts\n tx.insert((\"has_role\", user, \"owner\", org))\n tx.insert((\"has_permission\", user, \"admin\", repo))\n \n # Delete old facts\n tx.delete((\"has_role\", user, \"maintainer\", repo))\n tx.delete((\"has_role\", user, \"member\", org))\n"},{"lang":"go","label":"Go","source":"package main\n\nimport (\n \"log\"\n \"os\"\n oso \"github.com/osohq/go-oso-cloud/v2\"\n)\n\nfunc main() {\n apiKey := os.Getenv(\"OSO_CLOUD_API_KEY\")\n osoClient := oso.NewClient(\"https://cloud.osohq.com\", apiKey)\n\n// Batch multiple operations\nuser := oso.NewValue(\"User\", \"alice\")\norg := oso.NewValue(\"Organization\", \"acme\")\nrepo := oso.NewValue(\"Repository\", \"anvils\")\n\nerr := osoClient.Batch(func(tx oso.BatchTransaction) {\n // Insert new facts\n tx.Insert(oso.NewFact(\"has_role\", user, oso.String(\"owner\"), org))\n tx.Insert(oso.NewFact(\"has_permission\", user, oso.String(\"admin\"), repo))\n \n // Delete old facts\n tx.Delete(oso.NewFact(\"has_role\", user, oso.String(\"maintainer\"), repo))\n tx.Delete(oso.NewFactPattern(\"has_role\", user, nil, org))\n})\nif err != nil {\n log.Fatal(err)\n}\n}\n"},{"lang":"java","label":"Java","source":"package com.mycompany;\n\nimport java.io.IOException;\nimport com.osohq.oso_cloud.Oso;\nimport com.osohq.oso_cloud.api.ApiException;\nimport com.osohq.oso_cloud.api.Value;\n\npublic class App {\n public static void main(String[] args) {\n String apiKey = System.getenv(\"OSO_CLOUD_API_KEY\");\n Oso oso = new Oso(apiKey);\n \n try {\n // Batch multiple operations\n Value user = new Value(\"User\", \"alice\");\n Value org = new Value(\"Organization\", \"acme\");\n Value repo = new Value(\"Repository\", \"anvils\");\n \n oso.batch((tx) -> {\n // Insert new facts\n tx.insert(\"has_role\", user, \"owner\", org);\n tx.insert(\"has_permission\", user, \"admin\", repo);\n \n // Delete old facts\n tx.delete(\"has_role\", user, \"maintainer\", repo);\n tx.delete(\"has_role\", user, \"member\", org);\n });\n } catch (IOException | ApiException e) {\n System.err.println(\"Error: \" + e.getMessage());\n }\n }\n}\n"},{"lang":"ruby","label":"Ruby","source":"require 'oso-cloud'\n\napi_key = ENV.fetch('OSO_CLOUD_API_KEY', nil)\noso = OsoCloud::Oso.new(url: \"https://cloud.osohq.com\", api_key: api_key)\n\n# Batch multiple operations\nuser = OsoCloud::Value.new(type: \"User\", id: \"alice\")\norg = OsoCloud::Value.new(type: \"Organization\", id: \"acme\")\nrepo = OsoCloud::Value.new(type: \"Repository\", id: \"anvils\")\n\noso.batch do |tx|\n # Insert new facts\n tx.tell(\"has_role\", user, \"owner\", org)\n tx.tell(\"has_permission\", user, \"admin\", repo)\n \n # Delete old facts\n tx.delete(\"has_role\", user, \"maintainer\", repo)\n tx.delete(\"has_role\", user, \"member\", org)\nend\n"},{"lang":"csharp","label":"C#","source":"using OsoCloud;\n\nstring? apiKey = Environment.GetEnvironmentVariable(\"OSO_CLOUD_API_KEY\");\nvar oso = new Oso(\"https://api.osohq.com\", apiKey);\n\n// Batch multiple operations\nvar user = new Value(\"User\", \"alice\");\nvar org = new Value(\"Organization\", \"acme\");\nvar repo = new Value(\"Repository\", \"anvils\");\n\nawait oso.Batch(tx => {\n // Insert new facts\n tx.Insert(\"has_role\", user, \"owner\", org);\n tx.Insert(\"has_permission\", user, \"admin\", repo);\n \n // Delete old facts\n tx.Delete(\"has_role\", user, \"maintainer\", repo);\n tx.Delete(\"has_role\", user, \"member\", org);\n});\n"}],"method":"post","type":"path","servers":["f2f58deb-adbe-4826-8a30-0376170d46f8"],"path":"/batch","baseUrlOptions":["https://api.osohq.com/api/"],"title":"","codeSamples":[{"label":"Node.js","lang":"javascript","source":"import { Oso } from 'oso-cloud';\n\nconst apiKey = process.env.OSO_CLOUD_API_KEY;\nconst oso = new Oso(\"https://cloud.osohq.com\", apiKey);\n\n// Batch multiple operations\nconst user = { type: \"User\", id: \"alice\" };\nconst org = { type: \"Organization\", id: \"acme\" };\nconst repo = { type: \"Repository\", id: \"anvils\" };\n\nawait oso.batch((tx) => {\n // Insert new facts\n tx.insert([\"has_role\", user, \"owner\", org]);\n tx.insert([\"has_permission\", user, \"admin\", repo]);\n \n // Delete old facts\n tx.delete([\"has_role\", user, \"maintainer\", repo]);\n tx.delete([\"has_role\", user, \"member\", org]);\n});\n"},{"label":"Python","lang":"python","source":"import os\nfrom oso_cloud import Oso, Value\n\noso = Oso(api_key=os.environ.get('OSO_CLOUD_API_KEY', None))\n\n# Batch multiple operations\nuser = Value(\"User\", \"alice\")\norg = Value(\"Organization\", \"acme\")\nrepo = Value(\"Repository\", \"anvils\")\n\nwith oso.batch() as tx:\n # Insert new facts\n tx.insert((\"has_role\", user, \"owner\", org))\n tx.insert((\"has_permission\", user, \"admin\", repo))\n \n # Delete old facts\n tx.delete((\"has_role\", user, \"maintainer\", repo))\n tx.delete((\"has_role\", user, \"member\", org))\n"},{"label":"Go","lang":"go","source":"package main\n\nimport (\n \"log\"\n \"os\"\n oso \"github.com/osohq/go-oso-cloud/v2\"\n)\n\nfunc main() {\n apiKey := os.Getenv(\"OSO_CLOUD_API_KEY\")\n osoClient := oso.NewClient(\"https://cloud.osohq.com\", apiKey)\n\n// Batch multiple operations\nuser := oso.NewValue(\"User\", \"alice\")\norg := oso.NewValue(\"Organization\", \"acme\")\nrepo := oso.NewValue(\"Repository\", \"anvils\")\n\nerr := osoClient.Batch(func(tx oso.BatchTransaction) {\n // Insert new facts\n tx.Insert(oso.NewFact(\"has_role\", user, oso.String(\"owner\"), org))\n tx.Insert(oso.NewFact(\"has_permission\", user, oso.String(\"admin\"), repo))\n \n // Delete old facts\n tx.Delete(oso.NewFact(\"has_role\", user, oso.String(\"maintainer\"), repo))\n tx.Delete(oso.NewFactPattern(\"has_role\", user, nil, org))\n})\nif err != nil {\n log.Fatal(err)\n}\n}\n"},{"label":"Java","lang":"java","source":"package com.mycompany;\n\nimport java.io.IOException;\nimport com.osohq.oso_cloud.Oso;\nimport com.osohq.oso_cloud.api.ApiException;\nimport com.osohq.oso_cloud.api.Value;\n\npublic class App {\n public static void main(String[] args) {\n String apiKey = System.getenv(\"OSO_CLOUD_API_KEY\");\n Oso oso = new Oso(apiKey);\n \n try {\n // Batch multiple operations\n Value user = new Value(\"User\", \"alice\");\n Value org = new Value(\"Organization\", \"acme\");\n Value repo = new Value(\"Repository\", \"anvils\");\n \n oso.batch((tx) -> {\n // Insert new facts\n tx.insert(\"has_role\", user, \"owner\", org);\n tx.insert(\"has_permission\", user, \"admin\", repo);\n \n // Delete old facts\n tx.delete(\"has_role\", user, \"maintainer\", repo);\n tx.delete(\"has_role\", user, \"member\", org);\n });\n } catch (IOException | ApiException e) {\n System.err.println(\"Error: \" + e.getMessage());\n }\n }\n}\n"},{"label":"Ruby","lang":"ruby","source":"require 'oso-cloud'\n\napi_key = ENV.fetch('OSO_CLOUD_API_KEY', nil)\noso = OsoCloud::Oso.new(url: \"https://cloud.osohq.com\", api_key: api_key)\n\n# Batch multiple operations\nuser = OsoCloud::Value.new(type: \"User\", id: \"alice\")\norg = OsoCloud::Value.new(type: \"Organization\", id: \"acme\")\nrepo = OsoCloud::Value.new(type: \"Repository\", id: \"anvils\")\n\noso.batch do |tx|\n # Insert new facts\n tx.tell(\"has_role\", user, \"owner\", org)\n tx.tell(\"has_permission\", user, \"admin\", repo)\n \n # Delete old facts\n tx.delete(\"has_role\", user, \"maintainer\", repo)\n tx.delete(\"has_role\", user, \"member\", org)\nend\n"},{"label":"C#","lang":"csharp","source":"using OsoCloud;\n\nstring? apiKey = Environment.GetEnvironmentVariable(\"OSO_CLOUD_API_KEY\");\nvar oso = new Oso(\"https://api.osohq.com\", apiKey);\n\n// Batch multiple operations\nvar user = new Value(\"User\", \"alice\");\nvar org = new Value(\"Organization\", \"acme\");\nvar repo = new Value(\"Repository\", \"anvils\");\n\nawait oso.Batch(tx => {\n // Insert new facts\n tx.Insert(\"has_role\", user, \"owner\", org);\n tx.Insert(\"has_permission\", user, \"admin\", repo);\n \n // Delete old facts\n tx.Delete(\"has_role\", user, \"maintainer\", repo);\n tx.Delete(\"has_role\", user, \"member\", org);\n});\n"}],"requestExampleLanguages":["bash","python","javascript","go","java","ruby","csharp"],"requiredOnlyExamples":true,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"oneOf":[{"type":"object","description":"A grouped run of facts to insert or delete. Inserted facts must contain concrete fact args, but deleted facts may contain wildcards.","required":["inserts"],"properties":{"inserts":{"type":"array","items":{"description":"A pattern object for matching authorization-relevant data, ie: facts.","type":"object","required":["args","predicate"],"properties":{"predicate":{"type":"string","isRequired":true,"uniqueKey":"items.[INDEX].oneOf.0.inserts.items.[INDEX].predicate","typeLabel":"string"},"args":{"type":"array","items":{"type":"object","properties":{"type":{"oneOf":[{"type":"string","uniqueKey":"items.[INDEX].oneOf.0.inserts.items.[INDEX].args.items.[INDEX].type.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"items.[INDEX].oneOf.0.inserts.items.[INDEX].args.items.[INDEX].type.oneOf.1","typeLabel":"null"}],"uniqueKey":"items.[INDEX].oneOf.0.inserts.items.[INDEX].args.items.[INDEX].type","typeLabel":"string | null"},"id":{"oneOf":[{"type":"string","uniqueKey":"items.[INDEX].oneOf.0.inserts.items.[INDEX].args.items.[INDEX].id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"items.[INDEX].oneOf.0.inserts.items.[INDEX].args.items.[INDEX].id.oneOf.1","typeLabel":"null"}],"uniqueKey":"items.[INDEX].oneOf.0.inserts.items.[INDEX].args.items.[INDEX].id","typeLabel":"string | null"}},"uniqueKey":"items.[INDEX].oneOf.0.inserts.items.[INDEX].args.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"items.[INDEX].oneOf.0.inserts.items.[INDEX].args","typeLabel":"object[]"}},"uniqueKey":"items.[INDEX].oneOf.0.inserts.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"items.[INDEX].oneOf.0.inserts","typeLabel":"object[]"}},"uniqueKey":"items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","description":"A grouped run of facts to insert or delete. Inserted facts must contain concrete fact args, but deleted facts may contain wildcards.","required":["deletes"],"properties":{"deletes":{"type":"array","items":{"description":"A pattern object for matching authorization-relevant data, ie: facts.","type":"object","required":["args","predicate"],"properties":{"predicate":{"type":"string","isRequired":true,"uniqueKey":"items.[INDEX].oneOf.1.deletes.items.[INDEX].predicate","typeLabel":"string"},"args":{"type":"array","items":{"type":"object","properties":{"type":{"oneOf":[{"type":"string","uniqueKey":"items.[INDEX].oneOf.1.deletes.items.[INDEX].args.items.[INDEX].type.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"items.[INDEX].oneOf.1.deletes.items.[INDEX].args.items.[INDEX].type.oneOf.1","typeLabel":"null"}],"uniqueKey":"items.[INDEX].oneOf.1.deletes.items.[INDEX].args.items.[INDEX].type","typeLabel":"string | null"},"id":{"oneOf":[{"type":"string","uniqueKey":"items.[INDEX].oneOf.1.deletes.items.[INDEX].args.items.[INDEX].id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"items.[INDEX].oneOf.1.deletes.items.[INDEX].args.items.[INDEX].id.oneOf.1","typeLabel":"null"}],"uniqueKey":"items.[INDEX].oneOf.1.deletes.items.[INDEX].args.items.[INDEX].id","typeLabel":"string | null"}},"uniqueKey":"items.[INDEX].oneOf.1.deletes.items.[INDEX].args.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"items.[INDEX].oneOf.1.deletes.items.[INDEX].args","typeLabel":"object[]"}},"uniqueKey":"items.[INDEX].oneOf.1.deletes.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"items.[INDEX].oneOf.1.deletes","typeLabel":"object[]"}},"uniqueKey":"items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"items.[INDEX]","typeLabel":"object"},"uniqueKey":"","typeLabel":"object[]"},"examples":{"Example":{"title":"Example","value":[{"inserts":[{"predicate":"\u003cstring>","args":[{"type":"\u003cstring>","id":"\u003cstring>"}]}]}]}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"20a498a6-2995-4445-b008-1a836ee3014d":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"66e229dc-4385-43f3-b8bc-199ed8babf77":{"description":"","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"be9dabb2-61c2-4a92-9c76-6fa321b6eec7":{"ApiKey":{"description":"Requires an API key to access.","type":"http","scheme":"bearer","bearerFormat":"Bearer e_0123_123_token0123","scopes":[]}}},"servers":{"f2f58deb-adbe-4826-8a30-0376170d46f8":{"url":"https://api.osohq.com/api/"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"description":"Requires an API key to access.","type":"http","scheme":"bearer","bearerFormat":"Bearer e_0123_123_token0123","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Requires an API key to access.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"ApiKey","name":"Authorization"}],"title":"ApiKey"}]},"originalFileLocation":"reference/openapi.json"},"subdomain":"osoinc","siteName":"Oso Cloud Documentation","title":"Post batch - Oso Cloud Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-05T13:45:43.345Z","originalFileLocation":"reference/api/centralized-authorization-data/post-batch.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=\"Deletes and adds many facts in one atomic batch. Facts are inserted and deleted in-order (ie: inserted facts may be deleted in the same transaction). null can be used as a wildcard in deleted facts. Does not throw an error when the facts to delete are not found.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Oso Cloud Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_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=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Post batch - Oso Cloud Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Deletes and adds many facts in one atomic batch. Facts are inserted and deleted in-order (ie: inserted facts may be deleted in the same transaction). null can be used as a wildcard in deleted facts. Does not throw an error when the facts to delete are not found.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Oso Cloud Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.osohq.com/docs/reference/api/centralized-authorization-data/post-batch\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://osoinc.mintlify.app/_mintlify/api/og/v2?division=Facts\u0026amp;title=Post+batch\u0026amp;description=Deletes+and+adds+many+facts+in+one+atomic+batch.+Facts+are+inserted+and+deleted+in-order+%28ie%3A+%60insert%60ed+facts+may+be+%60delete%60d+in+the+same+transaction%29.+%60null%60\u0026amp;theme=eb85f6ae82e81d3487978aff\u0026amp;signature=9b7fc02acc3bcba0eaba41212c824ef59b342303b210775bde057c0119f56fea\">\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=\"Post batch - Oso Cloud Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Deletes and adds many facts in one atomic batch. Facts are inserted and deleted in-order (ie: inserted facts may be deleted in the same transaction). null can be used as a wildcard in deleted facts. Does not throw an error when the facts to delete are not found.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://osoinc.mintlify.app/_mintlify/api/og/v2?division=Facts\u0026amp;title=Post+batch\u0026amp;description=Deletes+and+adds+many+facts+in+one+atomic+batch.+Facts+are+inserted+and+deleted+in-order+%28ie%3A+%60insert%60ed+facts+may+be+%60delete%60d+in+the+same+transaction%29.+%60null%60\u0026amp;theme=eb85f6ae82e81d3487978aff\u0026amp;signature=9b7fc02acc3bcba0eaba41212c824ef59b342303b210775bde057c0119f56fea\">\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=\"/docs/mintlify-assets/_mintlify/favicons/osoinc/RDBykkEzsN_rr7aZ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Oso Cloud Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#392396\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.osohq.com/docs/reference/api/centralized-authorization-data/post-batch\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/reference/api/centralized-authorization-data/post-batch.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.osohq.com/#organization\",\"name\":\"Oso Cloud Documentation\",\"url\":\"https://www.osohq.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/osoinc/IZptQQUcDTzNnhFZ/logo/logo_black.svg?fit=max\u0026auto=format\u0026n=IZptQQUcDTzNnhFZ\u0026q=85\u0026s=a23ba87f23f09fee12a107724078979d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.osohq.com/docs#website\",\"name\":\"Oso Cloud Documentation\",\"url\":\"https://www.osohq.com/docs\",\"publisher\":{\"@id\":\"https://www.osohq.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.osohq.com/docs/reference/api/centralized-authorization-data/post-batch#webpage\",\"url\":\"https://www.osohq.com/docs/reference/api/centralized-authorization-data/post-batch\",\"name\":\"Post batch\",\"description\":\"Deletes and adds many facts in one atomic batch. Facts are inserted and deleted in-order (ie: inserted facts may be deleted in the same transaction). null can be used as a wildcard in deleted facts. Does not throw an error when the facts to delete are not found.\",\"dateModified\":\"2026-08-05T13:45:43.345Z\",\"isPartOf\":{\"@id\":\"https://www.osohq.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.osohq.com/docs/reference/api/centralized-authorization-data/post-batch#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.osohq.com/docs/reference/api/centralized-authorization-data/post-batch#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"HTTP API\",\"item\":\"https://www.osohq.com/docs/reference/api/policy/get-policy\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Post batch\",\"item\":\"https://www.osohq.com/docs/reference/api/centralized-authorization-data/post-batch\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://www.osohq.com/docs/reference/api/centralized-authorization-data/post-batch#apireference\",\"headline\":\"Post batch\",\"name\":\"Post batch\",\"description\":\"Deletes and adds many facts in one atomic batch. Facts are inserted and deleted in-order (ie: inserted facts may be deleted in the same transaction). null can be used as a wildcard in deleted facts. Does not throw an error when the facts to delete are not found.\",\"url\":\"https://www.osohq.com/docs/reference/api/centralized-authorization-data/post-batch\",\"mainEntityOfPage\":{\"@id\":\"https://www.osohq.com/docs/reference/api/centralized-authorization-data/post-batch#webpage\"},\"dateModified\":\"2026-08-05T13:45:43.345Z\",\"publisher\":{\"@id\":\"https://www.osohq.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.osohq.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Oso Cloud Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Oso Cloud Documentation","nav":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://osohq.com/blog"},{"anchor":"Status Page","icon":"wifi","href":"https://oso.statuspage.io/"}]},"tabs":[{"tab":"Oso for Agents","groups":[{"group":"Get Started","pages":[{"title":"Overview","href":"/oso-for-agents/overview"},{"title":"How It Works","href":"/oso-for-agents/how-it-works"},{"title":"Quickstart: Oso for Agents","sidebarTitle":"Quickstart","href":"/oso-for-agents/quickstart-coding-agents"}]},{"group":"Capabilities","pages":[{"title":"Shadow AI","href":"/oso-for-agents/shadow-ai"},{"title":"Connectors","href":"/oso-for-agents/connectors"},{"title":"Identity Sync","href":"/oso-for-agents/identity-sync"},{"title":"Session Monitoring","href":"/oso-for-agents/session-monitoring"},{"title":"Alerts","href":"/oso-for-agents/alerts"},{"title":"Content Tags","href":"/oso-for-agents/content-tags"},{"title":"Policies","href":"/oso-for-agents/policies"}]},{"group":"Deployment Models","pages":[{"title":"Edge Proxy","href":"/oso-for-agents/integrations/edge-proxy"},{"title":"Browser Extension","href":"/oso-for-agents/integrations/browser-extension"},{"title":"Tailscale Aperture","href":"/oso-for-agents/integrations/tailscale-aperture"},{"group":"Managed Deployment","pages":[{"title":"Overview","href":"/oso-for-agents/integrations/managed-deployment"},{"title":"Jamf","href":"/oso-for-agents/integrations/managed-deployment/jamf"},{"title":"Iru","href":"/oso-for-agents/integrations/managed-deployment/iru"},{"title":"Rippling","href":"/oso-for-agents/integrations/managed-deployment/rippling"}]}]},{"group":"Integrations \u0026 Connections","pages":[{"group":"EDR","pages":[{"title":"EDR","sidebarTitle":"Overview","href":"/oso-for-agents/integrations/edr"},{"title":"CrowdStrike","href":"/oso-for-agents/integrations/edr/crowdstrike"},{"title":"SentinelOne","href":"/oso-for-agents/integrations/edr/sentinelone"}]},{"title":"Slack","href":"/oso-for-agents/integrations/slack"},{"title":"SIEM export","href":"/oso-for-agents/integrations/siem-export"},{"group":"Identity Providers","pages":[{"title":"Okta","href":"/okta"}]}]},{"group":"Self-Hosting","pages":[{"title":"Overview","href":"/oso-for-agents/self-hosting/overview"},{"title":"Requirements","href":"/oso-for-agents/self-hosting/requirements"},{"title":"Installation","href":"/oso-for-agents/self-hosting/installation"},{"title":"Operations","href":"/oso-for-agents/self-hosting/operations"},{"title":"Security","href":"/oso-for-agents/self-hosting/security"}]},{"group":"Reference","pages":[{"title":"Supported Agents","href":"/oso-for-agents/supported-agents"},{"title":"Data Privacy","href":"/oso-for-agents/data-privacy"}]}]},{"tab":"Oso for Apps","dropdowns":[{"dropdown":"Docs","icon":"book-open","groups":[{"group":"Get Started","pages":[{"title":"An Introduction to Oso Cloud","sidebarTitle":"Introduction","href":"/get-started/introduction"},{"title":"Oso Cloud Quickstart","sidebarTitle":"Quickstart","href":"/get-started/quickstart"}]},{"group":"Develop","pages":[{"group":"Local Development","pages":[{"title":"Environment Setup","sidebarTitle":"Environment setup","href":"/develop/local-dev/env-setup"},{"title":"Oso Dev Server","sidebarTitle":"Oso Dev Server","href":"/develop/local-dev/oso-dev-server"},{"title":"Oso Migrate (Beta)","sidebarTitle":"Oso Migrate","href":"/develop/local-dev/oso-migrate"},{"title":"Oso MCP Server","sidebarTitle":"Oso MCP Server","href":"/develop/local-dev/mcp"}]},{"group":"Write Policies","pages":[{"title":"Overview of Polar Language and Syntax","sidebarTitle":"Overview","href":"/develop/policies/overview"},{"title":"Model Role-Based Access Control (RBAC)","sidebarTitle":"RBAC","href":"/develop/policies/rbac"},{"title":"Model Relationship-Based Access Control (ReBAC)","sidebarTitle":"ReBAC","href":"/develop/policies/rebac"},{"title":"Model Attribute-Based Access Control (ABAC)","sidebarTitle":"ABAC","href":"/develop/policies/abac"},{"title":"Fine-grained Authorization (FGA)","sidebarTitle":"FGA","href":"/develop/policies/fga"},{"title":"Model Field-Level Authorization","sidebarTitle":"Field-Level Authorization","href":"/develop/policies/field-level-authorization"},{"title":"Policy Preview","href":"/develop/policies/policy-preview"},{"group":"Patterns","pages":[{"title":"Resource Creation","sidebarTitle":"Resource Creation","href":"/develop/policies/patterns/resource-creation"},{"title":"Conditional Roles","sidebarTitle":"Conditional Roles","href":"/develop/policies/patterns/conditional-roles"},{"title":"Custom Roles","sidebarTitle":"Custom Roles","href":"/develop/policies/patterns/custom-roles"},{"title":"Entitlements","sidebarTitle":"Entitlements","href":"/develop/policies/patterns/entitlements"},{"title":"Impersonation","sidebarTitle":"Impersonation","href":"/develop/policies/patterns/impersonation"},{"title":"Organization Hierarchies","sidebarTitle":"Organization Hierarchies","href":"/develop/policies/patterns/organizational-hierarchy"},{"title":"Resource Sharing","sidebarTitle":"Resource Sharing","href":"/develop/policies/patterns/resource-sharing"},{"title":"Time-based Checks","sidebarTitle":"Time-based Checks","href":"/develop/policies/patterns/time-based-checks"},{"title":"User Groups","sidebarTitle":"User Groups","href":"/develop/policies/patterns/user-groups"}]}]},{"group":"Manage Facts","pages":[{"title":"Overview of Facts","sidebarTitle":"Overview","href":"/develop/facts/overview"},{"title":"Insert facts","sidebarTitle":"Insert facts","href":"/develop/facts/insert-facts"},{"title":"Update facts","sidebarTitle":"Update facts","href":"/develop/facts/update-facts"},{"title":"Sync facts","sidebarTitle":"Sync facts","href":"/develop/facts/sync-facts"},{"title":"Export Facts","sidebarTitle":"Export facts","href":"/develop/facts/export-facts"},{"title":"Context Facts","sidebarTitle":"Context facts","href":"/develop/facts/context-facts"},{"title":"Local Authorization","sidebarTitle":"Local Authorization","href":"/develop/facts/local-authorization"}]},{"group":"Enforce Permissions","pages":[{"title":"Authorize Requests","sidebarTitle":"Authorize requests","href":"/develop/enforce/authorize-requests"},{"title":"Enforcement strategies","sidebarTitle":"Enforcement strategies","href":"/develop/enforce/enforcement-strategies"},{"title":"Query Oso Cloud","sidebarTitle":"Query Oso Cloud","href":"/develop/enforce/query-facts"},{"title":"List filtering","sidebarTitle":"List filtering","href":"/develop/enforce/list-filtering"}]},{"group":"Troubleshooting","pages":[{"title":"Logs and auditing","sidebarTitle":"Logs","href":"/develop/troubleshooting/logs"},{"title":"Debugging a Policy","sidebarTitle":"Debugging","href":"/develop/troubleshooting/debugging"},{"title":"Query performance","sidebarTitle":"Query performance","href":"/develop/troubleshooting/query-performance"}]}]},{"group":"Deploy and Manage","pages":[{"title":"Deployment models","sidebarTitle":"Deployment models","href":"/deploy/deployment-models"},{"title":"Oso Fallback - Hybrid Deployment","sidebarTitle":"Fallback nodes","href":"/deploy/fallback-nodes"},{"title":"Backup \u0026 Point-in-time Recovery","sidebarTitle":"Backups and recovery","href":"/deploy/backups-and-recovery"},{"title":"CI/CD with Oso Cloud","sidebarTitle":"CI/CD","href":"/deploy/ci-cd"},{"group":"Account Management","pages":[{"title":"Configuring your account","sidebarTitle":"Account configuration","href":"/deploy/account-management/configuration"},{"title":"Service limits","sidebarTitle":"Service limits","href":"/deploy/account-management/rate-limits"},{"title":"Single Sign-On (SSO) Configuration","sidebarTitle":"SSO","href":"/deploy/account-management/sso"}]}]}]},{"dropdown":"Reference","icon":"square-terminal","groups":[{"group":"Polar","pages":[{"title":"The Polar Language in Oso Cloud","sidebarTitle":"Introduction","href":"/reference/polar/introduction"},{"title":"Polar Rules and Facts","sidebarTitle":"Rules and Facts","href":"/reference/polar/rules-and-facts"},{"title":"Facts as Data","sidebarTitle":"Facts as Data","href":"/reference/polar/facts-as-data"},{"title":"Polar Built-In Types","sidebarTitle":"Types","href":"/reference/polar/types"},{"title":"Polar Operators","sidebarTitle":"Operators","href":"/reference/polar/operators"},{"title":"Resource Blocks","sidebarTitle":"Resource Blocks","href":"/reference/polar/resource-blocks"},{"title":"Polar Polymorphism","sidebarTitle":"Extends","href":"/reference/polar/extends"},{"title":"Polar Built-In Constants","sidebarTitle":"Constants","href":"/reference/polar/constants"},{"title":"Polar Tests","sidebarTitle":"Tests","href":"/reference/polar/tests"}]},{"group":"HTTP API","pages":[{"group":"Policies","pages":[{"openapi":"get /policy","title":null,"href":"/reference/api/policy/get-policy"},{"openapi":"get /policy_metadata","title":null,"href":"/reference/api/policy/get-policy_metadata"},{"openapi":"post /policy","title":null,"description":"Updates the policy in Oso Cloud. The policy should be represented as a string containing [Polar](https://www.osohq.com/docs/modeling-in-polar/reference) code.","href":"/reference/api/policy/post-policy"}]},{"group":"Facts","pages":[{"openapi":"post /batch","title":null,"href":"/reference/api/centralized-authorization-data/post-batch"},{"openapi":"post /clear_data","title":null,"description":null,"href":"/reference/api/centralized-authorization-data/post-clear_data"},{"openapi":"post /facts","deprecated":true,"title":null,"href":"/reference/api/centralized-authorization-data/post-facts"},{"openapi":"post /bulk","deprecated":true,"title":null,"href":"/reference/api/centralized-authorization-data/post-bulk"},{"openapi":"post /bulk_load","deprecated":true,"title":null,"href":"/reference/api/centralized-authorization-data/post-bulk_load"},{"openapi":"post /bulk_delete","deprecated":true,"title":null,"href":"/reference/api/centralized-authorization-data/post-bulk_delete"},{"openapi":"delete /facts","deprecated":true,"title":null,"href":"/reference/api/centralized-authorization-data/delete-facts"}]},{"group":"Authorization Check","pages":[{"openapi":"post /actions","title":null,"href":"/reference/api/check-api/post-actions"},{"openapi":"post /authorize_resources","title":null,"href":"/reference/api/check-api/post-authorize_resources"},{"openapi":"post /authorize","title":null,"href":"/reference/api/check-api/post-authorize"},{"openapi":"post /evaluate_query","title":null,"href":"/reference/api/check-api/post-evaluate_query"},{"openapi":"post /list","title":null,"href":"/reference/api/check-api/post-list"},{"openapi":"post /query","deprecated":true,"title":null,"href":"/reference/api/check-api/post-query"}]},{"group":"Local Authorization Check","pages":[{"openapi":"post /actions_query","title":null,"href":"/reference/api/local-check-api/post-actions_query"},{"openapi":"post /authorize_query","title":null,"href":"/reference/api/local-check-api/post-authorize_query"},{"openapi":"post /evaluate_query_local","title":null,"href":"/reference/api/local-check-api/post-evaluate_query_local"},{"openapi":"post /list_query","title":null,"href":"/reference/api/local-check-api/post-list_query"}]},{"group":"Policy","pages":[{"title":"Get policy","deprecated":null,"version":null,"openapi":"/reference/openapi.json get /policy","href":"/api-reference/policy/get-policy"},{"title":"Post policy","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /policy","href":"/api-reference/policy/post-policy"},{"title":"Get policy metadata","deprecated":null,"version":null,"openapi":"/reference/openapi.json get /policy_metadata","href":"/api-reference/policy/get-policy_metadata"}]},{"group":"Centralized Authorization Data","pages":[{"title":"Post facts","deprecated":true,"version":null,"openapi":"/reference/openapi.json post /facts","href":"/api-reference/centralized-authorization-data/post-facts"},{"title":"Delete facts","deprecated":true,"version":null,"openapi":"/reference/openapi.json delete /facts","href":"/api-reference/centralized-authorization-data/delete-facts"},{"title":"Post bulk load","deprecated":true,"version":null,"openapi":"/reference/openapi.json post /bulk_load","href":"/api-reference/centralized-authorization-data/post-bulk_load"},{"title":"Post bulk delete","deprecated":true,"version":null,"openapi":"/reference/openapi.json post /bulk_delete","href":"/api-reference/centralized-authorization-data/post-bulk_delete"},{"title":"Post bulk","deprecated":true,"version":null,"openapi":"/reference/openapi.json post /bulk","href":"/api-reference/centralized-authorization-data/post-bulk"},{"title":"Post batch","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /batch","href":"/api-reference/centralized-authorization-data/post-batch"},{"title":"Post clear data","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /clear_data","href":"/api-reference/centralized-authorization-data/post-clear_data"}]},{"group":"Check API","pages":[{"title":"Post authorize","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /authorize","href":"/api-reference/check-api/post-authorize"},{"title":"Post authorize resources","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /authorize_resources","href":"/api-reference/check-api/post-authorize_resources"},{"title":"Post list","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /list","href":"/api-reference/check-api/post-list"},{"title":"Post actions","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /actions","href":"/api-reference/check-api/post-actions"},{"title":"Post query","deprecated":true,"version":null,"openapi":"/reference/openapi.json post /query","href":"/api-reference/check-api/post-query"},{"title":"Post evaluate query","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /evaluate_query","href":"/api-reference/check-api/post-evaluate_query"}]},{"group":"Local Check API","pages":[{"title":"Post actions query","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /actions_query","href":"/api-reference/local-check-api/post-actions_query"},{"title":"Post authorize query","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /authorize_query","href":"/api-reference/local-check-api/post-authorize_query"},{"title":"Post list query","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /list_query","href":"/api-reference/local-check-api/post-list_query"},{"title":"Post evaluate query local","deprecated":null,"version":null,"openapi":"/reference/openapi.json post /evaluate_query_local","href":"/api-reference/local-check-api/post-evaluate_query_local"}]}]},{"group":"SDKs","pages":[{"title":"Oso Cloud SDKs","sidebarTitle":"Overview","href":"/reference/sdks/overview"},{"title":"Installation and Setup","sidebarTitle":"Install","href":"/reference/sdks/install"},{"title":"Policy Management","sidebarTitle":"Policies","href":"/reference/sdks/policies"},{"title":"Facts Management","sidebarTitle":"Facts","href":"/reference/sdks/facts"},{"title":"Authorization Checks","sidebarTitle":"Authorization Checks","href":"/reference/sdks/authorization-checks"},{"title":"Local Authorization","sidebarTitle":"Local Authorization","href":"/reference/sdks/local-authorization"},{"title":"Migration Guide","sidebarTitle":"Migration Guide","href":"/reference/sdks/migration-guide"},{"title":"SDK Specific Guidance","sidebarTitle":"SDK Specific Guidance","href":"/reference/sdks/sdk-specific-guidance"},{"group":"Integrations","pages":[{"title":"SQLAlchemy Local Authorization Integration","sidebarTitle":"SQLAlchemy","href":"/reference/sdks/integrations/sqlalchemy"},{"title":"Mcp","href":"/reference/sdks/integrations/mcp"}]},{"group":"Changelog","pages":[{"title":"What's New in Oso Cloud","sidebarTitle":"What's New","href":"/reference/sdks/changelog/whats-new"},{"title":"CLI Changelog","sidebarTitle":"CLI","href":"/reference/sdks/changelog/oso-cloud-cli"},{"title":"Node.js SDK Changelog","sidebarTitle":"Node.js","href":"/reference/sdks/changelog/nodejs"},{"title":"Python SDK Changelog","sidebarTitle":"Python","href":"/reference/sdks/changelog/python"},{"title":"Ruby SDK Changelog","sidebarTitle":"Ruby","href":"/reference/sdks/changelog/ruby"},{"title":"Java SDK Changelog","sidebarTitle":"Java","href":"/reference/sdks/changelog/java"},{"title":"Go SDK Changelog","sidebarTitle":"Go","href":"/reference/sdks/changelog/go"},{"title":".NET SDK Changelog","sidebarTitle":".NET","href":"/reference/sdks/changelog/dotnet"},{"title":"Fallback Node Changelog","sidebarTitle":"Fallback Node","href":"/reference/sdks/changelog/fallback"},{"title":"Dev Server Changelog","sidebarTitle":"Dev Server","href":"/reference/sdks/changelog/oso-dev-server"},{"title":"VSCode Extension Changelog","sidebarTitle":"VSCode Extension","href":"/reference/sdks/changelog/vscode-extension"}]}]}]},{"dropdown":"Learn","icon":"graduation-cap","groups":[{"group":"Tutorials","pages":[{"title":"An End-to-End Example Securing a Real World App with Oso Cloud","sidebarTitle":"End-to-End Example","href":"/learn/tutorials/end-to-end-example"},{"title":"An illustration of a local development workflow for Oso Cloud","sidebarTitle":"Workflow Walkthrough","href":"/learn/tutorials/workflow-walkthrough"}]},{"group":"Guides","pages":[{"group":"Adopt Local Authorization","pages":[{"title":"Getting started","href":"/learn/guides/adopt-local-authorization/getting-started"},{"title":"Extract authorization logic","href":"/learn/guides/adopt-local-authorization/extract-logic"},{"title":"Implement in Oso Cloud","href":"/learn/guides/adopt-local-authorization/implement-in-oso-cloud"},{"title":"Send data as context facts","href":"/learn/guides/adopt-local-authorization/data-as-context-facts"},{"title":"Replace Context Facts with Local Authorization","sidebarTitle":"Replace with local authorization","href":"/learn/guides/adopt-local-authorization/replace-with-local-authorization"},{"title":"Authorize with Oso Cloud","href":"/learn/guides/adopt-local-authorization/authorize-with-oso-cloud"}]},{"title":"How to map relational data to facts","sidebarTitle":"Map Relational Data to Facts","href":"/learn/guides/map-relational-data-to-facts"},{"title":"Best Practices for Frontend Authorization","sidebarTitle":"Frontend (UI)","href":"/learn/guides/ui"},{"title":"Integrating Authentication (Identity) Data","sidebarTitle":"Authentication","href":"/learn/guides/authentication"}]}]}]}]},"basePath":"","title":"Post batch - Oso Cloud Documentation","buildId":"dpl_6cCEiK8XNNvaLBBkWzcBhdE9QfLC","deploymentId":"dpl_6cCEiK8XNNvaLBBkWzcBhdE9QfLC","dynamics":["10e4515597","c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["BannerMarkdown-CGuHEvQW.js","dist-B66mVNPp.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-BcghKhHb.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","OpenApiReferenceProvider-CLz2_Z5D.js","utils-7A5jZhOT.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BVWmkKuv.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-4SOfrh0F.js","snippetPresets-CMc8KicP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Ba9tX7z3.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-Be8krXvv.js","shallow-CBC3K1uB.js","getApiPlaygroundDisplay-4tKcUAYo.js","CodeSnippet-C1Xa06ft.js","CodeSnippets-vqiz27A_.js","Page-DeQN5MDd.js","getPastedJson-NUwRfM32.js","icon-DkIVqWh9.js","MethodPill-qmhT7_wz.js","DuplicateIcon-_gWp1vhn.js","createIcon-NA1p_TVA.js","DynamicMarkdown-Bas9A7wq.js","SectionHeading-a1cS-24U.js","axios-vUo_bRtp.js","Markdown-D3ZTwq_a.js","AssistantPageLink-DmooSyTN.js"]}