v1
latestOpenAPI 3.0.02026-07-141,4077,1665.2 MBCSM Threats
Update a Workload Protection agent rule
Update a specific Workload Protection Agent rule. Returns the agent rule 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/agent_rules/{agent_rule_id}
Path parameters
agent_rule_idstring required
The ID of the Agent rule
Query parameters
policy_idstring
The ID of the Agent policy
Request body
Example request
{
"data": {
"attributes": {
"description": "My Agent rule",
"enabled": true,
"expression": "exec.file.name == \"sh\"",
"policy_id": "a8c8e364-6556-434d-b798-a4c23de29c0b"
},
"id": "3dd-0uc-h1s",
"type": "agent_rule"
}
}Response
OK
Example response
{
"data": {
"attributes": {
"category": "Process Activity",
"creationAuthorUuId": "e51c9744-d158-11ec-ad23-da7ad0900002",
"creationDate": 1624366480320,
"creator": {
"handle": "datadog.user@example.com",
"name": "Datadog User"
},
"description": "My Agent rule",
"enabled": true,
"expression": "exec.file.name == \"sh\"",
"name": "my_agent_rule",
"updateAuthorUuId": "e51c9744-d158-11ec-ad23-da7ad0900002",
"updateDate": 1624366480320,
"updatedAt": 1624366480320,
"updater": {
"handle": "datadog.user@example.com",
"name": "Datadog User"
},
"version": 23
},
"id": "3dd-0uc-h1s",
"type": "agent_rule"
}
}