v1

latestOpenAPI 3.0.32026-07-22238629559.2 KB
PoliciesV2Service

Get the policy vocabulary

Returns the condition types, action types, and value enums this API accepts, so bundles can be validated client-side (for example in CI) without a round trip. Without the product query parameter, only the product-agnostic vocabulary is returned; pass product to include its value enums and, for code and secrets, the detection bundle constraints.

get/api/policies/v2/deployments/{deploymentId}/vocab

Path parameters

deploymentIdinteger required

The unique numerical identifier for the deployment.

Example:1234

Query parameters

productstring

The product to return product-specific value enums and constraints for. One of: code, secrets, remediation. Without it, only the product-agnostic parts of the vocabulary are returned.

Example:remediation

The product to return product-specific value enums and constraints for. Without it, only the product-agnostic parts of the vocabulary are returned.

Response

OK

Example response

{
  "condition_types": [
    {
      "type": "severity"
    }
  ],
  "action_types": [
    {
      "type": "block",
      "requires": [
        "pr_comment"
      ]
    }
  ],
  "value_enums": [
    {
      "type": "severity",
      "values": [
        "critical",
        "high",
        "medium",
        "low"
      ]
    }
  ],
  "detection_constraints": {
    "rulesets_accepted": true,
    "exception_types": [
      "include",
      "exclude"
    ],
    "rule_types": [
      "rule",
      "pack"
    ]
  }
}