v1
latestOpenAPI 3.0.32026-07-22238629559.2 KBPoliciesV2Service
Get the detection policy summary
Returns the detection policy bundles and state_versions for every enabled product in one read-only call. Writes always go through the per-product endpoints.
get/api/policies/v2/deployments/{deploymentId}/detection-policy
Path parameters
deploymentIdinteger required
The unique numerical identifier for the deployment.
Example:1234
Response
OK
Example response
{
"deployment_slug": "my-org",
"code": {
"bundle": {
"deployment_slug": "my-org",
"product": "code",
"rulesets": [
"p/owasp-top-10",
"p/cwe-top-25"
],
"rules": [
"python.lang.security.audit.dangerous-system-call"
],
"disabled": [
"python.lang.security.audit.dangerous-eval"
],
"exceptions": [
{
"exception_type": "exclude",
"project": "my-org/legacy-svc",
"project_tag_name": "segment",
"rule": "python.lang.security.audit.dangerous-system-call",
"rule_type": "rule"
}
]
},
"state_version": "a1b2c3d4"
},
"secrets": {
"bundle": {
"deployment_slug": "my-org",
"product": "code",
"rulesets": [
"p/owasp-top-10",
"p/cwe-top-25"
],
"rules": [
"python.lang.security.audit.dangerous-system-call"
],
"disabled": [
"python.lang.security.audit.dangerous-eval"
],
"exceptions": [
{
"exception_type": "exclude",
"project": "my-org/legacy-svc",
"project_tag_name": "segment",
"rule": "python.lang.security.audit.dangerous-system-call",
"rule_type": "rule"
}
]
},
"state_version": "a1b2c3d4"
}
}