PoliciesService
Update Policy Rule
Update a specific rule within a policy.
put/api/policies/v1/deployments/{deploymentId}/{policyId}/rules/{rulePath}
Request
- The document declares no server URL.
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
deploymentIdstring int64 required
The unique numerical identifier of your deployment. Can be found via the Deployments Service or in your Settings in the web UI.
policyIdstring int64 required
The unique numerical identifier for the policy. Find your policy's ID via the List Policies endpoint.
rulePathstring required
Uniquely identify the Rule using its full path. Find the Rule's path via the List Policy Rules endpoint or via the Semgrep Registry.
Example:python.rule.1
Request body
Response
OK
Example response
{
"policyId": "456",
"updatedRule": {
"category": "security",
"confidence": "CONFIDENCE_HIGH",
"cweCategories": [
"CWE-918: Server-Side Request Forgery (SSRF)"
],
"languages": [
"python"
],
"lastChangeAt": "2024-07-29T22:33:37.380Z",
"owaspCategories": [
"A07: Cross-Site Scripting (XSS)"
],
"path": "python.rule.1",
"policyMode": "MODE_BLOCK",
"registryMaintainer": "semgrep",
"rulesets": [],
"severity": "SEVERITY_HIGH",
"source": "SOURCE_COMMUNITY",
"technologies": [
"django",
"flask"
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.