Update policy
Documentation Index
Fetch the complete documentation index at: https://docs.semgrep.dev/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Get access to data with your API token. Example header:
Authorization: Bearer 2991e2fb4b540fe75b8f90677b0b892b6314e4961cb001fe6eb452eee248a628
The token can be provisioned from the Tokens section in your Settings, and requires explicitly enabling Web API access.
Path Parameters
Deployment ID (numeric). Example: 123. Can be found at /deployments, or in your Settings in the web UI.
123
Policy ID (numeric). Example: 456. Can be found at /deployments/{deploymentId}/policies.
456
Body
Deployment ID (numeric). Example: 123. Can be found at /deployments, or in your Settings in the web UI.
123
Policy ID (numeric). Example: 456. Can be found at /deployments/{deploymentId}/policies.
456
New policy mode to set for the Rule.
- MODE_MONITOR: Monitor mode, silently report findings
- MODE_COMMENT: Comment mode, leaves PR comments but does not block
- MODE_BLOCK: Block mode, leaves PR comments and blocks PR
- MODE_DISABLED: Disabled mode, not active
| value | description |
|---|---|
| MODE_MONITOR | Monitor mode, silently report findings |
| MODE_COMMENT | Comment mode, leaves PR comments but does not block |
| MODE_BLOCK | Block mode, leaves PR comments and blocks PR |
| MODE_DISABLED | Disabled mode, not active |
MODE_MONITOR, MODE_COMMENT, MODE_BLOCK, MODE_DISABLED Full path of the Rule.