---
title: "Get the policy vocabulary"
method: GET
path: "/api/policies/v2/deployments/{deploymentId}/vocab"
tags: ["PoliciesV2Service"]
---

# Get the policy vocabulary

`GET /api/policies/v2/deployments/{deploymentId}/vocab`

## Request

- The document declares no server URL.
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/semgrep/apis/semgrep-web-app/docs/api/policies/v2/deployments/:deploymentId/vocab/get.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Path parameters

- `deploymentId` integer, required: The unique numerical identifier for the deployment.

## Query parameters

- `product` string: 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.

## Response `200`

OK

- ProtosPoliciesV2GetVocabResponse
  - `condition_types` ProtosPoliciesV2VocabConditionType[]: The condition types accepted in remediation policy filters.
    - `type` string: The condition type, as used in the type field of a condition.
    - `description` string: What the condition matches on.
  - `action_types` ProtosPoliciesV2VocabActionType[]: The action types accepted in remediation policies, including their companion requirements.
    - `type` string: The action type, as used in the type field of an action.
    - `description` string: What the action does.
    - `requires` string[]: Companion action types that must be present in the same policy for this action to be accepted.
  - `value_enums` ProtosPoliciesV2VocabValueEnum[]: The accepted values per condition type or bundle field. Product-specific: populated only when the product query parameter is set.
    - `type` string: The condition type or bundle field the values apply to.
    - `values` string[]: The accepted values.
  - `detection_constraints` ProtosPoliciesV2VocabDetectionConstraints: Structural constraints on detection policy bundles for one product.
    - `rulesets_accepted` boolean: Whether the bundle accepts rulesets. Always false for `secrets`: secrets bundles must have an empty rulesets list.
    - `exception_types` string[]: The accepted exception_type values.
    - `rule_types` string[]: The accepted rule_type values.

---

[API](https://skmtc.dev/semgrep/apis/semgrep-web-app.md) - [All operations](https://skmtc.dev/semgrep/apis/semgrep-web-app/llms.txt) - [OpenAPI document](https://skmtc.dev/semgrep/apis/semgrep-web-app/revisions/6483eeecd582?raw)
