Each entry carries an optional [Precondition]. Setting it to
DoesNotExist makes the entry a strict insert; Matches(v) rejects
the batch unless the rule’s current version is v; omitting it
(None) is unconditional. The whole batch is atomic: any failed
precondition or cap-exceeded condition rolls back the rest.
None on a field means "unlimited" (no rule constrains this dimension).
Under the bilrost feature this type is also the wire shape persisted
inside [crate::PersistedRule]; under serde it's the JSON wire shape
for the admin REST model — adding a new limit kind here means allocating
a fresh bilrost(tag(...)) next to the new field.
Optimistic-concurrency guard. { "type": "matches", "version": v }
requires the rule's current version to be v;
{ "type": "does_not_exist" } requires the rule to be absent
(strict insert); { "type": "none" } (or omitted) is
unconditional.
None on a field means "unlimited" (no rule constrains this dimension).
Under the bilrost feature this type is also the wire shape persisted
inside [crate::PersistedRule]; under serde it's the JSON wire shape
for the admin REST model — adding a new limit kind here means allocating
a fresh bilrost(tag(...)) next to the new field.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Restate","description":"Restate is the simplest way to build resilient applications.","colors":{"primary":"#4752c4","light":"#7a87e1","dark":"#4752c4"},"logo":{"light":"https://mintcdn.com/restate-6d46e1dc/0MkLgffDAGHkNDIZ/logo/light.svg?fit=max\u0026auto=format\u0026n=0MkLgffDAGHkNDIZ\u0026q=85\u0026s=70e648c2608af2d2c33dc26b3bce13d3","dark":"https://mintcdn.com/restate-6d46e1dc/0MkLgffDAGHkNDIZ/logo/dark.svg?fit=max\u0026auto=format\u0026n=0MkLgffDAGHkNDIZ\u0026q=85\u0026s=5be48044922541993e0e472f203bca46","href":"https://restate.dev"},"favicon":"https://mintcdn.com/restate-6d46e1dc/en_t8BH_S2cXTlbv/favicon.svg?fit=max\u0026auto=format\u0026n=en_t8BH_S2cXTlbv\u0026q=85\u0026s=d282cb3c3124106eca71fa9e9121043f","api":{"playground":{"display":"simple"}},"appearance":{"default":"light","strict":true},"background":{"decoration":"gradient"},"navbar":{"links":[{"icon":"discord","href":"https://discord.restate.dev","label":""},{"icon":"slack","href":"https://slack.restate.dev","label":""},{"icon":"github","href":"https://github.com/restatedev/restate","label":""}]},"footer":{"socials":{"website":"https://restate.dev","github":"https://github.com/restatedev/restate","discord":"https://discord.restate.dev","slack":"https://slack.restate.dev","youtube":"https://www.youtube.com/@restatedev","linkedin":"https://linkedin.com/company/restatedev","x":"https://x.com/restatedev","bluesky":"https://bsky.app/profile/restate.dev"}},"fonts":{"heading":{"family":"Rubik"},"body":{"family":"Manrope"}},"integrations":{"gtm":{"tagId":"GTM-TKTFM2CK"},"cookies":{"key":"restate_cookie_consent","value":"granted"}},"contextual":{"options":["chatgpt","claude","copy"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"restate-6d46e1dc","hasAudioNarration":false,"actualSubdomain":"restate-6d46e1dc","customDomains":["docs.restate.dev"],"gitSource":{"type":"github","owner":"restatedev","repo":"docs-restate","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae45a2c4ebd7542833d5ef8","clientVersion":"0.0.4088","searchFilterCounts":[{"language":"default","tag":"Docs","count":150},{"language":"default","tag":"SDKs","count":55},{"language":"default","tag":"References","count":50},{"language":"default","tag":"APIs","count":39},{"language":"default","tag":"AI / Agents","count":34},{"language":"default","tag":"Admin API","count":34},{"language":"default","tag":"Restate Cloud / BYOC / OSS","count":22},{"language":"default","tag":"Services","count":21},{"language":"default","tag":"Self-hosted Restate","count":17},{"language":"default","tag":"Learn","count":16}]},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":false,"deflection":{"enabled":false,"email":"[email protected]"}},"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":"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":"editor-metadata","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}],"privacy":{"consentBanner":{"enabled":false}},"googleFontsInlined":true},"customCss":[{"filePath":"styles.css","content":"@font-face{font-family:'Rubik';src:url('https://fonts.gstatic.com/s/rubik/v28/iJWKBXyIfDnIV7nBrXw.woff2');font-weight:normal;font-style:normal;font-display:swap}h1,h2,h3{font-family:'Rubik';letter-spacing:normal!important}.hidden-tabs [data-component-part=\"tabs-list\"]{display:none!important}.hidden-tabs .tabs-list{display:none!important}[data-component-part=\"tabs-list\"]{flex-wrap:wrap!important;row-gap:0.25rem}[data-component-part=\"tab-button\"][data-active=\"true\"] .tab-icon[src=\"/img/cloud-providers/aws-lambda.svg\"]{content:url(\"/img/cloud-providers/aws-lambda-primary.svg\")}[data-component-part=\"tab-button\"][data-active=\"true\"] .tab-icon[src=\"/img/cloud-providers/cloudflare-workers.svg\"]{content:url(\"/img/cloud-providers/cloudflare-workers-primary.svg\")}[data-component-part=\"tab-button\"][data-active=\"true\"] .tab-icon[src=\"/img/cloud-providers/docker.svg\"]{content:url(\"/img/cloud-providers/docker-primary.svg\")}[data-component-part=\"tab-button\"][data-active=\"true\"] .tab-icon[src=\"/img/cloud-providers/google-cloud-run.svg\"]{content:url(\"/img/cloud-providers/google-cloud-run-primary.svg\")}[data-component-part=\"tab-button\"][data-active=\"true\"] .tab-icon[src=\"/img/cloud-providers/kubernetes.svg\"]{content:url(\"/img/cloud-providers/kubernetes-primary.svg\")}[data-component-part=\"tab-button\"][data-active=\"true\"] .tab-icon[src=\"/img/cloud-providers/other-serverless.svg\"]{content:url(\"/img/cloud-providers/other-serverless-primary.svg\")}[data-component-part=\"tab-button\"][data-active=\"true\"] .tab-icon[src=\"/img/cloud-providers/vercel.svg\"]{content:url(\"/img/cloud-providers/vercel-primary.svg\")}[data-component-part=\"tab-button\"][data-active=\"true\"] .tab-icon[src=\"/img/languages/go.svg\"]{content:url(\"/img/languages/go-primary.svg\")}[data-component-part=\"tab-button\"][data-active=\"true\"] .tab-icon[src=\"/img/languages/java.svg\"]{content:url(\"/img/languages/java-primary.svg\")}[data-component-part=\"tab-button\"][data-active=\"true\"] .tab-icon[src=\"/img/languages/kotlin.svg\"]{content:url(\"/img/languages/kotlin-primary.svg\")}[data-component-part=\"tab-button\"][data-active=\"true\"] .tab-icon[src=\"/img/languages/python.svg\"]{content:url(\"/img/languages/python-primary.svg\")}[data-component-part=\"tab-button\"][data-active=\"true\"] .tab-icon[src=\"/img/languages/ruby.svg\"]{content:url(\"/img/languages/ruby-primary.svg\")}[data-component-part=\"tab-button\"][data-active=\"true\"] .tab-icon[src=\"/img/languages/rust.svg\"]{content:url(\"/img/languages/rust-primary.svg\")}[data-component-part=\"tab-button\"][data-active=\"true\"] .tab-icon[src=\"/img/languages/typescript.svg\"]{content:url(\"/img/languages/typescript-primary.svg\")}[data-component-part=\"tab-button\"][data-active=\"true\"] .tab-icon[src=\"/logo/restate-cloud-mini.svg\"]{content:url(\"/logo/restate-cloud-mini-primary.svg\")}[data-component-part=\"tab-button\"][data-active=\"true\"] .tab-icon[src=\"/logo/restate-mini.svg\"]{content:url(\"/logo/restate-mini-primary.svg\")}li[data-active-nav-item=\"true\"] img[src=\"/img/cloud-providers/aws-lambda.svg\"]{content:url(\"/img/cloud-providers/aws-lambda-primary.svg\")}li[data-active-nav-item=\"true\"] img[src=\"/img/cloud-providers/cloudflare-workers.svg\"]{content:url(\"/img/cloud-providers/cloudflare-workers-primary.svg\")}li[data-active-nav-item=\"true\"] img[src=\"/img/cloud-providers/docker.svg\"]{content:url(\"/img/cloud-providers/docker-primary.svg\")}li[data-active-nav-item=\"true\"] img[src=\"/img/cloud-providers/google-cloud-run.svg\"]{content:url(\"/img/cloud-providers/google-cloud-run-primary.svg\")}li[data-active-nav-item=\"true\"] img[src=\"/img/cloud-providers/kubernetes.svg\"]{content:url(\"/img/cloud-providers/kubernetes-primary.svg\")}li[data-active-nav-item=\"true\"] img[src=\"/img/cloud-providers/other-serverless.svg\"]{content:url(\"/img/cloud-providers/other-serverless-primary.svg\")}li[data-active-nav-item=\"true\"] img[src=\"/img/cloud-providers/vercel.svg\"]{content:url(\"/img/cloud-providers/vercel-primary.svg\")}li[data-active-nav-item=\"true\"] img[src=\"/img/languages/go.svg\"]{content:url(\"/img/languages/go-primary.svg\")}li[data-active-nav-item=\"true\"] img[src=\"/img/languages/java.svg\"]{content:url(\"/img/languages/java-primary.svg\")}li[data-active-nav-item=\"true\"] img[src=\"/img/languages/kotlin.svg\"]{content:url(\"/img/languages/kotlin-primary.svg\")}li[data-active-nav-item=\"true\"] img[src=\"/img/languages/python.svg\"]{content:url(\"/img/languages/python-primary.svg\")}li[data-active-nav-item=\"true\"] img[src=\"/img/languages/ruby.svg\"]{content:url(\"/img/languages/ruby-primary.svg\")}li[data-active-nav-item=\"true\"] img[src=\"/img/languages/rust.svg\"]{content:url(\"/img/languages/rust-primary.svg\")}li[data-active-nav-item=\"true\"] img[src=\"/img/languages/typescript.svg\"]{content:url(\"/img/languages/typescript-primary.svg\")}li[data-active-nav-item=\"true\"] img[src=\"/logo/restate-cloud-mini.svg\"]{content:url(\"/logo/restate-cloud-mini-primary.svg\")}li[data-active-nav-item=\"true\"] img[src=\"/logo/restate-mini.svg\"]{content:url(\"/logo/restate-mini-primary.svg\")}#cc-main{--cc-btn-border-radius: 0.75rem;--cc-btn-primary-bg: #2563eb;--cc-btn-primary-color: #fff;--cc-btn-primary-border-color: transparent;--cc-btn-primary-hover-bg: #1d4ed8;--cc-btn-secondary-bg: #fff;--cc-btn-secondary-color: #14151a;--cc-btn-secondary-border-color: #dee0e3;--cc-btn-secondary-hover-bg: #f3f4f6}"}],"page":{"pagePath":"admin-api/rule/upsert-a-batch-of-rules","slug":"/admin-api/rule/upsert-a-batch-of-rules","pageMetadata":{"title":"Upsert a batch of rules.","description":"Each entry carries an optional [`Precondition`]. Setting it to\n`DoesNotExist` makes the entry a strict insert; `Matches(v)` rejects\nthe batch unless the rule's current version is `v`; omitting it\n(`None`) is unconditional. The whole batch is atomic: any failed\nprecondition or cap-exceeded condition rolls back the rest.","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json put /limits/rules","href":"/admin-api/rule/upsert-a-batch-of-rules","autogeneratedByOpenApi":true},"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: [\"Each entry carries an optional [\", _jsx(_components.code, {\n children: \"Precondition\"\n }), \"]. Setting it to\\n\", _jsx(_components.code, {\n children: \"DoesNotExist\"\n }), \" makes the entry a strict insert; \", _jsx(_components.code, {\n children: \"Matches(v)\"\n }), \" rejects\\nthe batch unless the rule’s current version is \", _jsx(_components.code, {\n children: \"v\"\n }), \"; omitting it\\n(\", _jsx(_components.code, {\n children: \"None\"\n }), \") is unconditional. The whole batch is atomic: any failed\\nprecondition or cap-exceeded condition rolls back the rest.\"]\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":"Upsert a batch of rules.","description":"Each entry carries an optional [`Precondition`]. Setting it to\n`DoesNotExist` makes the entry a strict insert; `Matches(v)` rejects\nthe batch unless the rule's current version is `v`; omitting it\n(`None`) is unconditional. The whole batch is atomic: any failed\nprecondition or cap-exceeded condition rolls back the rest.","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json put /limits/rules","href":"/admin-api/rule/upsert-a-batch-of-rules","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/restate-6d46e1dc/fe33ed8c8f6baacd/matomo.js","/_mintlify/custom/restate-6d46e1dc/4d0b5d686abf67ad/scarf.js","/_mintlify/custom/restate-6d46e1dc/28474ce7323ba556/cookie-consent.js"],"openApiReferenceData":{"operation":{"tags":["rule"],"summary":"Upsert a batch of rules.","description":"Each entry carries an optional [`Precondition`]. Setting it to\n`DoesNotExist` makes the entry a strict insert; `Matches(v)` rejects\nthe batch unless the rule's current version is `v`; omitting it\n(`None`) is unconditional. The whole batch is atomic: any failed\nprecondition or cap-exceeded condition rolls back the rest.","operationId":"upsert_rules","requestBody":"a6f22b62-4ea9-4a17-bf6a-fc35ea4ba798","responses":{"200":"7df5e564-cb38-44c9-8095-ce408dfd5c65","409":"2628207d-7e10-4814-a4ca-9116b7f71dab","422":"455d6ce4-2196-46f1-a8c2-2b5f6719c604","500":"8c12f8dc-ec66-465a-a8ba-0e439867dd13"},"method":"put","type":"path","servers":[],"security":[],"path":"/limits/rules","baseUrlOptions":[],"title":"Upsert a batch of rules.","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","description":"One entry in the body of `PUT /limits/rules`.\n\nEach entry carries a fully-specified rule body plus an optional\n[`Precondition`]. Omitting the `precondition` field defaults to\n`Precondition::None` (unconditional upsert).","required":["pattern"],"properties":{"pattern":{"type":"string","description":"The pattern that selects which scope/limit-key combinations the\nrule applies to. Examples: `\"*\"`, `\"scope1/*\"`, `\"scope1/foo/bar\"`.","isRequired":true,"uniqueKey":"items.[INDEX].pattern","typeLabel":"string"},"description":{"oneOf":[{"type":"string","description":"Free-form description shown in the rule book; not consulted at\nruntime.","uniqueKey":"items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Free-form description shown in the rule book; not consulted at\nruntime.","uniqueKey":"items.[INDEX].description.oneOf.1","typeLabel":"null"}],"uniqueKey":"items.[INDEX].description","typeLabel":"string | null"},"disabled":{"type":"boolean","description":"Soft-tombstone toggle. `true` parks the rule (the runtime treats\nit as absent) without removing it.","uniqueKey":"items.[INDEX].disabled","typeLabel":"boolean"},"limits":{"type":"object","description":"Per-rule effective limits.\n\n`None` on a field means \"unlimited\" (no rule constrains this dimension).\nUnder the `bilrost` feature this type is also the wire shape persisted\ninside [`crate::PersistedRule`]; under `serde` it's the JSON wire shape\nfor the admin REST model — adding a new limit kind here means allocating\na fresh `bilrost(tag(...))` next to the new field.","properties":{"concurrency":{"oneOf":[{"type":"integer","format":"int32","description":"Maximum concurrent running invocations. `None` means unlimited.","minimum":1,"uniqueKey":"items.[INDEX].limits.concurrency.oneOf.0","typeLabel":"integer\u003cint32>"},{"type":"null","format":"int32","description":"Maximum concurrent running invocations. `None` means unlimited.","minimum":1,"uniqueKey":"items.[INDEX].limits.concurrency.oneOf.1","typeLabel":"null"}],"uniqueKey":"items.[INDEX].limits.concurrency","typeLabel":"integer\u003cint32> | null"}},"uniqueKey":"items.[INDEX].limits","typeLabel":"object"},"precondition":{"oneOf":[{"type":"object","description":"Optimistic-concurrency guard. `{ \"type\": \"matches\", \"version\": v }`\nrequires the rule's current version to be `v`;\n`{ \"type\": \"does_not_exist\" }` requires the rule to be absent\n(strict insert); `{ \"type\": \"none\" }` (or omitted) is\nunconditional.","required":["type"],"properties":{"type":{"type":"string","enum":["none"],"isRequired":true,"uniqueKey":"items.[INDEX].precondition.oneOf.0.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"items.[INDEX].precondition.oneOf.0","typeLabel":"object"},{"type":"object","description":"Optimistic-concurrency guard. `{ \"type\": \"matches\", \"version\": v }`\nrequires the rule's current version to be `v`;\n`{ \"type\": \"does_not_exist\" }` requires the rule to be absent\n(strict insert); `{ \"type\": \"none\" }` (or omitted) is\nunconditional.","required":["version","type"],"properties":{"type":{"type":"string","enum":["matches"],"isRequired":true,"uniqueKey":"items.[INDEX].precondition.oneOf.1.type","typeLabel":"enum\u003cstring>"},"version":{"type":"integer","format":"int32","description":"A type used for versioned metadata.","minimum":0,"isRequired":true,"uniqueKey":"items.[INDEX].precondition.oneOf.1.version","typeLabel":"integer\u003cint32>"}},"uniqueKey":"items.[INDEX].precondition.oneOf.1","typeLabel":"object"},{"type":"object","description":"Optimistic-concurrency guard. `{ \"type\": \"matches\", \"version\": v }`\nrequires the rule's current version to be `v`;\n`{ \"type\": \"does_not_exist\" }` requires the rule to be absent\n(strict insert); `{ \"type\": \"none\" }` (or omitted) is\nunconditional.","required":["type"],"properties":{"type":{"type":"string","enum":["does_not_exist"],"isRequired":true,"uniqueKey":"items.[INDEX].precondition.oneOf.2.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"items.[INDEX].precondition.oneOf.2","typeLabel":"object"}],"uniqueKey":"items.[INDEX].precondition","typeLabel":"object"}},"uniqueKey":"items.[INDEX]","typeLabel":"object"},"uniqueKey":"","typeLabel":"object[]"},"examples":{"Example":{"title":"Example","value":[{"pattern":"\u003cstring>","description":"\u003cstring>","disabled":true,"limits":{"concurrency":2},"precondition":{"type":"none"}}]}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"7df5e564-cb38-44c9-8095-ce408dfd5c65":{"description":"Rules upserted","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["pattern","limits","disabled","version","last_modified_millis_since_epoch"],"properties":{"disabled":{"type":"boolean","isRequired":true,"uniqueKey":"items.[INDEX].disabled","typeLabel":"boolean"},"last_modified_millis_since_epoch":{"type":"integer","format":"int64","description":"Millis since UNIX epoch.","minimum":0,"isRequired":true,"uniqueKey":"items.[INDEX].last_modified_millis_since_epoch","typeLabel":"integer\u003cint64>"},"limits":{"type":"object","description":"Per-rule effective limits.\n\n`None` on a field means \"unlimited\" (no rule constrains this dimension).\nUnder the `bilrost` feature this type is also the wire shape persisted\ninside [`crate::PersistedRule`]; under `serde` it's the JSON wire shape\nfor the admin REST model — adding a new limit kind here means allocating\na fresh `bilrost(tag(...))` next to the new field.","properties":{"concurrency":{"oneOf":[{"type":"integer","format":"int32","description":"Maximum concurrent running invocations. `None` means unlimited.","minimum":1,"uniqueKey":"items.[INDEX].limits.concurrency.oneOf.0","typeLabel":"integer\u003cint32>"},{"type":"null","format":"int32","description":"Maximum concurrent running invocations. `None` means unlimited.","minimum":1,"uniqueKey":"items.[INDEX].limits.concurrency.oneOf.1","typeLabel":"null"}],"uniqueKey":"items.[INDEX].limits.concurrency","typeLabel":"integer\u003cint32> | null"}},"isRequired":true,"uniqueKey":"items.[INDEX].limits","typeLabel":"object"},"pattern":{"type":"string","isRequired":true,"uniqueKey":"items.[INDEX].pattern","typeLabel":"string"},"version":{"type":"integer","format":"int32","description":"Per-rule version: bumped on runtime-relevant changes.","minimum":0,"isRequired":true,"uniqueKey":"items.[INDEX].version","typeLabel":"integer\u003cint32>"},"description":{"oneOf":[{"type":"string","uniqueKey":"items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"items.[INDEX].description.oneOf.1","typeLabel":"null"}],"uniqueKey":"items.[INDEX].description","typeLabel":"string | null"}},"uniqueKey":"items.[INDEX]","typeLabel":"object"},"uniqueKey":"","typeLabel":"object[]"},"examples":{"Example":{"title":"Example","value":[{"disabled":true,"last_modified_millis_since_epoch":1,"limits":{"concurrency":2},"pattern":"\u003cstring>","version":1,"description":"\u003cstring>"}]}},"exampleType":"generated"}},"exampleType":"generated"},"2628207d-7e10-4814-a4ca-9116b7f71dab":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","description":"# Error description response\n\nError details of the response","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"restate_code":{"oneOf":[{"type":"string","description":"# Restate code\n\nRestate error code describing this error","uniqueKey":"restate_code.oneOf.0","typeLabel":"string"},{"type":"null","description":"# Restate code\n\nRestate error code describing this error","uniqueKey":"restate_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"restate_code","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","restate_code":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"455d6ce4-2196-46f1-a8c2-2b5f6719c604":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"type":"object","description":"# Error description response\n\nError details of the response","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"restate_code":{"oneOf":[{"type":"string","description":"# Restate code\n\nRestate error code describing this error","uniqueKey":"restate_code.oneOf.0","typeLabel":"string"},{"type":"null","description":"# Restate code\n\nRestate error code describing this error","uniqueKey":"restate_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"restate_code","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","restate_code":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"8c12f8dc-ec66-465a-a8ba-0e439867dd13":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","description":"# Error description response\n\nError details of the response","required":["message"],"properties":{"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"restate_code":{"oneOf":[{"type":"string","description":"# Restate code\n\nRestate error code describing this error","uniqueKey":"restate_code.oneOf.0","typeLabel":"string"},{"type":"null","description":"# Restate code\n\nRestate error code describing this error","uniqueKey":"restate_code.oneOf.1","typeLabel":"null"}],"uniqueKey":"restate_code","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","restate_code":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{},"servers":{}},"originalFileLocation":"schemas/openapi-admin.json"},"subdomain":"restate-6d46e1dc","siteName":"Restate","title":"Upsert a batch of rules. - Restate","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-14T14:32:59.686Z","originalFileLocation":"admin-api/rule/upsert-a-batch-of-rules.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";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=\"light\"}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=\"Each entry carries an optional [Precondition]. Setting it to DoesNotExist makes the entry a strict insert; Matches(v) rejects the batch unless the rule\u0026#x27;s current version is v; omitting it (None) is unconditional. The whole batch is atomic: any failed precondition or cap-exceeded condition rolls back the rest.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Restate\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/restate-6d46e1dc/aPguAmH_f4I6oEvV/_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/restate-6d46e1dc/aPguAmH_f4I6oEvV/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/restate-6d46e1dc/aPguAmH_f4I6oEvV/_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/restate-6d46e1dc/aPguAmH_f4I6oEvV/_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/restate-6d46e1dc/aPguAmH_f4I6oEvV/_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/restate-6d46e1dc/aPguAmH_f4I6oEvV/_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/restate-6d46e1dc/aPguAmH_f4I6oEvV/_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/restate-6d46e1dc/aPguAmH_f4I6oEvV/_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/restate-6d46e1dc/aPguAmH_f4I6oEvV/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Upsert a batch of rules. - Restate\">\u003cmeta data-mint-head property=\"og:description\" content=\"Each entry carries an optional [Precondition]. Setting it to DoesNotExist makes the entry a strict insert; Matches(v) rejects the batch unless the rule\u0026#x27;s current version is v; omitting it (None) is unconditional. The whole batch is atomic: any failed precondition or cap-exceeded condition rolls back the rest.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Restate\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.restate.dev/admin-api/rule/upsert-a-batch-of-rules\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://restate-6d46e1dc.mintlify.site/_mintlify/api/og/v2?division=rule\u0026amp;title=Upsert+a+batch+of+rules.\u0026amp;description=Each+entry+carries+an+optional+%5B%60Precondition%60%5D.+Setting+it+to%0A%60DoesNotExist%60+makes+the+entry+a+strict+insert%3B+%60Matches%28v%29%60+rejects%0Athe+batch+unless+the+rule%27s+\u0026amp;theme=35f97c6a72f75e34ad939f4f\u0026amp;signature=469c61e115454816bd82bd55ca46e6414cb36154901c2ef7685299c1644146bb\">\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=\"Upsert a batch of rules. - Restate\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Each entry carries an optional [Precondition]. Setting it to DoesNotExist makes the entry a strict insert; Matches(v) rejects the batch unless the rule\u0026#x27;s current version is v; omitting it (None) is unconditional. The whole batch is atomic: any failed precondition or cap-exceeded condition rolls back the rest.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://restate-6d46e1dc.mintlify.site/_mintlify/api/og/v2?division=rule\u0026amp;title=Upsert+a+batch+of+rules.\u0026amp;description=Each+entry+carries+an+optional+%5B%60Precondition%60%5D.+Setting+it+to%0A%60DoesNotExist%60+makes+the+entry+a+strict+insert%3B+%60Matches%28v%29%60+rejects%0Athe+batch+unless+the+rule%27s+\u0026amp;theme=35f97c6a72f75e34ad939f4f\u0026amp;signature=469c61e115454816bd82bd55ca46e6414cb36154901c2ef7685299c1644146bb\">\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/restate-6d46e1dc/aPguAmH_f4I6oEvV/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Restate\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4752c4\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.restate.dev/admin-api/rule/upsert-a-batch-of-rules\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/admin-api/rule/upsert-a-batch-of-rules.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.restate.dev/#organization\",\"name\":\"Restate\",\"url\":\"https://docs.restate.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/restate-6d46e1dc/0MkLgffDAGHkNDIZ/logo/light.svg?fit=max\u0026auto=format\u0026n=0MkLgffDAGHkNDIZ\u0026q=85\u0026s=70e648c2608af2d2c33dc26b3bce13d3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.restate.dev#website\",\"name\":\"Restate\",\"url\":\"https://docs.restate.dev\",\"publisher\":{\"@id\":\"https://docs.restate.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.restate.dev/admin-api/rule/upsert-a-batch-of-rules#webpage\",\"url\":\"https://docs.restate.dev/admin-api/rule/upsert-a-batch-of-rules\",\"name\":\"Upsert a batch of rules.\",\"description\":\"Each entry carries an optional [Precondition]. Setting it to DoesNotExist makes the entry a strict insert; Matches(v) rejects the batch unless the rule's current version is v; omitting it (None) is unconditional. The whole batch is atomic: any failed precondition or cap-exceeded condition rolls back the rest.\",\"dateModified\":\"2026-10-14T14:32:59.686Z\",\"isPartOf\":{\"@id\":\"https://docs.restate.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.restate.dev/admin-api/rule/upsert-a-batch-of-rules#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.restate.dev/admin-api/rule/upsert-a-batch-of-rules#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"References\",\"item\":\"https://docs.restate.dev/admin-api/deployment/list-deployments\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"APIs\",\"item\":\"https://docs.restate.dev/admin-api/deployment/list-deployments\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Admin API\",\"item\":\"https://docs.restate.dev/admin-api/deployment/list-deployments\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Upsert a batch of rules.\",\"item\":\"https://docs.restate.dev/admin-api/rule/upsert-a-batch-of-rules\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.restate.dev/admin-api/rule/upsert-a-batch-of-rules#apireference\",\"headline\":\"Upsert a batch of rules.\",\"name\":\"Upsert a batch of rules.\",\"description\":\"Each entry carries an optional [Precondition]. Setting it to DoesNotExist makes the entry a strict insert; Matches(v) rejects the batch unless the rule's current version is v; omitting it (None) is unconditional. The whole batch is atomic: any failed precondition or cap-exceeded condition rolls back the rest.\",\"url\":\"https://docs.restate.dev/admin-api/rule/upsert-a-batch-of-rules\",\"mainEntityOfPage\":{\"@id\":\"https://docs.restate.dev/admin-api/rule/upsert-a-batch-of-rules#webpage\"},\"dateModified\":\"2026-10-14T14:32:59.686Z\",\"publisher\":{\"@id\":\"https://docs.restate.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.restate.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Restate\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Restate","nav":{"global":null,"tabs":[{"tab":"Learn","icon":"graduation-cap","pages":[{"title":"Learn","href":""}]},{"tab":"Docs","icon":"hammer","pages":[{"title":"Documentation","sidebarTitle":"Overview","icon":"book-open","mode":"wide","href":"/docs"},{"title":"Installation","icon":"download","href":"/installation"},{"group":"SDKs","pages":[{"group":"TypeScript","icon":"/img/languages/typescript.svg","pages":[{"title":"Services","icon":"brackets-curly","href":"/develop/ts/services"},{"title":"Durable Steps","icon":"list-check","href":"/develop/ts/durable-steps"},{"title":"Service Communication","sidebarTitle":"Communication","icon":"comment","href":"/develop/ts/service-communication"},{"title":"State","icon":"database","href":"/develop/ts/state"},{"title":"Signals and external events","icon":"hourglass-start","href":"/develop/ts/external-events"},{"title":"Scheduling \u0026 Timers","icon":"timer","href":"/develop/ts/durable-timers"},{"title":"Concurrency / Coroutines","icon":"merge","href":"/develop/ts/concurrent-tasks"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/develop/ts/error-handling"},{"title":"Hooks","icon":"plug","href":"/develop/ts/hooks"},{"title":"Serialization","icon":"file-code","href":"/develop/ts/serialization"},{"title":"Serving","icon":"globe","href":"/develop/ts/serving"},{"title":"Testing","icon":"bug","href":"/develop/ts/testing"},{"title":"Logging","icon":"file-lines","href":"/develop/ts/logging"},{"title":"Tracing","icon":"magnifying-glass","href":"/develop/ts/tracing"}]},{"group":"Java/Kotlin","icon":"/img/languages/java.svg","pages":[{"title":"Services","icon":"brackets-curly","href":"/develop/java/services"},{"title":"Durable Steps","icon":"list-check","href":"/develop/java/durable-steps"},{"title":"Service Communication","sidebarTitle":"Communication","icon":"comment","href":"/develop/java/service-communication"},{"title":"State","icon":"database","href":"/develop/java/state"},{"title":"Signals and external events","icon":"hourglass-start","href":"/develop/java/external-events"},{"title":"Scheduling \u0026 Timers","icon":"timer","href":"/develop/java/durable-timers"},{"title":"Concurrent Tasks","icon":"merge","href":"/develop/java/concurrent-tasks"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/develop/java/error-handling"},{"title":"Serialization","icon":"file-code","href":"/develop/java/serialization"},{"title":"Serving","icon":"globe","href":"/develop/java/serving"},{"title":"Spring Boot","icon":"leaf","href":"/develop/java/spring-boot"},{"title":"Testing","icon":"bug","href":"/develop/java/testing"},{"title":"Logging","icon":"file-lines","href":"/develop/java/logging"},{"title":"Tracing","icon":"magnifying-glass","href":"/develop/java/tracing"}]},{"group":"Python","icon":"/img/languages/python.svg","pages":[{"title":"Services","icon":"brackets-curly","href":"/develop/python/services"},{"title":"Durable Steps","icon":"list-check","href":"/develop/python/durable-steps"},{"title":"Service Communication","sidebarTitle":"Communication","icon":"comment","href":"/develop/python/service-communication"},{"title":"State","icon":"database","href":"/develop/python/state"},{"title":"Signals and external events","icon":"hourglass-start","href":"/develop/python/external-events"},{"title":"Scheduling \u0026 Timers","icon":"timer","href":"/develop/python/durable-timers"},{"title":"Concurrent Tasks","icon":"merge","href":"/develop/python/concurrent-tasks"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/develop/python/error-handling"},{"title":"Serialization","icon":"file-code","href":"/develop/python/serialization"},{"title":"Serving","icon":"globe","href":"/develop/python/serving"},{"title":"Testing","icon":"bug","href":"/develop/python/testing"},{"title":"Logging","icon":"file-lines","href":"/develop/python/logging"}]},{"group":"Go","icon":"/img/languages/go.svg","pages":[{"title":"Services","icon":"brackets-curly","href":"/develop/go/services"},{"title":"Durable Steps","icon":"list-check","href":"/develop/go/durable-steps"},{"title":"Service Communication","sidebarTitle":"Communication","icon":"comment","href":"/develop/go/service-communication"},{"title":"State","icon":"database","href":"/develop/go/state"},{"title":"Signals and external events","icon":"hourglass-start","href":"/develop/go/external-events"},{"title":"Scheduling \u0026 Timers","icon":"timer","href":"/develop/go/durable-timers"},{"title":"Concurrent Tasks","icon":"merge","href":"/develop/go/concurrent-tasks"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/develop/go/error-handling"},{"title":"Serving","icon":"globe","href":"/develop/go/serving"},{"title":"Testing","icon":"bug","href":"/develop/go/testing"},{"title":"Logging","icon":"file-lines","href":"/develop/go/logging"},{"title":"Code Generation","icon":"code","href":"/develop/go/code-generation"}]},{"title":"Rust SDK","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/languages/rust.svg","url":"https://docs.rs/restate-sdk/latest/restate_sdk/","href":"/develop/rust"},{"title":"Ruby SDK","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/languages/ruby.svg","url":"https://github.com/restatedev/sdk-ruby","href":"/develop/ruby"},{"title":"Develop with AI","icon":"robot","href":"/develop/ai-assistant"}]},{"group":"Services","pages":[{"group":"Deploy","icon":"box","pages":[{"title":"Kubernetes","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/kubernetes.svg","href":"/services/deploy/kubernetes"},{"title":"Google Cloud Run","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/google-cloud-run.svg","href":"/services/deploy/cloud-run"},{"title":"Vercel","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/vercel.svg","href":"/services/deploy/vercel"},{"title":"AWS Lambda","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/aws-lambda.svg","href":"/services/deploy/lambda"},{"title":"Cloudflare Workers","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/cloudflare-workers.svg","href":"/services/deploy/cloudflare-workers"},{"title":"Other serverless platforms","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/other-serverless.svg","href":"/services/deploy/other-serverless-platforms"},{"title":"Containers and VMs","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/docker.svg","href":"/services/deploy/standalone"}]},{"group":"Invocation","icon":"phone","pages":[{"title":"HTTP","href":"/services/invocation/http"},{"group":"SDK Clients","pages":[{"title":"TypeScript SDK Clients","sidebarTitle":"TypeScript","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/languages/typescript.svg","href":"/services/invocation/clients/typescript-sdk"},{"title":"Java/Kotlin SDK Clients","sidebarTitle":"Java/Kotlin","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/languages/java.svg","href":"/services/invocation/clients/java-sdk"},{"title":"Python SDK Clients","sidebarTitle":"Python","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/languages/python.svg","href":"/services/invocation/clients/python-sdk"},{"title":"Go SDK Clients","sidebarTitle":"Go","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/languages/go.svg","href":"/services/invocation/clients/go-sdk"}]},{"title":"Kafka","href":"/services/invocation/kafka"},{"title":"Managing Invocations","sidebarTitle":"Managing Invocations","href":"/services/invocation/managing-invocations"}]},{"group":"Integrations","icon":"circle-nodes","pages":[{"title":"Kafka","href":"/services/integrations/kafka"},{"title":"Build your own integration","href":"/services/integrations/build_your_own"}]},{"title":"Flow Control","sidebarTitle":"Flow control","icon":"gauge","href":"/services/flow-control"},{"title":"Versioning","icon":"send-backward","href":"/services/versioning"},{"title":"Security","icon":"shield","href":"/services/security"},{"title":"Service Configuration","sidebarTitle":"Configuration","icon":"sliders-simple","href":"/services/configuration"},{"title":"Introspection","icon":"magnifying-glass","href":"/services/introspection"}]},{"group":"Restate Cloud / BYOC / OSS","pages":[{"title":"Choose how to run Restate","sidebarTitle":"Overview","icon":"scale-balanced","href":"/hosting/overview"},{"title":"Restate Cloud","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/logo/restate-cloud-mini.svg","href":"/cloud/getting-started"},{"group":"Restate BYOC","icon":"/logo/restate-cloud-mini.svg","expanded":false,"pages":[{"title":"Restate BYOC","sidebarTitle":"What is BYOC?","icon":"cloud-arrow-down","href":"/byoc/overview"},{"title":"Installation","sidebarTitle":"Installation","icon":"wrench","href":"/byoc/installation"},{"title":"Security Model","sidebarTitle":"Security","icon":"shield","href":"/byoc/security"}]},{"group":"Self-hosted Restate","icon":"/logo/restate-mini.svg","pages":[{"title":"Self-hosted Restate Overview","sidebarTitle":"Overview","icon":"book-open","href":"/server/overview"},{"group":"Deploy","icon":"box","pages":[{"sidebarTitle":"Kubernetes","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/kubernetes.svg","title":null,"href":"/server/deploy/kubernetes"},{"group":"Cloud providers","icon":"cloud","pages":[{"title":"Deploying Restate on AWS","sidebarTitle":"AWS","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/aws.svg","href":"/server/deploy/aws"},{"title":"Deploying Restate on GCP","sidebarTitle":"GCP","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/gcp.svg","href":"/server/deploy/gcp"},{"title":"Deploying Restate on Azure","sidebarTitle":"Azure","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/azure.svg","href":"/server/deploy/azure"}]},{"title":"Docker","sidebarTitle":"Docker","icon":"https://mintlify.s3.us-west-1.amazonaws.com/restate-6d46e1dc/img/cloud-providers/docker.svg","href":"/server/deploy/docker"}]},{"group":"Configuration","icon":"gear","pages":[{"title":"Restate Server Configuration","sidebarTitle":"Configuration methods","icon":"sliders","href":"/server/configuration"},{"title":"Memory Configuration","sidebarTitle":"Memory","icon":"memory","href":"/server/memory"},{"title":"Networking","icon":"network-wired","href":"/server/networking"}]},{"group":"Clusters and Data","icon":"cubes-stacked","pages":[{"title":"Highly-Available Clusters","icon":"circle-nodes","href":"/server/clusters"},{"title":"Metadata Storage","icon":"database","href":"/server/metadata"},{"title":"Snapshots \u0026 Backups","icon":"camera","href":"/server/snapshots"}]},{"title":"Security","icon":"shield","href":"/server/security"},{"group":"Monitor","icon":"chart-line","pages":[{"title":"Logging","icon":"file-lines","href":"/server/monitoring/logging"},{"title":"Tracing","icon":"route","href":"/server/monitoring/tracing"},{"title":"Metrics","icon":"chart-simple","href":"/server/monitoring/metrics"}]},{"title":"Upgrading Restate","sidebarTitle":"Upgrading","icon":"arrow-up","href":"/server/upgrading"}]}]},{"group":"References","pages":[{"group":"APIs","expanded":false,"pages":[{"group":"Admin API","pages":[{"group":"deployment","pages":[{"title":"List deployments","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /deployments","href":"/admin-api/deployment/list-deployments"},{"title":"Register deployment","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json post /deployments","href":"/admin-api/deployment/register-deployment"},{"title":"Get deployment","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /deployments/{deployment}","href":"/admin-api/deployment/get-deployment"},{"title":"Delete deployment","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json delete /deployments/{deployment}","href":"/admin-api/deployment/delete-deployment"},{"title":"Update deployment","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /deployments/{deployment}","href":"/admin-api/deployment/update-deployment"}]},{"group":"health","pages":[{"title":"Health check endpoint","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /health","href":"/admin-api/health/health-check-endpoint"}]},{"group":"invocation","pages":[{"title":"Delete an invocation","deprecated":true,"version":null,"openapi":"/schemas/openapi-admin.json delete /invocations/{invocation_id}","href":"/admin-api/invocation/delete-an-invocation"},{"title":"Cancel an invocation","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /invocations/{invocation_id}/cancel","href":"/admin-api/invocation/cancel-an-invocation"},{"title":"Kill an invocation","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /invocations/{invocation_id}/kill","href":"/admin-api/invocation/kill-an-invocation"},{"title":"Pause an invocation","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /invocations/{invocation_id}/pause","href":"/admin-api/invocation/pause-an-invocation"},{"title":"Purge a completed invocation","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /invocations/{invocation_id}/purge","href":"/admin-api/invocation/purge-a-completed-invocation"},{"title":"Purge invocation journal","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /invocations/{invocation_id}/purge-journal","href":"/admin-api/invocation/purge-invocation-journal"},{"title":"Restart invocation as new","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /invocations/{invocation_id}/restart-as-new","href":"/admin-api/invocation/restart-invocation-as-new"},{"title":"Resume an invocation","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /invocations/{invocation_id}/resume","href":"/admin-api/invocation/resume-an-invocation"}]},{"group":"kafka_cluster","pages":[{"title":"List Kafka clusters","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /kafka-clusters","href":"/admin-api/kafka_cluster/list-kafka-clusters"},{"title":"Create Kafka cluster","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json post /kafka-clusters","href":"/admin-api/kafka_cluster/create-kafka-cluster"},{"title":"Get Kafka cluster","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /kafka-clusters/{cluster_name}","href":"/admin-api/kafka_cluster/get-kafka-cluster"},{"title":"Delete Kafka cluster","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json delete /kafka-clusters/{cluster_name}","href":"/admin-api/kafka_cluster/delete-kafka-cluster"},{"title":"Update Kafka cluster","description":"Updates the configuration properties of an existing Kafka cluster.\nSensitive properties (passwords, secrets, etc.) are automatically redacted in the response.","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /kafka-clusters/{cluster_name}","href":"/admin-api/kafka_cluster/update-kafka-cluster"}]},{"group":"rule","pages":[{"title":"Upsert a batch of rules.","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json put /limits/rules","href":"/admin-api/rule/upsert-a-batch-of-rules"},{"title":"Delete a batch of rules by pattern.","description":"Each entry may carry an `expected_version`; if present the rule\nmust exist at that exact version, otherwise the batch fails.\nWithout `expected_version` the delete is unconditional and\nidempotent: a pattern that's already absent is silently skipped.\nReturns the patterns that this batch actually removed.","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json post /limits/rules/bulk-delete","href":"/admin-api/rule/delete-a-batch-of-rules-by-pattern"}]},{"group":"introspection","pages":[{"title":"Query the system and service state by using SQL.","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json post /query","href":"/admin-api/introspection/query-the-system-and-service-state-by-using-sql"}]},{"group":"service","pages":[{"title":"List services","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /services","href":"/admin-api/service/list-services"},{"title":"Get service","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /services/{service}","href":"/admin-api/service/get-service"},{"title":"Modify service configuration","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json patch /services/{service}","href":"/admin-api/service/modify-service-configuration"},{"title":"Get service OpenAPI definition","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /services/{service}/openapi","href":"/admin-api/service/get-service-openapi-definition"},{"title":"Modify service state","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json post /services/{service}/state","href":"/admin-api/service/modify-service-state"}]},{"group":"service_handler","pages":[{"title":"List service handlers","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /services/{service}/handlers","href":"/admin-api/service_handler/list-service-handlers"},{"title":"Get service handler","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /services/{service}/handlers/{handler}","href":"/admin-api/service_handler/get-service-handler"}]},{"group":"subscription","pages":[{"title":"List subscriptions","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /subscriptions","href":"/admin-api/subscription/list-subscriptions"},{"title":"Create subscription","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json post /subscriptions","href":"/admin-api/subscription/create-subscription"},{"title":"Get subscription","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /subscriptions/{subscription}","href":"/admin-api/subscription/get-subscription"},{"title":"Delete subscription","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json delete /subscriptions/{subscription}","href":"/admin-api/subscription/delete-subscription"}]},{"group":"version","pages":[{"title":"Get version information","deprecated":null,"version":null,"openapi":"/schemas/openapi-admin.json get /version","href":"/admin-api/version/get-version-information"}]}]},{"title":"Typescript API","url":"https://restatedev.github.io/sdk-typescript/","href":"/references/tsdocs"},{"title":"Javadocs","url":"https://restatedev.github.io/sdk-java/javadocs/","href":"/references/javadocs"},{"title":"KotlinDocs","url":"https://restatedev.github.io/sdk-java/ktdocs/","href":"/references/ktdocs"},{"title":"Go API","url":"https://pkg.go.dev/github.com/restatedev/sdk-go","href":"/references/gopkg"},{"title":"SQL Introspection API","href":"/references/sql-introspection"}]},{"group":"Configuration","expanded":false,"pages":[{"title":"Restate Server Configuration","href":"/references/server-config"},{"title":"CLI Configuration","href":"/references/cli-config"}]},{"title":"Restate Architecture","sidebarTitle":"Architecture","href":"/references/architecture"},{"group":"Changelog","expanded":false,"pages":[{"title":"Restate Server changelog","sidebarTitle":"Restate Server","href":"/changelog/server"},{"title":"TypeScript SDK changelog","sidebarTitle":"TypeScript SDK","href":"/changelog/typescript-sdk"},{"title":"Python SDK changelog","sidebarTitle":"Python SDK","href":"/changelog/python-sdk"},{"title":"Java/Kotlin SDK changelog","sidebarTitle":"Java/Kotlin SDK","href":"/changelog/java-kotlin-sdk"},{"title":"Go SDK changelog","sidebarTitle":"Go SDK","href":"/changelog/go-sdk"},{"title":"Rust SDK changelog","sidebarTitle":"Rust SDK","href":"/changelog/rust-sdk"},{"title":"Kubernetes Operator changelog","sidebarTitle":"Kubernetes Operator","href":"/changelog/operator"}]},{"title":"Error Codes","href":"/references/errors"}]}]},{"tab":"Guides","icon":"book","pages":[{"title":"Guides","href":"/guides"}]},{"tab":"Roadmap","icon":"map","pages":[{"title":"Roadmap","href":"/roadmap/oss"}]},{"tab":"AI / Agents","icon":"robot","pages":[{"title":"AI / Agents","href":"/ai"}]}]},"basePath":"","title":"Upsert a batch of rules. - Restate","buildId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","deploymentId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-5FCzAcfS.js","utils-SLtAG4EZ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-2DZi8ZMu.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D7J3nkzE.js","snippetPresets-D0Alv0AH.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BI4qNJ2c.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BD3uyr8j.js","shallow-D8iEBr5z.js","getApiPlaygroundDisplay-CgNP4lzR.js","CodeSnippet-CX-QHuMs.js","CodeSnippets-VlXE-ZUf.js","Page-D9ithiIZ.js","getPastedJson-DYNQkZ1M.js","icon-CzacdwOi.js","MethodPill-2JVqoYKi.js","DuplicateIcon-_xVXs-U8.js","createIcon-BRHrweLo.js","DynamicMarkdown-mQG_iQiE.js","SectionHeading-DMpJzv8f.js","axios-vUo_bRtp.js","Markdown-5FGIym-8.js","clsx-D-TRO5q5.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CdrJecqK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CHlcWBLM.js"]}