v1
latestOpenAPI 3.0.02026-07-141,4077,1665.2 MBCSM Threats
Update a Workload Protection policy
Update a specific Workload Protection policy. Returns the policy object when the request is successful.
Note: This endpoint is not available for the Government (US1-FED) site. Please reference the (US1-FED) specific resource below.
patch/api/v2/remote_config/products/cws/policy/{policy_id}
Path parameters
policy_idstring required
The ID of the Agent policy
Request body
Example request
{
"data": {
"attributes": {
"description": "My agent policy",
"enabled": true,
"name": "my_agent_policy"
},
"id": "6517fcc1-cec7-4394-a655-8d6e9d085255",
"type": "policy"
}
}Response
OK
Example response
{
"data": {
"attributes": {
"blockingRulesCount": 100,
"description": "My agent policy",
"disabledRulesCount": 100,
"enabled": true,
"monitoringRulesCount": 100,
"name": "my_agent_policy",
"policyType": "policy",
"policyVersion": "1",
"priority": 10,
"ruleCount": 100,
"updateDate": 1624366480320,
"updatedAt": 1624366480320,
"updater": {
"handle": "datadog.user@example.com",
"name": "Datadog User"
},
"versions": [
{
"name": "1.47.0-rc2"
}
]
},
"id": "6517fcc1-cec7-4394-a655-8d6e9d085255",
"type": "policy"
}
}