{"openapi":"3.2.0","jsonSchemaDialect":"https://spec.openapis.org/oas/3.2/dialect/2025-09-17","info":{"title":"rego4k server","version":"1","description":"The routes of the modules docs, policies, signing, debugger, shaking"},"tags":[],"paths":{"/bundles":{"get":{"summary":"The bundles of the server, with the revision and the hash of each bundle","description":"The hash is the policy of a signed decision. The default bundle is at the paths of OPA's API, and each bundle is at /bundles/{name}.","tags":[""],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"bundles":[{"name":"default","revision":"r1","sha256":"9a1c..."},{"name":"billing","revision":"2026-12-01","sha256":"4413..."}]},"schema":{"$ref":"#/components/schemas/object1747528865"}}}}},"security":[],"operationId":"getBundles","deprecated":false}},"/bundles/{name}/v1/data":{"get":{"summary":"Evaluate the document at the path, with the input of the parameter input","description":"As OPA's Data API. The response is {} if the document is undefined. With provided=true, the response also has provided: the provided values that the query read, in the form of a signed decision, for example {\"result\": true, \"provided\": {\"time\": \"2026-12-01T10:00:00Z\", \"zoneData\": \"2026e\"}}.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"input","required":false,"description":"The input document, as JSON text"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"explain","required":false,"description":"The explanation of the evaluation in the response: full, notes, fails or debug. Another value gives no explanation"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"metrics","required":false,"description":"If true, the response has the timers of the evaluation in metrics"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"instrument","required":false,"description":"If true, the response has the metrics. rego4k gives no more metrics than with metrics=true"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"strict-builtin-errors","required":false,"description":"If true, an error of a builtin stops the evaluation with 500, and is not undefined"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provided","required":false,"description":"If true, the response also has the provided values that the query read, in the form of a signed decision"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provenance","required":false,"description":"If true, the response has the version of rego4k and the revision of each bundle"},{"schema":{"type":"string"},"in":"path","name":"name","required":true,"description":"The name of a bundle, for example billing"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":true},"schema":{"$ref":"#/components/schemas/object2026432926"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","errors":[{"code":"rego_parse_error","location":{"col":6,"file":"","row":1},"message":"unexpected eof token"}],"message":"error(s) occurred while parsing query"},"schema":{"$ref":"#/components/schemas/object-709294299"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"code":"internal_error","errors":[{"code":"eval_conflict_error","location":{"col":1,"file":"authz/policy.rego","row":8},"message":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}],"message":"error(s) occurred while evaluating query"},"schema":{"$ref":"#/components/schemas/object261745936"}}}}},"security":[],"operationId":"getBundles_name_V1Data","deprecated":false},"post":{"summary":"Evaluate the document at the path, with the input of the body","description":"As OPA's Data API. The response is {} if the document is undefined. With no input, it has a warning. With provided=true, the response also has provided: the provided values that the query read, in the form of a signed decision, for example {\"result\": true, \"provided\": {\"time\": \"2026-12-01T10:00:00Z\", \"zoneData\": \"2026e\"}}.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"explain","required":false,"description":"The explanation of the evaluation in the response: full, notes, fails or debug. Another value gives no explanation"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"metrics","required":false,"description":"If true, the response has the timers of the evaluation in metrics"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"instrument","required":false,"description":"If true, the response has the metrics. rego4k gives no more metrics than with metrics=true"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"strict-builtin-errors","required":false,"description":"If true, an error of a builtin stops the evaluation with 500, and is not undefined"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provided","required":false,"description":"If true, the response also has the provided values that the query read, in the form of a signed decision"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provenance","required":false,"description":"If true, the response has the version of rego4k and the revision of each bundle"},{"schema":{"type":"string"},"in":"path","name":"name","required":true,"description":"The name of a bundle, for example billing"}],"requestBody":{"content":{"application/json":{"example":{"input":{"user":"alice"}},"schema":{"$ref":"#/components/schemas/object-730921335"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":true},"schema":{"$ref":"#/components/schemas/object2026432926"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","errors":[{"code":"rego_parse_error","location":{"col":6,"file":"","row":1},"message":"unexpected eof token"}],"message":"error(s) occurred while parsing query"},"schema":{"$ref":"#/components/schemas/object-709294299"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"code":"internal_error","errors":[{"code":"eval_conflict_error","location":{"col":1,"file":"authz/policy.rego","row":8},"message":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}],"message":"error(s) occurred while evaluating query"},"schema":{"$ref":"#/components/schemas/object261745936"}}}}},"security":[],"operationId":"postBundles_name_V1Data","deprecated":false}},"/bundles/{name}/v1/data/{path}":{"get":{"summary":"Evaluate the document at the path, with the input of the parameter input","description":"As OPA's Data API. The response is {} if the document is undefined. With provided=true, the response also has provided: the provided values that the query read, in the form of a signed decision, for example {\"result\": true, \"provided\": {\"time\": \"2026-12-01T10:00:00Z\", \"zoneData\": \"2026e\"}}.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"input","required":false,"description":"The input document, as JSON text"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"explain","required":false,"description":"The explanation of the evaluation in the response: full, notes, fails or debug. Another value gives no explanation"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"metrics","required":false,"description":"If true, the response has the timers of the evaluation in metrics"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"instrument","required":false,"description":"If true, the response has the metrics. rego4k gives no more metrics than with metrics=true"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"strict-builtin-errors","required":false,"description":"If true, an error of a builtin stops the evaluation with 500, and is not undefined"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provided","required":false,"description":"If true, the response also has the provided values that the query read, in the form of a signed decision"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provenance","required":false,"description":"If true, the response has the version of rego4k and the revision of each bundle"},{"schema":{"type":"string"},"in":"path","name":"name","required":true,"description":"The name of a bundle, for example billing"},{"schema":{"type":"string"},"in":"path","name":"path","required":true,"description":"The path of the document in data, with / between its parts, for example authz/allow"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":true},"schema":{"$ref":"#/components/schemas/object2026432926"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","errors":[{"code":"rego_parse_error","location":{"col":6,"file":"","row":1},"message":"unexpected eof token"}],"message":"error(s) occurred while parsing query"},"schema":{"$ref":"#/components/schemas/object-709294299"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"code":"internal_error","errors":[{"code":"eval_conflict_error","location":{"col":1,"file":"authz/policy.rego","row":8},"message":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}],"message":"error(s) occurred while evaluating query"},"schema":{"$ref":"#/components/schemas/object261745936"}}}}},"security":[],"operationId":"getBundles_name_V1Data_path","deprecated":false},"post":{"summary":"Evaluate the document at the path, with the input of the body","description":"As OPA's Data API. The response is {} if the document is undefined. With no input, it has a warning. With provided=true, the response also has provided: the provided values that the query read, in the form of a signed decision, for example {\"result\": true, \"provided\": {\"time\": \"2026-12-01T10:00:00Z\", \"zoneData\": \"2026e\"}}.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"explain","required":false,"description":"The explanation of the evaluation in the response: full, notes, fails or debug. Another value gives no explanation"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"metrics","required":false,"description":"If true, the response has the timers of the evaluation in metrics"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"instrument","required":false,"description":"If true, the response has the metrics. rego4k gives no more metrics than with metrics=true"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"strict-builtin-errors","required":false,"description":"If true, an error of a builtin stops the evaluation with 500, and is not undefined"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provided","required":false,"description":"If true, the response also has the provided values that the query read, in the form of a signed decision"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provenance","required":false,"description":"If true, the response has the version of rego4k and the revision of each bundle"},{"schema":{"type":"string"},"in":"path","name":"name","required":true,"description":"The name of a bundle, for example billing"},{"schema":{"type":"string"},"in":"path","name":"path","required":true,"description":"The path of the document in data, with / between its parts, for example authz/allow"}],"requestBody":{"content":{"application/json":{"example":{"input":{"user":"alice"}},"schema":{"$ref":"#/components/schemas/object-730921335"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":true},"schema":{"$ref":"#/components/schemas/object2026432926"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","errors":[{"code":"rego_parse_error","location":{"col":6,"file":"","row":1},"message":"unexpected eof token"}],"message":"error(s) occurred while parsing query"},"schema":{"$ref":"#/components/schemas/object-709294299"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"code":"internal_error","errors":[{"code":"eval_conflict_error","location":{"col":1,"file":"authz/policy.rego","row":8},"message":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}],"message":"error(s) occurred while evaluating query"},"schema":{"$ref":"#/components/schemas/object261745936"}}}}},"security":[],"operationId":"postBundles_name_V1Data_path","deprecated":false}},"/bundles/{name}/v1/policies":{"get":{"summary":"The modules of the bundle","description":"As OPA's Policy API. The ID of a module is the name of the bundle and the path of the module. OPA also gives the AST.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"string"},"in":"path","name":"name","required":true,"description":"The name of a bundle, for example billing"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":[{"id":"default/authz/policy.rego","raw":"package authz\n\nallow if input.user == \"alice\"\n"}]},"schema":{"$ref":"#/components/schemas/object-564473046"}}}}},"security":[],"operationId":"getBundles_name_V1Policies","deprecated":false}},"/bundles/{name}/v1/policies/{id}":{"delete":{"summary":"Refused: a bundle owns all the paths","description":"As OPA with a bundle: a delete of a module gets 400, and a delete of a module that does not exist gets 404.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"string"},"in":"path","name":"name","required":true,"description":"The name of a bundle, for example billing"},{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"The ID of a policy module: the name of the bundle, then the path of the module in the bundle"}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","message":"all paths owned by bundle \"default\""},"schema":{"$ref":"#/components/schemas/object750471649"}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"code":"resource_not_found","message":"storage_not_found_error: policy id \"default/x.rego\""},"schema":{"$ref":"#/components/schemas/object961821160"}}}}},"security":[],"operationId":"deleteBundles_name_V1Policies_id","deprecated":false},"get":{"summary":"A module of the bundle","description":"As OPA's Policy API. The ID is the name of the bundle and the path of the module, for example default/authz/policy.rego.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"string"},"in":"path","name":"name","required":true,"description":"The name of a bundle, for example billing"},{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"The ID of a policy module: the name of the bundle, then the path of the module in the bundle"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":{"id":"default/authz/policy.rego","raw":"package authz\n\nallow if input.user == \"alice\"\n"}},"schema":{"$ref":"#/components/schemas/object-741707189"}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"code":"resource_not_found","message":"storage_not_found_error: policy id \"default/x.rego\""},"schema":{"$ref":"#/components/schemas/object961821160"}}}}},"security":[],"operationId":"getBundles_name_V1Policies_id","deprecated":false},"put":{"summary":"Refused: a bundle owns all the paths","description":"As OPA with a bundle: each write gets 400.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"string"},"in":"path","name":"name","required":true,"description":"The name of a bundle, for example billing"},{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"The ID of a policy module: the name of the bundle, then the path of the module in the bundle"}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","message":"all paths owned by bundle \"default\""},"schema":{"$ref":"#/components/schemas/object750471649"}}}}},"security":[],"operationId":"putBundles_name_V1Policies_id","deprecated":false}},"/bundles/{name}/v1/query":{"get":{"summary":"Evaluate the Rego query of the parameter q","description":"As OPA's Query API. The query has no input. With provided=true, the response also has provided: the provided values that the query read, in the form of a signed decision, for example {\"result\": true, \"provided\": {\"time\": \"2026-12-01T10:00:00Z\", \"zoneData\": \"2026e\"}}.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"q","required":false,"description":"The Rego query"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"explain","required":false,"description":"The explanation of the evaluation in the response: full, notes, fails or debug. Another value gives no explanation"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"metrics","required":false,"description":"If true, the response has the timers of the evaluation in metrics"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"instrument","required":false,"description":"If true, the response has the metrics. rego4k gives no more metrics than with metrics=true"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"strict-builtin-errors","required":false,"description":"If true, an error of a builtin stops the evaluation with 500, and is not undefined"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provided","required":false,"description":"If true, the response also has the provided values that the query read, in the form of a signed decision"},{"schema":{"type":"string"},"in":"path","name":"name","required":true,"description":"The name of a bundle, for example billing"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":[{"x":"alice"}]},"schema":{"$ref":"#/components/schemas/object2031453161"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","errors":[{"code":"rego_parse_error","location":{"col":6,"file":"","row":1},"message":"unexpected eof token"}],"message":"error(s) occurred while parsing query"},"schema":{"$ref":"#/components/schemas/object-709294299"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"code":"internal_error","errors":[{"code":"eval_conflict_error","location":{"col":1,"file":"authz/policy.rego","row":8},"message":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}],"message":"error(s) occurred while evaluating query"},"schema":{"$ref":"#/components/schemas/object261745936"}}}}},"security":[],"operationId":"getBundles_name_V1Query","deprecated":false},"post":{"summary":"Evaluate a Rego query, with the input","description":"As OPA's Query API. The result has the bindings of the vars of each solution, or it is {} if there is none. With provided=true, the response also has provided: the provided values that the query read, in the form of a signed decision, for example {\"result\": true, \"provided\": {\"time\": \"2026-12-01T10:00:00Z\", \"zoneData\": \"2026e\"}}.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"explain","required":false,"description":"The explanation of the evaluation in the response: full, notes, fails or debug. Another value gives no explanation"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"metrics","required":false,"description":"If true, the response has the timers of the evaluation in metrics"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"instrument","required":false,"description":"If true, the response has the metrics. rego4k gives no more metrics than with metrics=true"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"strict-builtin-errors","required":false,"description":"If true, an error of a builtin stops the evaluation with 500, and is not undefined"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provided","required":false,"description":"If true, the response also has the provided values that the query read, in the form of a signed decision"},{"schema":{"type":"string"},"in":"path","name":"name","required":true,"description":"The name of a bundle, for example billing"}],"requestBody":{"content":{"application/json":{"example":{"input":{"user":"alice"},"query":"x := input.user"},"schema":{"$ref":"#/components/schemas/object1290417408"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":[{"x":"alice"}]},"schema":{"$ref":"#/components/schemas/object2031453161"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","errors":[{"code":"rego_parse_error","location":{"col":6,"file":"","row":1},"message":"unexpected eof token"}],"message":"error(s) occurred while parsing query"},"schema":{"$ref":"#/components/schemas/object-709294299"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"code":"internal_error","errors":[{"code":"eval_conflict_error","location":{"col":1,"file":"authz/policy.rego","row":8},"message":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}],"message":"error(s) occurred while evaluating query"},"schema":{"$ref":"#/components/schemas/object261745936"}}}}},"security":[],"operationId":"postBundles_name_V1Query","deprecated":false}},"/bundles/{name}/v1/shaking":{"get":{"summary":"Show what tree shaking does to each file of the bundle, for the entrypoints, without a change to the bundle","description":"For each module and data file: the lines that the shaken bundle keeps, deletes and adds, and the shaken text. A removed file has no shaken text. The response also has the builtins that the shaken bundle needs, and the numbers of lines and files.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"entrypoint","required":true,"description":"An entrypoint, in the form of opa build -e, for example authz/allow. Give the parameter one time for each entrypoint"},{"schema":{"type":"string"},"in":"path","name":"name","required":true,"description":"The name of a bundle, for example billing"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"builtins":["equal"],"bundle":"default","counts":{"addedLines":0,"deletedLines":4,"keptFiles":1,"keptLines":3,"removedFiles":1},"entrypoints":["authz/allow"],"files":[{"addedLines":0,"deletedLines":2,"keptLines":3,"lines":[{"change":"kept","row":1,"shakenRow":1,"text":"package authz"},{"change":"kept","row":2,"shakenRow":2,"text":""},{"change":"kept","row":3,"shakenRow":3,"text":"allow if input.user == \"admin\""},{"change":"deleted","row":4,"text":""},{"change":"deleted","row":5,"text":"deny if input.blocked"}],"path":"authz/policy.rego","removed":false,"shaken":"package authz\n\nallow if input.user == \"admin\"\n"},{"addedLines":0,"deletedLines":2,"keptLines":0,"lines":[{"change":"deleted","row":1,"text":"package lib.time"},{"change":"deleted","row":2,"text":"weekend := false"}],"path":"lib/time.rego","removed":true}],"removedFiles":["lib/time.rego"]},"schema":{"$ref":"#/components/schemas/object1580370434"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","message":"the bundle has no rules and no data at the entrypoint authz/nothing"},"schema":{"$ref":"#/components/schemas/object-998399234"}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"code":"resource_not_found","message":"the server has no bundle payroll"},"schema":{"$ref":"#/components/schemas/object-1365281171"}}}}},"security":[],"operationId":"getBundles_name_V1Shaking","deprecated":false}},"/bundles/{name}/v1/signed/data":{"post":{"summary":"Evaluate the document at the path, with the input, and sign the decision","description":"The response is a DSSE envelope with an in-toto Statement v1 about the decision. It names the principal of the caller. A signed decision needs an input. The server does not sign the decision of a query that called an impure builtin.","tags":[""],"parameters":[{"schema":{"type":"string"},"in":"path","name":"name","required":true,"description":"The name of a bundle, for example billing"}],"requestBody":{"content":{"application/json":{"example":{"input":{"user":"alice"}},"schema":{"$ref":"#/components/schemas/object-730921335"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"payload":"eyJfdHlwZSI6Imh0dHBzOi8vaW4tdG90by5pby9TdGF0ZW1lbnQvdjEi...","payloadType":"application/vnd.in-toto+json","signatures":[{"keyid":"decisions-2026","sig":"MEUCIQD...","x5c":["MIIBszCCAVmgAwIBAgI...","MIIBjDCCATKgAwIBAgI..."]}]},"schema":{"$ref":"#/components/schemas/object-1080065727"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","errors":[{"code":"rego_parse_error","location":{"col":6,"file":"","row":1},"message":"unexpected eof token"}],"message":"error(s) occurred while parsing query"},"schema":{"$ref":"#/components/schemas/object-709294299"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"code":"internal_error","errors":[{"code":"eval_conflict_error","location":{"col":1,"file":"authz/policy.rego","row":8},"message":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}],"message":"error(s) occurred while evaluating query"},"schema":{"$ref":"#/components/schemas/object261745936"}}}}},"security":[],"operationId":"postBundles_name_V1SignedData","deprecated":false}},"/bundles/{name}/v1/signed/data/{path}":{"post":{"summary":"Evaluate the document at the path, with the input, and sign the decision","description":"The response is a DSSE envelope with an in-toto Statement v1 about the decision. It names the principal of the caller. A signed decision needs an input. The server does not sign the decision of a query that called an impure builtin.","tags":[""],"parameters":[{"schema":{"type":"string"},"in":"path","name":"name","required":true,"description":"The name of a bundle, for example billing"},{"schema":{"type":"string"},"in":"path","name":"path","required":true,"description":"The path of the document in data, with / between its parts, for example authz/allow"}],"requestBody":{"content":{"application/json":{"example":{"input":{"user":"alice"}},"schema":{"$ref":"#/components/schemas/object-730921335"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"payload":"eyJfdHlwZSI6Imh0dHBzOi8vaW4tdG90by5pby9TdGF0ZW1lbnQvdjEi...","payloadType":"application/vnd.in-toto+json","signatures":[{"keyid":"decisions-2026","sig":"MEUCIQD...","x5c":["MIIBszCCAVmgAwIBAgI...","MIIBjDCCATKgAwIBAgI..."]}]},"schema":{"$ref":"#/components/schemas/object-1080065727"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","errors":[{"code":"rego_parse_error","location":{"col":6,"file":"","row":1},"message":"unexpected eof token"}],"message":"error(s) occurred while parsing query"},"schema":{"$ref":"#/components/schemas/object-709294299"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"code":"internal_error","errors":[{"code":"eval_conflict_error","location":{"col":1,"file":"authz/policy.rego","row":8},"message":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}],"message":"error(s) occurred while evaluating query"},"schema":{"$ref":"#/components/schemas/object261745936"}}}}},"security":[],"operationId":"postBundles_name_V1SignedData_path","deprecated":false}},"/health":{"get":{"summary":"The health of the server: {}","description":"rego4k reads each bundle before it serves, so the server is always healthy. It accepts the parameters of OPA.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"bundles","required":false,"description":"OPA checks that each bundle is active. rego4k reads each bundle before it serves"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"plugins","required":false,"description":"OPA checks that each plugin is OK. rego4k has no plugins"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"exclude-plugin","required":false,"description":"A plugin that the check of the plugins ignores"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{},"schema":{"$ref":"#/components/schemas/object-1945913032"}}}}},"security":[],"operationId":"getHealth","deprecated":false}},"/v1/data":{"get":{"summary":"Evaluate the document at the path, with the input of the parameter input","description":"As OPA's Data API. The response is {} if the document is undefined. With provided=true, the response also has provided: the provided values that the query read, in the form of a signed decision, for example {\"result\": true, \"provided\": {\"time\": \"2026-12-01T10:00:00Z\", \"zoneData\": \"2026e\"}}.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"input","required":false,"description":"The input document, as JSON text"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"explain","required":false,"description":"The explanation of the evaluation in the response: full, notes, fails or debug. Another value gives no explanation"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"metrics","required":false,"description":"If true, the response has the timers of the evaluation in metrics"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"instrument","required":false,"description":"If true, the response has the metrics. rego4k gives no more metrics than with metrics=true"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"strict-builtin-errors","required":false,"description":"If true, an error of a builtin stops the evaluation with 500, and is not undefined"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provided","required":false,"description":"If true, the response also has the provided values that the query read, in the form of a signed decision"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provenance","required":false,"description":"If true, the response has the version of rego4k and the revision of each bundle"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":true},"schema":{"$ref":"#/components/schemas/object2026432926"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","errors":[{"code":"rego_parse_error","location":{"col":6,"file":"","row":1},"message":"unexpected eof token"}],"message":"error(s) occurred while parsing query"},"schema":{"$ref":"#/components/schemas/object-709294299"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"code":"internal_error","errors":[{"code":"eval_conflict_error","location":{"col":1,"file":"authz/policy.rego","row":8},"message":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}],"message":"error(s) occurred while evaluating query"},"schema":{"$ref":"#/components/schemas/object261745936"}}}}},"security":[],"operationId":"getV1Data","deprecated":false},"post":{"summary":"Evaluate the document at the path, with the input of the body","description":"As OPA's Data API. The response is {} if the document is undefined. With no input, it has a warning. With provided=true, the response also has provided: the provided values that the query read, in the form of a signed decision, for example {\"result\": true, \"provided\": {\"time\": \"2026-12-01T10:00:00Z\", \"zoneData\": \"2026e\"}}.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"explain","required":false,"description":"The explanation of the evaluation in the response: full, notes, fails or debug. Another value gives no explanation"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"metrics","required":false,"description":"If true, the response has the timers of the evaluation in metrics"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"instrument","required":false,"description":"If true, the response has the metrics. rego4k gives no more metrics than with metrics=true"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"strict-builtin-errors","required":false,"description":"If true, an error of a builtin stops the evaluation with 500, and is not undefined"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provided","required":false,"description":"If true, the response also has the provided values that the query read, in the form of a signed decision"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provenance","required":false,"description":"If true, the response has the version of rego4k and the revision of each bundle"}],"requestBody":{"content":{"application/json":{"example":{"input":{"user":"alice"}},"schema":{"$ref":"#/components/schemas/object-730921335"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":true},"schema":{"$ref":"#/components/schemas/object2026432926"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","errors":[{"code":"rego_parse_error","location":{"col":6,"file":"","row":1},"message":"unexpected eof token"}],"message":"error(s) occurred while parsing query"},"schema":{"$ref":"#/components/schemas/object-709294299"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"code":"internal_error","errors":[{"code":"eval_conflict_error","location":{"col":1,"file":"authz/policy.rego","row":8},"message":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}],"message":"error(s) occurred while evaluating query"},"schema":{"$ref":"#/components/schemas/object261745936"}}}}},"security":[],"operationId":"postV1Data","deprecated":false}},"/v1/data/{path}":{"get":{"summary":"Evaluate the document at the path, with the input of the parameter input","description":"As OPA's Data API. The response is {} if the document is undefined. With provided=true, the response also has provided: the provided values that the query read, in the form of a signed decision, for example {\"result\": true, \"provided\": {\"time\": \"2026-12-01T10:00:00Z\", \"zoneData\": \"2026e\"}}.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"input","required":false,"description":"The input document, as JSON text"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"explain","required":false,"description":"The explanation of the evaluation in the response: full, notes, fails or debug. Another value gives no explanation"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"metrics","required":false,"description":"If true, the response has the timers of the evaluation in metrics"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"instrument","required":false,"description":"If true, the response has the metrics. rego4k gives no more metrics than with metrics=true"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"strict-builtin-errors","required":false,"description":"If true, an error of a builtin stops the evaluation with 500, and is not undefined"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provided","required":false,"description":"If true, the response also has the provided values that the query read, in the form of a signed decision"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provenance","required":false,"description":"If true, the response has the version of rego4k and the revision of each bundle"},{"schema":{"type":"string"},"in":"path","name":"path","required":true,"description":"The path of the document in data, with / between its parts, for example authz/allow"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":true},"schema":{"$ref":"#/components/schemas/object2026432926"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","errors":[{"code":"rego_parse_error","location":{"col":6,"file":"","row":1},"message":"unexpected eof token"}],"message":"error(s) occurred while parsing query"},"schema":{"$ref":"#/components/schemas/object-709294299"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"code":"internal_error","errors":[{"code":"eval_conflict_error","location":{"col":1,"file":"authz/policy.rego","row":8},"message":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}],"message":"error(s) occurred while evaluating query"},"schema":{"$ref":"#/components/schemas/object261745936"}}}}},"security":[],"operationId":"getV1Data_path","deprecated":false},"post":{"summary":"Evaluate the document at the path, with the input of the body","description":"As OPA's Data API. The response is {} if the document is undefined. With no input, it has a warning. With provided=true, the response also has provided: the provided values that the query read, in the form of a signed decision, for example {\"result\": true, \"provided\": {\"time\": \"2026-12-01T10:00:00Z\", \"zoneData\": \"2026e\"}}.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"explain","required":false,"description":"The explanation of the evaluation in the response: full, notes, fails or debug. Another value gives no explanation"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"metrics","required":false,"description":"If true, the response has the timers of the evaluation in metrics"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"instrument","required":false,"description":"If true, the response has the metrics. rego4k gives no more metrics than with metrics=true"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"strict-builtin-errors","required":false,"description":"If true, an error of a builtin stops the evaluation with 500, and is not undefined"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provided","required":false,"description":"If true, the response also has the provided values that the query read, in the form of a signed decision"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provenance","required":false,"description":"If true, the response has the version of rego4k and the revision of each bundle"},{"schema":{"type":"string"},"in":"path","name":"path","required":true,"description":"The path of the document in data, with / between its parts, for example authz/allow"}],"requestBody":{"content":{"application/json":{"example":{"input":{"user":"alice"}},"schema":{"$ref":"#/components/schemas/object-730921335"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":true},"schema":{"$ref":"#/components/schemas/object2026432926"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","errors":[{"code":"rego_parse_error","location":{"col":6,"file":"","row":1},"message":"unexpected eof token"}],"message":"error(s) occurred while parsing query"},"schema":{"$ref":"#/components/schemas/object-709294299"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"code":"internal_error","errors":[{"code":"eval_conflict_error","location":{"col":1,"file":"authz/policy.rego","row":8},"message":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}],"message":"error(s) occurred while evaluating query"},"schema":{"$ref":"#/components/schemas/object261745936"}}}}},"security":[],"operationId":"postV1Data_path","deprecated":false}},"/v1/policies":{"get":{"summary":"The modules of the bundle","description":"As OPA's Policy API. The ID of a module is the name of the bundle and the path of the module. OPA also gives the AST.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":[{"id":"default/authz/policy.rego","raw":"package authz\n\nallow if input.user == \"alice\"\n"}]},"schema":{"$ref":"#/components/schemas/object-564473046"}}}}},"security":[],"operationId":"getV1Policies","deprecated":false}},"/v1/policies/{id}":{"delete":{"summary":"Refused: a bundle owns all the paths","description":"As OPA with a bundle: a delete of a module gets 400, and a delete of a module that does not exist gets 404.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"The ID of a policy module: the name of the bundle, then the path of the module in the bundle"}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","message":"all paths owned by bundle \"default\""},"schema":{"$ref":"#/components/schemas/object750471649"}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"code":"resource_not_found","message":"storage_not_found_error: policy id \"default/x.rego\""},"schema":{"$ref":"#/components/schemas/object961821160"}}}}},"security":[],"operationId":"deleteV1Policies_id","deprecated":false},"get":{"summary":"A module of the bundle","description":"As OPA's Policy API. The ID is the name of the bundle and the path of the module, for example default/authz/policy.rego.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"The ID of a policy module: the name of the bundle, then the path of the module in the bundle"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":{"id":"default/authz/policy.rego","raw":"package authz\n\nallow if input.user == \"alice\"\n"}},"schema":{"$ref":"#/components/schemas/object-741707189"}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"code":"resource_not_found","message":"storage_not_found_error: policy id \"default/x.rego\""},"schema":{"$ref":"#/components/schemas/object961821160"}}}}},"security":[],"operationId":"getV1Policies_id","deprecated":false},"put":{"summary":"Refused: a bundle owns all the paths","description":"As OPA with a bundle: each write gets 400.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"The ID of a policy module: the name of the bundle, then the path of the module in the bundle"}],"responses":{"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","message":"all paths owned by bundle \"default\""},"schema":{"$ref":"#/components/schemas/object750471649"}}}}},"security":[],"operationId":"putV1Policies_id","deprecated":false}},"/v1/query":{"get":{"summary":"Evaluate the Rego query of the parameter q","description":"As OPA's Query API. The query has no input. With provided=true, the response also has provided: the provided values that the query read, in the form of a signed decision, for example {\"result\": true, \"provided\": {\"time\": \"2026-12-01T10:00:00Z\", \"zoneData\": \"2026e\"}}.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"q","required":false,"description":"The Rego query"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"explain","required":false,"description":"The explanation of the evaluation in the response: full, notes, fails or debug. Another value gives no explanation"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"metrics","required":false,"description":"If true, the response has the timers of the evaluation in metrics"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"instrument","required":false,"description":"If true, the response has the metrics. rego4k gives no more metrics than with metrics=true"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"strict-builtin-errors","required":false,"description":"If true, an error of a builtin stops the evaluation with 500, and is not undefined"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provided","required":false,"description":"If true, the response also has the provided values that the query read, in the form of a signed decision"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":[{"x":"alice"}]},"schema":{"$ref":"#/components/schemas/object2031453161"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","errors":[{"code":"rego_parse_error","location":{"col":6,"file":"","row":1},"message":"unexpected eof token"}],"message":"error(s) occurred while parsing query"},"schema":{"$ref":"#/components/schemas/object-709294299"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"code":"internal_error","errors":[{"code":"eval_conflict_error","location":{"col":1,"file":"authz/policy.rego","row":8},"message":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}],"message":"error(s) occurred while evaluating query"},"schema":{"$ref":"#/components/schemas/object261745936"}}}}},"security":[],"operationId":"getV1Query","deprecated":false},"post":{"summary":"Evaluate a Rego query, with the input","description":"As OPA's Query API. The result has the bindings of the vars of each solution, or it is {} if there is none. With provided=true, the response also has provided: the provided values that the query read, in the form of a signed decision, for example {\"result\": true, \"provided\": {\"time\": \"2026-12-01T10:00:00Z\", \"zoneData\": \"2026e\"}}.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"pretty","required":false,"description":"If true, the JSON of the response is indented"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"explain","required":false,"description":"The explanation of the evaluation in the response: full, notes, fails or debug. Another value gives no explanation"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"metrics","required":false,"description":"If true, the response has the timers of the evaluation in metrics"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"instrument","required":false,"description":"If true, the response has the metrics. rego4k gives no more metrics than with metrics=true"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"strict-builtin-errors","required":false,"description":"If true, an error of a builtin stops the evaluation with 500, and is not undefined"},{"schema":{"type":"array","items":{"type":"boolean"}},"in":"query","name":"provided","required":false,"description":"If true, the response also has the provided values that the query read, in the form of a signed decision"}],"requestBody":{"content":{"application/json":{"example":{"input":{"user":"alice"},"query":"x := input.user"},"schema":{"$ref":"#/components/schemas/object1290417408"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"result":[{"x":"alice"}]},"schema":{"$ref":"#/components/schemas/object2031453161"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","errors":[{"code":"rego_parse_error","location":{"col":6,"file":"","row":1},"message":"unexpected eof token"}],"message":"error(s) occurred while parsing query"},"schema":{"$ref":"#/components/schemas/object-709294299"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"code":"internal_error","errors":[{"code":"eval_conflict_error","location":{"col":1,"file":"authz/policy.rego","row":8},"message":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}],"message":"error(s) occurred while evaluating query"},"schema":{"$ref":"#/components/schemas/object261745936"}}}}},"security":[],"operationId":"postV1Query","deprecated":false}},"/v1/shaking":{"get":{"summary":"Show what tree shaking does to each file of the bundle, for the entrypoints, without a change to the bundle","description":"For each module and data file: the lines that the shaken bundle keeps, deletes and adds, and the shaken text. A removed file has no shaken text. The response also has the builtins that the shaken bundle needs, and the numbers of lines and files.","tags":[""],"parameters":[{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"entrypoint","required":true,"description":"An entrypoint, in the form of opa build -e, for example authz/allow. Give the parameter one time for each entrypoint"}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"builtins":["equal"],"bundle":"default","counts":{"addedLines":0,"deletedLines":4,"keptFiles":1,"keptLines":3,"removedFiles":1},"entrypoints":["authz/allow"],"files":[{"addedLines":0,"deletedLines":2,"keptLines":3,"lines":[{"change":"kept","row":1,"shakenRow":1,"text":"package authz"},{"change":"kept","row":2,"shakenRow":2,"text":""},{"change":"kept","row":3,"shakenRow":3,"text":"allow if input.user == \"admin\""},{"change":"deleted","row":4,"text":""},{"change":"deleted","row":5,"text":"deny if input.blocked"}],"path":"authz/policy.rego","removed":false,"shaken":"package authz\n\nallow if input.user == \"admin\"\n"},{"addedLines":0,"deletedLines":2,"keptLines":0,"lines":[{"change":"deleted","row":1,"text":"package lib.time"},{"change":"deleted","row":2,"text":"weekend := false"}],"path":"lib/time.rego","removed":true}],"removedFiles":["lib/time.rego"]},"schema":{"$ref":"#/components/schemas/object1580370434"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","message":"the bundle has no rules and no data at the entrypoint authz/nothing"},"schema":{"$ref":"#/components/schemas/object-998399234"}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"code":"resource_not_found","message":"the server has no bundle payroll"},"schema":{"$ref":"#/components/schemas/object-1365281171"}}}}},"security":[],"operationId":"getV1Shaking","deprecated":false}},"/v1/signed/data":{"post":{"summary":"Evaluate the document at the path, with the input, and sign the decision","description":"The response is a DSSE envelope with an in-toto Statement v1 about the decision. It names the principal of the caller. A signed decision needs an input. The server does not sign the decision of a query that called an impure builtin.","tags":[""],"parameters":[],"requestBody":{"content":{"application/json":{"example":{"input":{"user":"alice"}},"schema":{"$ref":"#/components/schemas/object-730921335"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"payload":"eyJfdHlwZSI6Imh0dHBzOi8vaW4tdG90by5pby9TdGF0ZW1lbnQvdjEi...","payloadType":"application/vnd.in-toto+json","signatures":[{"keyid":"decisions-2026","sig":"MEUCIQD...","x5c":["MIIBszCCAVmgAwIBAgI...","MIIBjDCCATKgAwIBAgI..."]}]},"schema":{"$ref":"#/components/schemas/object-1080065727"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","errors":[{"code":"rego_parse_error","location":{"col":6,"file":"","row":1},"message":"unexpected eof token"}],"message":"error(s) occurred while parsing query"},"schema":{"$ref":"#/components/schemas/object-709294299"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"code":"internal_error","errors":[{"code":"eval_conflict_error","location":{"col":1,"file":"authz/policy.rego","row":8},"message":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}],"message":"error(s) occurred while evaluating query"},"schema":{"$ref":"#/components/schemas/object261745936"}}}}},"security":[],"operationId":"postV1SignedData","deprecated":false}},"/v1/signed/data/{path}":{"post":{"summary":"Evaluate the document at the path, with the input, and sign the decision","description":"The response is a DSSE envelope with an in-toto Statement v1 about the decision. It names the principal of the caller. A signed decision needs an input. The server does not sign the decision of a query that called an impure builtin.","tags":[""],"parameters":[{"schema":{"type":"string"},"in":"path","name":"path","required":true,"description":"The path of the document in data, with / between its parts, for example authz/allow"}],"requestBody":{"content":{"application/json":{"example":{"input":{"user":"alice"}},"schema":{"$ref":"#/components/schemas/object-730921335"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"payload":"eyJfdHlwZSI6Imh0dHBzOi8vaW4tdG90by5pby9TdGF0ZW1lbnQvdjEi...","payloadType":"application/vnd.in-toto+json","signatures":[{"keyid":"decisions-2026","sig":"MEUCIQD...","x5c":["MIIBszCCAVmgAwIBAgI...","MIIBjDCCATKgAwIBAgI..."]}]},"schema":{"$ref":"#/components/schemas/object-1080065727"}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"code":"invalid_parameter","errors":[{"code":"rego_parse_error","location":{"col":6,"file":"","row":1},"message":"unexpected eof token"}],"message":"error(s) occurred while parsing query"},"schema":{"$ref":"#/components/schemas/object-709294299"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"code":"internal_error","errors":[{"code":"eval_conflict_error","location":{"col":1,"file":"authz/policy.rego","row":8},"message":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}],"message":"error(s) occurred while evaluating query"},"schema":{"$ref":"#/components/schemas/object261745936"}}}}},"security":[],"operationId":"postV1SignedData_path","deprecated":false}}},"components":{"schemas":{"object-1945913032":{"type":"object","properties":{}},"object846012730":{"type":"object","properties":{"name":{"type":"string","example":"default"},"revision":{"type":"string","example":"r1"},"sha256":{"type":"string","example":"9a1c..."}}},"object1747528865":{"type":"object","properties":{"bundles":{"type":"array","items":{"$ref":"#/components/schemas/object846012730"}}}},"object2026432926":{"type":"object","properties":{"result":{"type":"boolean","example":true}}},"object-756161576":{"type":"object","properties":{"col":{"type":"integer","example":6},"file":{"type":"string","example":""},"row":{"type":"integer","example":1}}},"object462768186":{"type":"object","properties":{"code":{"type":"string","example":"rego_parse_error"},"location":{"$ref":"#/components/schemas/object-756161576"},"message":{"type":"string","example":"unexpected eof token"}}},"object-709294299":{"type":"object","properties":{"code":{"type":"string","example":"invalid_parameter"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/object462768186"}},"message":{"type":"string","example":"error(s) occurred while parsing query"}}},"object-1822326300":{"type":"object","properties":{"col":{"type":"integer","example":1},"file":{"type":"string","example":"authz/policy.rego"},"row":{"type":"integer","example":8}}},"object1201846873":{"type":"object","properties":{"code":{"type":"string","example":"eval_conflict_error"},"location":{"$ref":"#/components/schemas/object-1822326300"},"message":{"type":"string","example":"rule data.authz.conflict produced conflicting values:\n  1 at authz/policy.rego:7\n  2 at authz/policy.rego:8"}}},"object261745936":{"type":"object","properties":{"code":{"type":"string","example":"internal_error"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/object1201846873"}},"message":{"type":"string","example":"error(s) occurred while evaluating query"}}},"object2057387506":{"type":"object","properties":{"user":{"type":"string","example":"alice"}}},"object-730921335":{"type":"object","properties":{"input":{"$ref":"#/components/schemas/object2057387506"}}},"object2056529507":{"type":"object","properties":{"x":{"type":"string","example":"alice"}}},"object2031453161":{"type":"object","properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/object2056529507"}}}},"object1290417408":{"type":"object","properties":{"input":{"$ref":"#/components/schemas/object2057387506"},"query":{"type":"string","example":"x := input.user"}}},"object1265461096":{"type":"object","properties":{"id":{"type":"string","example":"default/authz/policy.rego"},"raw":{"type":"string","example":"package authz\n\nallow if input.user == \"alice\"\n"}}},"object-564473046":{"type":"object","properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/object1265461096"}}}},"object-741707189":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/object1265461096"}}},"object961821160":{"type":"object","properties":{"code":{"type":"string","example":"resource_not_found"},"message":{"type":"string","example":"storage_not_found_error: policy id \"default/x.rego\""}}},"object750471649":{"type":"object","properties":{"code":{"type":"string","example":"invalid_parameter"},"message":{"type":"string","example":"all paths owned by bundle \"default\""}}},"object-1208250270":{"type":"object","properties":{"keyid":{"type":"string","example":"decisions-2026"},"sig":{"type":"string","example":"MEUCIQD..."},"x5c":{"type":"array","items":{"type":"string","example":"MIIBszCCAVmgAwIBAgI..."}}}},"object-1080065727":{"type":"object","properties":{"payload":{"type":"string","example":"eyJfdHlwZSI6Imh0dHBzOi8vaW4tdG90by5pby9TdGF0ZW1lbnQvdjEi..."},"payloadType":{"type":"string","example":"application/vnd.in-toto+json"},"signatures":{"type":"array","items":{"$ref":"#/components/schemas/object-1208250270"}}}},"object-572170037":{"type":"object","properties":{"addedLines":{"type":"integer","example":0},"deletedLines":{"type":"integer","example":4},"keptFiles":{"type":"integer","example":1},"keptLines":{"type":"integer","example":3},"removedFiles":{"type":"integer","example":1}}},"object-1484227261":{"type":"object","properties":{"change":{"type":"string","example":"kept"},"row":{"type":"integer","example":1},"shakenRow":{"type":"integer","example":1},"text":{"type":"string","example":"package authz"}}},"object-547952859":{"type":"object","properties":{"addedLines":{"type":"integer","example":0},"deletedLines":{"type":"integer","example":2},"keptLines":{"type":"integer","example":3},"lines":{"type":"array","items":{"$ref":"#/components/schemas/object-1484227261"}},"path":{"type":"string","example":"authz/policy.rego"},"removed":{"type":"boolean","example":false},"shaken":{"type":"string","example":"package authz\n\nallow if input.user == \"admin\"\n"}}},"object1580370434":{"type":"object","properties":{"builtins":{"type":"array","items":{"type":"string","example":"equal"}},"bundle":{"type":"string","example":"default"},"counts":{"$ref":"#/components/schemas/object-572170037"},"entrypoints":{"type":"array","items":{"type":"string","example":"authz/allow"}},"files":{"type":"array","items":{"$ref":"#/components/schemas/object-547952859"}},"removedFiles":{"type":"array","items":{"type":"string","example":"lib/time.rego"}}}},"object-998399234":{"type":"object","properties":{"code":{"type":"string","example":"invalid_parameter"},"message":{"type":"string","example":"the bundle has no rules and no data at the entrypoint authz/nothing"}}},"object-1365281171":{"type":"object","properties":{"code":{"type":"string","example":"resource_not_found"},"message":{"type":"string","example":"the server has no bundle payroll"}}}},"securitySchemes":{}},"servers":[{"url":"/","description":""}]}